Header <Kismet/GameplayStatics.h>

#include "Kismet/GameplayStatics.h"
Module: Engine Source: Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h

Includes 15

<CoreMinimal.h>
<UObject/ObjectMacros.h>
<UObject/Object.h>
<Templates/SubclassOf.h>
<Engine/EngineTypes.h>
<UObject/Interface.h>
<GameFramework/Actor.h>
<CollisionQueryParams.h>
<Engine/LatentActionManager.h>
<GameFramework/PlayerController.h>
<Kismet/BlueprintFunctionLibrary.h>
<Kismet/KismetSystemLibrary.h>
<Sound/DialogueTypes.h>
<GameplayStaticsTypes.h>
<Particles/WorldPSCPool.h>

Contents

UGameplayStatics
Static class with useful gameplay utility functions that can be called from both Blueprint and C++
(uclass class : UBlueprintFunctionLibrary)

class UGameplayStatics

class UGameplayStatics : public UBlueprintFunctionLibraryUCLASSMinimalAPI
Static class with useful gameplay utility functions that can be called from both Blueprint and C++

Static functions 153

SpawnObject
static UObject* SpawnObject(TSubclassOf<UObject> ObjectClass, UObject* Outer);UFUNCTIONBlueprintCallableCategory=Spawning
--- Create Object
BeginDeferredActorSpawnFromClass
static class AActor* BeginDeferredActorSpawnFromClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, const FTransform& SpawnTransform, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::Undefined, AActor* Owner = nullptr, ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot);UFUNCTIONBlueprintCallableCategory=Spawning
Spawns an instance of an actor class, but does not automatically run its construction script.
FinishSpawningActor
static class AActor* FinishSpawningActor(class AActor* Actor, const FTransform& SpawnTransform, ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot);UFUNCTIONBlueprintCallableCategory=Spawning
'Finish' spawning an actor. This will run the construction script.
GetActorArrayAverageLocation
static FVector GetActorArrayAverageLocation(const TArray<AActor*>& Actors);UFUNCTIONBlueprintCallableCategory=Transformation
--- Actor functions ------------------------------ Find the average location (centroid) of an array of Actors
GetActorArrayBounds
static void GetActorArrayBounds(const TArray<AActor*>& Actors, bool bOnlyCollidingComponents, FVector& Center, FVector& BoxExtent);UFUNCTIONBlueprintCallableCategory=Collision
Bind the bounds of an array of Actors
GetActorOfClass
static class AActor* GetActorOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass);UFUNCTIONBlueprintCallableCategory=Actor
Find the first Actor in the world of the specified class.
GetAllActorsOfClass
static void GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors);UFUNCTIONBlueprintCallableCategory=Actor
Find all Actors in the world of the specified class. This will be slow if there are many actors of the specified class.
GetAllActorsWithInterface
static void GetAllActorsWithInterface(const UObject* WorldContextObject, TSubclassOf<UInterface> Interface, TArray<AActor*>& OutActors);UFUNCTIONBlueprintCallableCategory=Actor
Find all Actors in the world with the specified interface. This is a very slow operation, as it will search over every actor in the world.
GetAllActorsWithTag
static void GetAllActorsWithTag(const UObject* WorldContextObject, FName Tag, TArray<AActor*>& OutActors);UFUNCTIONBlueprintCallableCategory=Actor
Find all Actors in the world with the specified tag. This is a very slow operation, as it will search over every actor in the world.
GetAllActorsOfClassWithTag
static void GetAllActorsOfClassWithTag(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, FName Tag, TArray<AActor*>& OutActors);UFUNCTIONBlueprintCallableCategory=Actor
Find all Actors in the world of the specified class with the specified tag. This will be slow if there are many actors of the specified class.
FindNearestActor
static AActor* FindNearestActor(FVector Origin, const TArray<AActor*>& ActorsToCheck, float& Distance);UFUNCTIONBlueprintPureCategory=Actor
Returns an Actor nearest to Origin from ActorsToCheck array.
GetGameInstance
static class UGameInstance* GetGameInstance(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
--- Player functions ------------------------------ Returns the game instance object
GetNumPlayerStates
static int32 GetNumPlayerStates(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns the number of active player states, there is one player state for every connected player even if they are a remote client. Indexes up to this can be use as PlayerStateIndex parameters for other functions.
GetPlayerState
static class APlayerState* GetPlayerState(const UObject* WorldContextObject, int32 PlayerStateIndex);UFUNCTIONBlueprintPureCategory=Game
Returns the player state at the given index in the game state's PlayerArray. This will work on both the client and server and the index will be consistent. After initial replication, all clients and the server will…
GetPlayerStateFromUniqueNetId
static class APlayerState* GetPlayerStateFromUniqueNetId(const UObject* WorldContextObject, const FUniqueNetIdRepl& UniqueId);UFUNCTIONBlueprintPureCategory=Game
Returns the player state that matches the passed in online id, or null for an invalid one. This will work on both the client and server for local and remote players.
GetNumPlayerControllers
static int32 GetNumPlayerControllers(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns the total number of available player controllers, including remote players when called on a server. Indexes up to this can be used as PlayerIndex parameters for the following functions.
GetNumLocalPlayerControllers
static int32 GetNumLocalPlayerControllers(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns the number of fully initialized local players, this will be 0 on dedicated servers. Indexes up to this can be used as PlayerIndex parameters for the following functions, and you are guaranteed to get a local…
GetPlayerController
static class APlayerController* GetPlayerController(const UObject* WorldContextObject, int32 PlayerIndex);UFUNCTIONBlueprintPureCategory=Game
Returns the player controller found while iterating through the local and available remote player controllers. On a network client, this will only include local players as remote player controllers are not available.…
GetPlayerPawn
static class APawn* GetPlayerPawn(const UObject* WorldContextObject, int32 PlayerIndex);UFUNCTIONBlueprintPureCategory=Game
Returns the pawn for the player controller at the specified player index. This will not include pawns of remote clients with no available player controller, you can use the player states list for that.
GetPlayerCharacter
static class ACharacter* GetPlayerCharacter(const UObject* WorldContextObject, int32 PlayerIndex);UFUNCTIONBlueprintPureCategory=Game
Returns the pawn for the player controller at the specified player index, will return null if the pawn is not a character. This will not include characters of remote clients with no available player controller, you…
GetPlayerCameraManager
static class APlayerCameraManager* GetPlayerCameraManager(const UObject* WorldContextObject, int32 PlayerIndex);UFUNCTIONBlueprintPureCategory=Game
Returns the camera manager for the Player Controller at the specified player index. This will not include remote clients with no player controller.
IsAnyLocalPlayerCameraWithinRange
static bool IsAnyLocalPlayerCameraWithinRange(const UObject* WorldContextObject, const FVector& Location, float MaximumRange);UFUNCTIONBlueprintPureCategory=Game
Determines if any local player controller's camera is within range of the specified location.
GetPlayerControllerFromID
static class APlayerController* GetPlayerControllerFromID(const UObject* WorldContextObject, int32 ControllerID);UFUNCTIONBlueprintPureCategory=Game
Returns the player controller with the specified physical controller ID. This only works for local players.
GetPlayerControllerFromPlatformUser
static APlayerController* GetPlayerControllerFromPlatformUser(const UObject* WorldContextObject, FPlatformUserId UserId);UFUNCTIONBlueprintPureCategory=Game
Returns the player controller with the specified physical controller ID. This only works for local players.
CreatePlayer
static class APlayerController* CreatePlayer(const UObject* WorldContextObject, int32 ControllerId = -1, bool bSpawnPlayerController = true);UFUNCTIONBlueprintCallableCategory=Game
Create a new local player for this game, for cases like local multiplayer.
CreatePlayerFromPlatformUser
static class APlayerController* CreatePlayerFromPlatformUser(const UObject* WorldContextObject, FPlatformUserId UserId, bool bSpawnPlayerController = true);UFUNCTIONBlueprintCallableCategory=Game
Create a new local player for this game, for cases like local multiplayer.
RemovePlayer
static void RemovePlayer(APlayerController* Player, bool bDestroyPawn);UFUNCTIONBlueprintCallableCategory=Game
Removes a local player from this game.
GetPlayerControllerID
static int32 GetPlayerControllerID(APlayerController* Player);UFUNCTIONBlueprintPureCategory=Game
Gets what physical controller ID a player is using. This only works for local player controllers.
SetPlayerControllerID
static void SetPlayerControllerID(APlayerController* Player, int32 ControllerId);UFUNCTIONBlueprintCallableCategory=Game
Sets what physical controller ID a player should be using. This only works for local player controllers.
SetPlayerPlatformUserId
static void SetPlayerPlatformUserId(APlayerController* PlayerController, FPlatformUserId UserId);UFUNCTIONBlueprintCallableCategory=Game
Sets what platform user id a player should be using. This only works for local player controllers.
LoadStreamLevel
static void LoadStreamLevel(const UObject* WorldContextObject, FName LevelName, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, FLatentActionInfo LatentInfo);UFUNCTIONBlueprintCallableCategory=Game
--- Level Streaming functions ------------------------ Stream the level (by Name); Calling again before it finishes has no effect
LoadStreamLevelBySoftObjectPtr
static void LoadStreamLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, FLatentActionInfo LatentInfo);UFUNCTIONBlueprintCallableCategory=Game
Stream the level (by Object Reference); Calling again before it finishes has no effect
UnloadStreamLevel
static void UnloadStreamLevel(const UObject* WorldContextObject, FName LevelName, FLatentActionInfo LatentInfo, bool bShouldBlockOnUnload);UFUNCTIONBlueprintCallableCategory=Game
Unload a streamed in level (by Name)
UnloadStreamLevelBySoftObjectPtr
static void UnloadStreamLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, FLatentActionInfo LatentInfo, bool bShouldBlockOnUnload);UFUNCTIONBlueprintCallableCategory=Game
Unload a streamed in level (by Object Reference)
GetStreamingLevel
static class ULevelStreaming* GetStreamingLevel(const UObject* WorldContextObject, FName PackageName);UFUNCTIONBlueprintPureCategory=Game
Returns level streaming object with specified level package name
FlushLevelStreaming
static void FlushLevelStreaming(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Game
Flushes level streaming in blocking fashion and returns when all sub-levels are loaded / visible / hidden
CancelAsyncLoading
static void CancelAsyncLoading();UFUNCTIONBlueprintCallableCategory=Game
Cancels all currently queued streaming packages
OpenLevel
static void OpenLevel(const UObject* WorldContextObject, FName LevelName, bool bAbsolute = true, FString Options = FString(TEXT("")));UFUNCTIONBlueprintCallableCategory=Game
Travel to another level
OpenLevelBySoftObjectPtr
static void OpenLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, bool bAbsolute = true, FString Options = FString(TEXT("")));UFUNCTIONBlueprintCallableCategory=Game
Travel to another level
GetCurrentLevelName
static FString GetCurrentLevelName(const UObject* WorldContextObject, bool bRemovePrefixString = true);UFUNCTIONBlueprintCallableCategory=Game
Get the name of the currently-open level.
GetGameMode
static class AGameModeBase* GetGameMode(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
--- Global functions ------------------------------ Returns the current GameModeBase or Null if it can't be retrieved, such as on the client
GetGameState
static class AGameStateBase* GetGameState(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns the current GameStateBase or Null if it can't be retrieved
GetObjectClass
static class UClass *GetObjectClass(const UObject *Object);UFUNCTIONBlueprintPureCategory=Utilities
Returns the class of a passed in Object, will always be valid if Object is not NULL
ObjectIsA
static bool ObjectIsA(const UObject* Object, TSubclassOf<UObject> ObjectClass);UFUNCTIONBlueprintPureCategory=Utilities
Returns whether or not the object passed in is of (or inherits from) the class type.
GetGlobalTimeDilation
static float GetGlobalTimeDilation(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Gets the current global time dilation.
SetGlobalTimeDilation
static void SetGlobalTimeDilation(const UObject* WorldContextObject, float TimeDilation);UFUNCTIONBlueprintCallableCategory=Utilities|Time
Sets the global time dilation.
SetGamePaused
static bool SetGamePaused(const UObject* WorldContextObject, bool bPaused);UFUNCTIONBlueprintCallableCategory=Game
Sets the game's paused state
IsGamePaused
static bool IsGamePaused(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns the game's paused state
SetForceDisableSplitscreen
static void SetForceDisableSplitscreen(const UObject* WorldContextObject, bool bDisable);UFUNCTIONBlueprintCallableCategory=Viewport
Enables split screen
IsSplitscreenForceDisabled
static bool IsSplitscreenForceDisabled(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Viewport
Returns the split screen state
SetEnableWorldRendering
static void SetEnableWorldRendering(const UObject* WorldContextObject, bool bEnable);UFUNCTIONBlueprintCallableCategory=Rendering
Enabled rendering of the world
GetEnableWorldRendering
static bool GetEnableWorldRendering(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Rendering
Returns the world rendering state
GetViewportMouseCaptureMode
static EMouseCaptureMode GetViewportMouseCaptureMode(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Viewport
Returns the current viewport mouse capture mode
SetViewportMouseCaptureMode
static void SetViewportMouseCaptureMode(const UObject* WorldContextObject, const EMouseCaptureMode MouseCaptureMode);UFUNCTIONBlueprintCallableCategory=Viewport
Sets the current viewport mouse capture mode
ApplyRadialDamage
static bool ApplyRadialDamage(const UObject* WorldContextObject, float BaseDamage, const FVector& Origin, float DamageRadius, TSubclassOf<class UDamageType> DamageTypeClass, const TArray<AActor*>& IgnoreActors, AActor* DamageCauser = NULL, AController* InstigatedByController = NULL, bool bDoFullDamage = false, ECollisionChannel DamagePreventionChannel = ECC_Visibility);UFUNCTIONBlueprintCallableBlueprintAuthorityOnlyCategory=Game|Damage
Hurt locally authoritative actors within the radius. Will only hit components that block the Visibility channel.
ApplyRadialDamageWithFalloff
static bool ApplyRadialDamageWithFalloff(const UObject* WorldContextObject, float BaseDamage, float MinimumDamage, const FVector& Origin, float DamageInnerRadius, float DamageOuterRadius, float DamageFalloff, TSubclassOf<class UDamageType> DamageTypeClass, const TArray<AActor*>& IgnoreActors, AActor* DamageCauser = NULL, AController* InstigatedByController = NULL, ECollisionChannel DamagePreventionChannel = ECC_Visibility);UFUNCTIONBlueprintCallableBlueprintAuthorityOnlyCategory=Game|Damage
Hurt locally authoritative actors within the radius. Will only hit components that block the Visibility channel.
ApplyPointDamage
static float ApplyPointDamage(AActor* DamagedActor, float BaseDamage, const FVector& HitFromDirection, const FHitResult& HitInfo, AController* EventInstigator, AActor* DamageCauser, TSubclassOf<class UDamageType> DamageTypeClass);UFUNCTIONBlueprintCallableBlueprintAuthorityOnlyCategory=Game|Damage
Hurts the specified actor with the specified impact.
ApplyDamage
static float ApplyDamage(AActor* DamagedActor, float BaseDamage, AController* EventInstigator, AActor* DamageCauser, TSubclassOf<class UDamageType> DamageTypeClass);UFUNCTIONBlueprintCallableBlueprintAuthorityOnlyCategory=Game|Damage
Hurts the specified actor with generic damage.
PlayWorldCameraShake
static void PlayWorldCameraShake(const UObject* WorldContextObject, TSubclassOf<class UCameraShakeBase> Shake, FVector Epicenter, float InnerRadius, float OuterRadius, float Falloff = 1.f, bool bOrientShakeTowardsEpicenter = false);UFUNCTIONBlueprintCallableCategory=Camera
--- Camera functions ------------------------------ Plays an in-world camera shake that affects all nearby local players, with distance-based attenuation. Does not replicate.
SpawnEmitterAtLocation
static UParticleSystemComponent* SpawnEmitterAtLocation(const UObject* WorldContextObject, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation = FRotator::ZeroRotator, FVector Scale = FVector(1.f), bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivateSystem = true);UFUNCTIONBlueprintCallableCategory=Effects
static UParticleSystemComponent* SpawnEmitterAtLocation(const UObject* WorldContextObject, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation, bool bAutoDestroy, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivateSystem =true);
static UParticleSystemComponent* SpawnEmitterAtLocation(UWorld* World, UParticleSystem* EmitterTemplate, const FTransform& SpawnTransform, bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivate = true);
--- Particle functions ------------------------------ Plays the specified effect at the given location and rotation, fire and forget. The system will go away when the effect is complete. Does not replicate.
SpawnEmitterAttached
static UParticleSystemComponent* SpawnEmitterAttached(class UParticleSystem* EmitterTemplate, class USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, FVector Scale = FVector(1.f), EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivate=true);UFUNCTIONBlueprintCallableCategory=Effects
static UParticleSystemComponent* SpawnEmitterAttached(class UParticleSystem* EmitterTemplate, class USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, FRotator Rotation, EAttachLocation::Type LocationType, bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivate=true);
Plays the specified effect attached to and following the specified component. The system will go away when the effect is complete. Does not replicate.
AreAnyListenersWithinRange
static bool AreAnyListenersWithinRange(const UObject* WorldContextObject, const FVector& Location, float MaximumRange);UFUNCTIONBlueprintCallableCategory=Audio
--- Sound functions ------------------------------
GetClosestListenerLocation
static bool GetClosestListenerLocation(const UObject* WorldContextObject, const FVector& Location, float MaximumRange, const bool bAllowAttenuationOverride, FVector& ListenerPosition);UFUNCTIONBlueprintCallableCategory=Audio
Finds and returns the position of the closest listener to the specified location
SetGlobalPitchModulation
static void SetGlobalPitchModulation(const UObject* WorldContextObject, float PitchModulation, float TimeSec);UFUNCTIONBlueprintCallableCategory=Audio
Sets a global pitch modulation scalar that will apply to all non-UI sounds
SetSoundClassDistanceScale
static void SetSoundClassDistanceScale(const UObject* WorldContextObject, USoundClass* SoundClass, float DistanceAttenuationScale, float TimeSec = 0.0f);UFUNCTIONBlueprintCallableCategory=Audio
Linearly interpolates the attenuation distance scale value from it's current attenuation distance override value (1.0f it not overridden) to its new attenuation distance override, over the given amount of time
SetGlobalListenerFocusParameters
static void SetGlobalListenerFocusParameters(const UObject* WorldContextObject, float FocusAzimuthScale = 1.0f, float NonFocusAzimuthScale = 1.0f, float FocusDistanceScale = 1.0f, float NonFocusDistanceScale = 1.0f, float FocusVolumeScale = 1.0f, float NonFocusVolumeScale = 1.0f, float FocusPriorityScale = 1.0f, float NonFocusPriorityScale = 1.0f);UFUNCTIONBlueprintCallableCategory=Audio
Sets the global listener focus parameters, which will scale focus behavior of sounds based on their focus azimuth settings in their attenuation settings.
PlaySound2D
static void PlaySound2D(const UObject* WorldContextObject, USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundConcurrency* ConcurrencySettings = nullptr, const AActor* OwningActor = nullptr, bool bIsUISound = true);UFUNCTIONBlueprintCallableCategory=Audio
Plays a sound directly with no attenuation, perfect for UI sounds.
SpawnSound2D
static UAudioComponent* SpawnSound2D(const UObject* WorldContextObject, USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundConcurrency* ConcurrencySettings = nullptr, bool bPersistAcrossLevelTransition = false, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
This function allows users to create Audio Components with settings specifically for non-spatialized, non-distance-attenuated sounds. Audio Components created using this function by default will not have…
CreateSound2D
static UAudioComponent* CreateSound2D(const UObject* WorldContextObject, USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundConcurrency* ConcurrencySettings = nullptr, bool bPersistAcrossLevelTransition = false, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
This function allows users to create Audio Components in advance of playback with settings specifically for non-spatialized, non-distance-attenuated sounds. Audio Components created using this function by default…
PlaySoundAtLocation
static void PlaySoundAtLocation(const UObject* WorldContextObject, USoundBase* Sound, FVector Location, FRotator Rotation, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, const AActor* OwningActor = nullptr, const UInitialActiveSoundParams* InitialParams = nullptr);UFUNCTIONBlueprintCallableCategory=Audio
static void PlaySoundAtLocation(const UObject* WorldContextObject, USoundBase* Sound, FVector Location, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, const UInitialActiveSoundParams* InitialParams = nullptr);
Plays a sound at the given location. This is a fire and forget sound and does not travel with any actor. Replication is also not handled at this point.
SpawnSoundAtLocation
static UAudioComponent* SpawnSoundAtLocation(const UObject* WorldContextObject, USoundBase* Sound, FVector Location, FRotator Rotation = FRotator::ZeroRotator, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
Spawns a sound at the given location. This does not travel with any actor. Replication is also not handled at this point.
SpawnSoundAttached
static UAudioComponent* SpawnSoundAttached(USoundBase* Sound, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
static class UAudioComponent* SpawnSoundAttached(USoundBase* Sound, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true);
This function allows users to create and play Audio Components attached to a specific Scene Component. Useful for spatialized and/or distance-attenuated sounds that need to follow another object in space.
PlayDialogue2D
static void PlayDialogue2D(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f);UFUNCTIONBlueprintCallableCategory=Audio
Plays a dialogue directly with no attenuation, perfect for UI.
SpawnDialogue2D
static UAudioComponent* SpawnDialogue2D(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
Spawns a DialogueWave, a special type of Asset that requires Context data in order to resolve a specific SoundBase, which is then passed on to the new Audio Component. Audio Components created using this function by…
PlayDialogueAtLocation
static void PlayDialogueAtLocation(const UObject* WorldContextObject, class UDialogueWave* Dialogue, const FDialogueContext& Context, FVector Location, FRotator Rotation, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr);UFUNCTIONBlueprintCallableCategory=Audio
static void PlayDialogueAtLocation(const UObject* WorldContextObject, UDialogueWave* Dialogue, const FDialogueContext& Context, FVector Location, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr);
Plays a dialogue at the given location. This is a fire and forget sound and does not travel with any actor. Replication is also not handled at this point.
SpawnDialogueAtLocation
static UAudioComponent* SpawnDialogueAtLocation(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, FVector Location, FRotator Rotation = FRotator::ZeroRotator, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
Spawns a DialogueWave, a special type of Asset that requires Context data in order to resolve a specific SoundBase, which is then passed on to the new Audio Component. This function allows users to create and play…
SpawnDialogueAttached
static UAudioComponent* SpawnDialogueAttached(UDialogueWave* Dialogue, const FDialogueContext& Context, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=Audio
static UAudioComponent* SpawnDialogueAttached(UDialogueWave* Dialogue, const FDialogueContext& Context, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);
Spawns a DialogueWave, a special type of Asset that requires Context data in order to resolve a specific SoundBase, which is then passed on to the new Audio Component. This function allows users to create and play…
SpawnForceFeedbackAtLocation
static UForceFeedbackComponent* SpawnForceFeedbackAtLocation(const UObject* WorldContextObject, UForceFeedbackEffect* ForceFeedbackEffect, FVector Location, FRotator Rotation = FRotator::ZeroRotator, bool bLooping = false, float IntensityMultiplier = 1.f, float StartTime = 0.f, UForceFeedbackAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=ForceFeedback
Plays a force feedback effect at the given location. This is a fire and forget effect and does not travel with any actor. Replication is also not handled at this point.
SpawnForceFeedbackAttached
static UForceFeedbackComponent* SpawnForceFeedbackAttached(UForceFeedbackEffect* ForceFeedbackEffect, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, bool bLooping = false, float IntensityMultiplier = 1.f, float StartTime = 0.f, class UForceFeedbackAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);UFUNCTIONBlueprintCallableCategory=ForceFeedback
Plays a force feedback effect attached to and following the specified component. This is a fire and forget effect. Replication is also not handled at this point.
SetSubtitlesEnabled
static void SetSubtitlesEnabled(bool bEnabled);UFUNCTIONBlueprintCallableCategory=Audio|Subtitles
Will set subtitles to be enabled or disabled.
AreSubtitlesEnabled
static bool AreSubtitlesEnabled();UFUNCTIONBlueprintPureCategory=Audio|Subtitles
Returns whether or not subtitles are currently enabled.
SetBaseSoundMix
static void SetBaseSoundMix(const UObject* WorldContextObject, class USoundMix* InSoundMix);UFUNCTIONBlueprintCallableCategory=Audio
--- Audio Functions ---------------------------- Set the sound mix of the audio system for special EQing
PrimeSound
static void PrimeSound(USoundBase* InSound);UFUNCTIONBlueprintCallableCategory=Audio
Primes the sound, caching the first chunk of streamed audio.
GetAvailableSpatialPluginNames
static TArray<FName> GetAvailableSpatialPluginNames(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Audio
Get list of available Audio Spatialization Plugin names
GetActiveSpatialPluginName
static FName GetActiveSpatialPluginName(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Audio
Get currently active Audio Spatialization Plugin name
SetActiveSpatialPluginByName
static bool SetActiveSpatialPluginByName(const UObject* WorldContextObject, FName InPluginName);UFUNCTIONBlueprintCallableCategory=Audio
Get list of available Audio Spatialization Plugins
PrimeAllSoundsInSoundClass
static void PrimeAllSoundsInSoundClass(class USoundClass* InSoundClass);UFUNCTIONBlueprintCallableCategory=Audio
Primes the sound waves in the given USoundClass, caching the first chunk of streamed audio.
UnRetainAllSoundsInSoundClass
static void UnRetainAllSoundsInSoundClass(class USoundClass* InSoundClass);UFUNCTIONBlueprintCallableCategory=Audio
Iterate through all sound waves and releases handles to retained chunks. (If the chunk is not being played it will be up for eviction)
SetSoundMixClassOverride
static void SetSoundMixClassOverride(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier, class USoundClass* InSoundClass, float Volume = 1.0f, float Pitch = 1.0f, float FadeInTime = 1.0f, bool bApplyToChildren = true);UFUNCTIONBlueprintCallableCategory=Audio
Overrides the sound class adjuster in the given sound mix. If the sound class does not exist in the input sound mix, the sound class adjuster will be added to the list of active sound mix modifiers.
ClearSoundMixClassOverride
static void ClearSoundMixClassOverride(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier, class USoundClass* InSoundClass, float FadeOutTime = 1.0f);UFUNCTIONBlueprintCallableCategory=Audio
Clears any existing override of the Sound Class Adjuster in the given Sound Mix
PushSoundMixModifier
static void PushSoundMixModifier(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier);UFUNCTIONBlueprintCallableCategory=Audio
Push a sound mix modifier onto the audio system
PopSoundMixModifier
static void PopSoundMixModifier(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier);UFUNCTIONBlueprintCallableCategory=Audio
Pop a sound mix modifier from the audio system
ClearSoundMixModifiers
static void ClearSoundMixModifiers(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Audio
Clear all sound mix modifiers from the audio system
ActivateReverbEffect
static void ActivateReverbEffect(const UObject* WorldContextObject, class UReverbEffect* ReverbEffect, FName TagName, float Priority = 0.f, float Volume = 0.5f, float FadeTime = 2.f);UFUNCTIONBlueprintCallableCategory=Audio
Activates a Reverb Effect without the need for an Audio Volume
DeactivateReverbEffect
static void DeactivateReverbEffect(const UObject* WorldContextObject, FName TagName);UFUNCTIONBlueprintCallableCategory=Audio
Deactivates a Reverb Effect that was applied outside of an Audio Volume
GetCurrentReverbEffect
static class UReverbEffect* GetCurrentReverbEffect(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Audio
Returns the highest priority reverb settings currently active from any source (Audio Volumes or manual settings).
SetMaxAudioChannelsScaled
static void SetMaxAudioChannelsScaled(const UObject* WorldContextObject, float MaxChannelCountScale);UFUNCTIONBlueprintCallableCategory=Audio
Sets the max number of voices (also known as "channels") dynamically by percentage. E.g. if you want to temporarily reduce voice count by 50%, use 0.50. Later, you can return to the original max voice count by using 1.0.
GetMaxAudioChannelCount
static int32 GetMaxAudioChannelCount(const UObject* WorldContextObject);UFUNCTIONBlueprintCallableCategory=Audio
Retrieves the max voice count currently used by the audio engine.
SpawnDecalAtLocation
static UDecalComponent* SpawnDecalAtLocation(const UObject* WorldContextObject, class UMaterialInterface* DecalMaterial, FVector DecalSize, FVector Location, FRotator Rotation = FRotator(-90, 0, 0), float LifeSpan = 0);UFUNCTIONBlueprintCallableCategory=Rendering|Decal
--- Decal functions ------------------------------ Spawns a decal at the given location and rotation, fire and forget. Does not replicate.
SpawnDecalAttached
static UDecalComponent* SpawnDecalAttached(class UMaterialInterface* DecalMaterial, FVector DecalSize, class USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, float LifeSpan = 0);UFUNCTIONBlueprintCallableCategory=Rendering|Decal
Spawns a decal attached to and following the specified component. Does not replicate.
BreakHitResult
static void BreakHitResult(const struct FHitResult& Hit, bool& bBlockingHit, bool& bInitialOverlap, float& Time, float& Distance, FVector& Location, FVector& ImpactPoint, FVector& Normal, FVector& ImpactNormal, class UPhysicalMaterial*& PhysMat, class AActor*& HitActor, class UPrimitiveComponent*& HitComponent, FName& HitBoneName, FName& BoneName, int32& HitItem, int32& ElementIndex, int32& FaceIndex, FVector& TraceStart, FVector& TraceEnd);UFUNCTIONBlueprintPureCategory=Collision
Extracts data from a HitResult.
MakeHitResult
static FHitResult MakeHitResult(bool bBlockingHit, bool bInitialOverlap, float Time, float Distance, FVector Location, FVector ImpactPoint, FVector Normal, FVector ImpactNormal, class UPhysicalMaterial* PhysMat, class AActor* HitActor, class UPrimitiveComponent* HitComponent, FName HitBoneName, FName BoneName, int32 HitItem, int32 ElementIndex, int32 FaceIndex, FVector TraceStart, FVector TraceEnd);UFUNCTIONBlueprintPureCategory=Collision
Create a HitResult struct
GetSurfaceType
static EPhysicalSurface GetSurfaceType(const struct FHitResult& Hit);UFUNCTIONBlueprintPureCategory=Collision
Returns the EPhysicalSurface type of the given Hit. To edit surface type for your project, use ProjectSettings/Physics/PhysicalSurface section
FindCollisionUV
static bool FindCollisionUV(const struct FHitResult& Hit, int32 UVChannel, FVector2D& UV);UFUNCTIONBlueprintPureCategory=Collision
Try and find the UV for a collision impact. Note this ONLY works if 'Support UV From Hit Results' is enabled in Physics Settings.
CreateSaveGameObject
static USaveGame* CreateSaveGameObject(TSubclassOf<USaveGame> SaveGameClass);UFUNCTIONBlueprintCallableCategory=SaveGame
--- Save Game functions ------------------------------
SaveGameToMemory
static bool SaveGameToMemory(USaveGame* SaveGameObject, TArray<uint8>& OutSaveData);
Serialize our USaveGame object into a given array of bytes
SaveDataToSlot
static bool SaveDataToSlot(const TArray<uint8>& InSaveData, const FString& SlotName, const int32 UserIndex);
Save the contents of the buffer to a platform-specific save slot/file
AsyncSaveGameToSlot
static void AsyncSaveGameToSlot(USaveGame* SaveGameObject, const FString& SlotName, const int32 UserIndex, FAsyncSaveGameToSlotDelegate SavedDelegate = FAsyncSaveGameToSlotDelegate());
Schedule an async save to a specific slot. UAsyncActionHandleSaveGame::AsyncSaveGameToSlot is the blueprint version of this. This will do the serialize on the game thread, the platform-specific write on a worker…
SaveGameToSlot
static bool SaveGameToSlot(USaveGame* SaveGameObject, const FString& SlotName, const int32 UserIndex);UFUNCTIONBlueprintCallableCategory=SaveGame
Save the contents of the SaveGameObject to a platform-specific save slot/file.
DoesSaveGameExist
static bool DoesSaveGameExist(const FString& SlotName, const int32 UserIndex);UFUNCTIONBlueprintCallableCategory=SaveGame
See if a save game exists with the specified name.
LoadGameFromMemory
static USaveGame* LoadGameFromMemory(const TArray<uint8>& InSaveData);
Tries to load a SaveGame object from a given array of bytes.
LoadDataFromSlot
static bool LoadDataFromSlot(TArray<uint8>& OutSaveData, const FString& SlotName, const int32 UserIndex);
Load contents from a slot/file into a buffer of save data.
AsyncLoadGameFromSlot
static void AsyncLoadGameFromSlot(const FString& SlotName, const int32 UserIndex, FAsyncLoadGameFromSlotDelegate LoadedDelegate);
Schedule an async load of a specific slot. UAsyncActionHandleSaveGame::AsyncLoadGameFromSlot is the blueprint version of this. This will do the platform-specific read on a worker thread, the serialize and creation on…
LoadGameFromSlot
static USaveGame* LoadGameFromSlot(const FString& SlotName, const int32 UserIndex);UFUNCTIONBlueprintCallableCategory=SaveGame
Load the contents from a given slot.
StripSaveGameHeader
static FMemoryReader StripSaveGameHeader(const TArray<uint8>& SaveData);
Takes the provided buffer and consumes it, parsing past the internal header data, returning a MemoryReader that has: 1) been set up with all the related header information, and 2) offset to where tagged USaveGame…
DeleteGameInSlot
static bool DeleteGameInSlot(const FString& SlotName, const int32 UserIndex);UFUNCTIONBlueprintCallableCategory=SaveGame
Delete a save game in a particular slot.
GetWorldDeltaSeconds
static double GetWorldDeltaSeconds(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns the frame delta time in seconds, adjusted by time dilation.
GetTimeSeconds
static double GetTimeSeconds(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns time in seconds since world was brought up for play, adjusted by time dilation and IS stopped when game pauses
GetUnpausedTimeSeconds
static double GetUnpausedTimeSeconds(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns time in seconds since world was brought up for play, adjusted by time dilation and IS NOT stopped when game pauses
GetRealTimeSeconds
static double GetRealTimeSeconds(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns time in seconds since world was brought up for play, does NOT stop when game pauses, NOT dilated/clamped
GetAudioTimeSeconds
static double GetAudioTimeSeconds(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns time in seconds since world was brought up for play, IS stopped when game pauses, NOT dilated/clamped.
GetAccurateRealTime
static void GetAccurateRealTime(int32& Seconds, double& PartialSeconds);UFUNCTIONBlueprintPureCategory=Utilities|Time
Returns time in seconds since the application was started. Unlike the other time functions this is accurate to the exact time this function is called instead of set once per frame.
EnableLiveStreaming
static void EnableLiveStreaming(bool Enable);UFUNCTIONBlueprintCallableCategory=Game
~ DVRStreaming API
GetPlatformName
static FString GetPlatformName();UFUNCTIONBlueprintPureCategory=Game
Returns the string name of the current platform, to perform different behavior based on platform. (Platform names include Windows, Mac, Linux, IOS, Android, consoles, etc.).
BlueprintSuggestProjectileVelocity
static bool BlueprintSuggestProjectileVelocity(const UObject* WorldContextObject, FVector& TossVelocity, FVector StartLocation, FVector EndLocation, float LaunchSpeed, float OverrideGravityZ, ESuggestProjVelocityTraceOption::Type TraceOption, float CollisionRadius, bool bFavorHighArc, bool bDrawDebug, bool bAcceptClosestOnNoSolutions = false);UFUNCTIONBlueprintCallableCategory=Game
Calculates an launch velocity for a projectile to hit a specified point.
SuggestProjectileVelocity
static bool SuggestProjectileVelocity(const FSuggestProjectileVelocityParameters& ProjectileParams, FVector& OutTossVelocity);
Native version, has more options than the Blueprint version.
IsProjectileTrajectoryBlocked
static bool IsProjectileTrajectoryBlocked(const UWorld* World, FVector StartLocation, FVector& ProjectileVelocity, float TargetDeltaXY, float GravityZ, float CollisionRadius = 0.f, ESuggestProjVelocityTraceOption::Type TraceOption = ESuggestProjVelocityTraceOption::TraceFullPath, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam, const TArray<AActor*>& ActorsToIgnore = TArray<AActor*>(), bool bDrawDebug = false);
Stepwise trace along the path of a given velocity
Blueprint_PredictProjectilePath_ByObjectType
static bool Blueprint_PredictProjectilePath_ByObjectType(const UObject* WorldContextObject, FHitResult& OutHit, TArray<FVector>& OutPathPositions, FVector& OutLastTraceDestination, FVector StartPos, FVector LaunchVelocity, bool bTracePath, float ProjectileRadius, const TArray<TEnumAsByte<EObjectTypeQuery>>& ObjectTypes, bool bTraceComplex, const TArray<AActor*>& ActorsToIgnore, EDrawDebugTrace::Type DrawDebugType, float DrawDebugTime, float SimFrequency = 15.f, float MaxSimTime = 2.f, float OverrideGravityZ = 0);UFUNCTIONBlueprintCallableCategory=Game
Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns a list of positions of the simulated arc and the destination reached by the simulation. Returns true if it hit…
Blueprint_PredictProjectilePath_ByTraceChannel
static bool Blueprint_PredictProjectilePath_ByTraceChannel(const UObject* WorldContextObject, FHitResult& OutHit, TArray<FVector>& OutPathPositions, FVector& OutLastTraceDestination, FVector StartPos, FVector LaunchVelocity, bool bTracePath, float ProjectileRadius, TEnumAsByte<ECollisionChannel> TraceChannel, bool bTraceComplex, const TArray<AActor*>& ActorsToIgnore, EDrawDebugTrace::Type DrawDebugType, float DrawDebugTime, float SimFrequency = 15.f, float MaxSimTime = 2.f, float OverrideGravityZ = 0);UFUNCTIONBlueprintCallableCategory=Game
Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns a list of positions of the simulated arc and the destination reached by the simulation. Returns true if it hit…
PredictProjectilePath
static bool PredictProjectilePath(const UObject* WorldContextObject, const FPredictProjectilePathParams& PredictParams, FPredictProjectilePathResult& PredictResult);
Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns true if it hit something.
Blueprint_PredictProjectilePath_Advanced
static bool Blueprint_PredictProjectilePath_Advanced(const UObject* WorldContextObject, const FPredictProjectilePathParams& PredictParams, FPredictProjectilePathResult& PredictResult);UFUNCTIONBlueprintCallableCategory=Game
Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns true if it hit something.
SuggestProjectileVelocity_CustomArc
static bool SuggestProjectileVelocity_CustomArc(const UObject* WorldContextObject, FVector& OutLaunchVelocity, FVector StartPos, FVector EndPos, float OverrideGravityZ = 0, float ArcParam = 0.5f);UFUNCTIONBlueprintCallableCategory=Game
Returns the launch velocity needed for a projectile at rest at StartPos to land on EndPos. Assumes a medium arc (e.g. 45 deg on level ground). Projectile velocity is variable and unconstrained. Does no tracing.
SuggestProjectileVelocity_MovingTarget
static bool SuggestProjectileVelocity_MovingTarget(const UObject* WorldContextObject, FVector& OutLaunchVelocity, FVector ProjectileStartLocation, AActor* TargetActor, FVector TargetLocationOffset = FVector::ZeroVector, double GravityZOverride = 0.f, double TimeToTarget = 1.f, EDrawDebugTrace::Type DrawDebugType = EDrawDebugTrace::Type::None, float DrawDebugTime = 3.f, FLinearColor DrawDebugColor = FLinearColor::Red);UFUNCTIONBlueprintCallableCategory=Game
Returns a launch velocity need for a projectile to hit the TargetActor in TimeToTarget seconds based on the TargetActor's current velocity. This assumes the projectile is only accelerated by gravity (i.e. no outside…
GetWorldOriginLocation
static FIntVector GetWorldOriginLocation(const UObject* WorldContextObject);UFUNCTIONBlueprintPureCategory=Game
Returns world origin current location.
SetWorldOriginLocation
static void SetWorldOriginLocation(const UObject* WorldContextObject, FIntVector NewLocation);UFUNCTIONBlueprintCallableCategory=Game
Requests a new location for a world origin.
RebaseLocalOriginOntoZero
static FVector RebaseLocalOriginOntoZero(UObject* WorldContextObject, FVector WorldLocation);UFUNCTIONBlueprintPureCategory=Game
Returns origin based position for local world location.
RebaseZeroOriginOntoLocal
static FVector RebaseZeroOriginOntoLocal(UObject* WorldContextObject, FVector WorldLocation);UFUNCTIONBlueprintPureCategory=Game
Returns local location for origin based position.
GrassOverlappingSphereCount
static int32 GrassOverlappingSphereCount(const UObject* WorldContextObject, const UStaticMesh* StaticMesh, FVector CenterPosition, float Radius);UFUNCTIONBlueprintCallableCategory=Foliage
Counts how many grass foliage instances overlap a given sphere.
DeprojectScreenToWorld
static bool DeprojectScreenToWorld(APlayerController const* Player, const FVector2D& ScreenPosition, FVector& WorldPosition, FVector& WorldDirection);UFUNCTIONBlueprintPureCategory=Camera
Transforms the given 2D screen space coordinate into a 3D world-space point and direction.
DeprojectSceneCaptureToWorld
static bool DeprojectSceneCaptureToWorld(ASceneCapture2D const* SceneCapture2D, const FVector2D& TargetUV, FVector& WorldPosition, FVector& WorldDirection);UFUNCTIONBlueprintPureCategory=Camera
Transforms the given 2D UV coordinate into a 3D world-space point and direction.
DeprojectSceneCaptureComponentToWorld
static bool DeprojectSceneCaptureComponentToWorld(USceneCaptureComponent2D* SceneCaptureComponent2D, const FVector2D& TargetUV, FVector& WorldPosition, FVector& WorldDirection);UFUNCTIONBlueprintPureCategory=Camera
Transforms the given 2D UV coordinate into a 3D world-space point and direction.
ProjectWorldToScreen
static bool ProjectWorldToScreen(APlayerController const* Player, const FVector& WorldPosition, FVector2D& ScreenPosition, bool bPlayerViewportRelative = false);UFUNCTIONBlueprintPureCategory=Camera
Transforms the given 3D world-space point into a its 2D screen space coordinate.
TransformWorldToFirstPerson
static FVector TransformWorldToFirstPerson(const FMinimalViewInfo& ViewInfo, const FVector& WorldPosition, bool bIgnoreFirstPersonScale);UFUNCTIONBlueprintPureCategory=Camera
Transforms a world space location into "first person space". This function mirrors the morphing that is applied to first person primitives when they are rendered on the GPU, so it can be used for spawning objects…
GetViewProjectionMatrix
static void GetViewProjectionMatrix(FMinimalViewInfo DesiredView, FMatrix &ViewMatrix, FMatrix &ProjectionMatrix, FMatrix &ViewProjectionMatrix);UFUNCTIONBlueprintPureCategory=Camera
Returns the View Matrix, Projection Matrix and the View x Projection Matrix for a given view
CalculateViewProjectionMatricesFromViewTarget
static void CalculateViewProjectionMatricesFromViewTarget(AActor* InViewTarget, FMatrix& OutViewMatrix, FMatrix& OutProjectionMatrix, FMatrix& OutViewProjectionMatrix);
Calculate view-projection matrices from a specified view target
CalculateViewProjectionMatricesFromMinimalView
static void CalculateViewProjectionMatricesFromMinimalView(const FMinimalViewInfo& MinimalViewInfo, const TOptional<FMatrix>& CustomProjectionMatrix, FMatrix& OutViewMatrix, FMatrix& OutProjectionMatrix, FMatrix& OutViewProjectionMatrix);
Calculate view-projection matrices from a specified MinimalViewInfo and optional custom projection matrix
GrabOption
static bool GrabOption(FString& Options, FString& ResultString);
GetKeyValue
static void GetKeyValue(const FString& Pair, FString& Key, FString& Value);UFUNCTIONBlueprintPureCategory=Game Options
Break up a key=value pair into its key and value.
ParseOption
static FString ParseOption(FString Options, const FString& Key);UFUNCTIONBlueprintPureCategory=Game Options
Find an option in the options string and return it.
HasOption
static bool HasOption(FString Options, const FString& InKey);UFUNCTIONBlueprintPureCategory=Game Options
Returns whether a key exists in an options string.
GetIntOption
static int32 GetIntOption(const FString& Options, const FString& Key, int32 DefaultValue);UFUNCTIONBlueprintPureCategory=Game Options
Find an option in the options string and return it as an integer.
HasLaunchOption
static bool HasLaunchOption(const FString& OptionToCheck);UFUNCTIONBlueprintPureCategory=Utilities
Checks the commandline to see if the desired option was specified on the commandline (e.g. -demobuild)
AnnounceAccessibleString
static void AnnounceAccessibleString(const FString& AnnouncementString);UFUNCTIONBlueprintCallableCategory=Accessibility
If accessibility is enabled, have the platform announce a string to the player. These announcements can be interrupted by system accessibiliity announcements or other accessibility announcement requests. This should…