UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AmbientSound.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
8#include "AmbientSound.generated.h"
9
11UCLASS(AutoExpandCategories=Audio, ClassGroup=Sounds, hideCategories(Collision, Input, Game), showCategories=("Input|MouseInput", "Input|TouchInput", "Game|Damage"), ComponentWrapperClass, MinimalAPI)
12class AAmbientSound : public AActor
13{
15
18 UPROPERTY(Category = Sound, VisibleAnywhere, BlueprintReadOnly, meta = (ExposeFunctionCategories = "Sound,Audio,Audio|Components|Audio", AllowPrivateAccess = "true"))
19 TObjectPtr<class UAudioComponent> AudioComponent;
20public:
21
23
24 //~ Begin AActor Interface.
25#if WITH_EDITOR
26 ENGINE_API virtual void CheckForErrors() override;
27 ENGINE_API virtual bool GetReferencedContentObjects( TArray<UObject*>& Objects ) const override;
28#endif
29 ENGINE_API virtual void PostRegisterAllComponents() override;
30 //~ End AActor Interface.
31
32 // BEGIN DEPRECATED (use component functions now in level script)
33 UFUNCTION(BlueprintCallable, Category="Audio", meta=(DeprecatedFunction))
34 ENGINE_API void FadeIn(float FadeInDuration, float FadeVolumeLevel = 1.f);
35 UFUNCTION(BlueprintCallable, Category="Audio", meta=(DeprecatedFunction))
36 ENGINE_API void FadeOut(float FadeOutDuration, float FadeVolumeLevel);
37 UFUNCTION(BlueprintCallable, Category="Audio", meta=(DeprecatedFunction))
38 ENGINE_API void AdjustVolume(float AdjustVolumeDuration, float AdjustVolumeLevel);
39 UFUNCTION(BlueprintCallable, Category="Audio", meta=(DeprecatedFunction))
40 ENGINE_API void Play(float StartTime = 0.f);
41 UFUNCTION(BlueprintCallable, Category="Audio", meta=(DeprecatedFunction))
42 ENGINE_API void Stop();
43 // END DEPRECATED
44
45public:
47 class UAudioComponent* GetAudioComponent() const { return AudioComponent; }
48};
49
50
51
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
@ Stop
Definition PrecomputedVolumetricLightmapStreaming.cpp:26
Definition Actor.h:257
virtual ENGINE_API void PostRegisterAllComponents()
Definition Actor.cpp:4107
Definition Array.h:670
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
@ hideCategories
Hides the specified categories in a property viewer. Usage: hideCategories=CategoryName or hideCatego...
Definition ObjectMacros.h:883
Definition ObjectPtr.h:488