Show / Hide Table of Contents

Class GameplayStatics

Gameplay Statics

Inheritance
System.Object
UObject
BlueprintFunctionLibrary
GameplayStatics
Inherited Members
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class GameplayStatics : BlueprintFunctionLibrary

Properties

| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static GameplayStatics DefaultObject { get; }
Property Value
Type Description
GameplayStatics
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

ActivateReverbEffect(UObject, ReverbEffect, Name, Single, Single, Single)

Activates a Reverb Effect without the need for a volume @

Declaration
public static void ActivateReverbEffect(UObject WorldContextObject, ReverbEffect ReverbEffect, Name TagName, float Priority, float Volume, float FadeTime)
Parameters
Type Name Description
UObject WorldContextObject
ReverbEffect ReverbEffect
Name TagName
System.Single Priority
System.Single Volume
System.Single FadeTime
Remarks

param ReverbEffect Reverb Effect to use @param TagName Tag to associate with Reverb Effect @param Priority Priority of the Reverb Effect @param Volume Volume level of Reverb Effect @param FadeTime Time before Reverb Effect is fully active

| Improve this Doc View Source

ApplyDamage(Actor, Single, Controller, Actor, SubclassOf<DamageType>)

Hurts the specified actor with generic damage.

Declaration
public static float ApplyDamage(Actor DamagedActor, float BaseDamage, Controller EventInstigator, Actor DamageCauser, SubclassOf<DamageType> DamageTypeClass)
Parameters
Type Name Description
Actor DamagedActor
System.Single BaseDamage
Controller EventInstigator
Actor DamageCauser
SubclassOf<DamageType> DamageTypeClass
Returns
Type Description
System.Single
Remarks

@param DamagedActor - Actor that will be damaged. @param BaseDamage - The base damage to apply. @param EventInstigator - Controller that was responsible for causing this damage (e.g. player who shot the weapon) @param DamageCauser - Actor that actually caused the damage (e.g. the grenade that exploded) @param DamageTypeClass - Class that describes the damage that was done. @return Actual damage the ended up being applied to the actor.

| Improve this Doc View Source

ApplyPointDamage(Actor, Single, Vector, HitResult, Controller, Actor, SubclassOf<DamageType>)

Hurts the specified actor with the specified impact.

Declaration
public static float ApplyPointDamage(Actor DamagedActor, float BaseDamage, Vector HitFromDirection, HitResult HitInfo, Controller EventInstigator, Actor DamageCauser, SubclassOf<DamageType> DamageTypeClass)
Parameters
Type Name Description
Actor DamagedActor
System.Single BaseDamage
Vector HitFromDirection
HitResult HitInfo
Controller EventInstigator
Actor DamageCauser
SubclassOf<DamageType> DamageTypeClass
Returns
Type Description
System.Single
Remarks

@param DamagedActor - Actor that will be damaged. @param BaseDamage - The base damage to apply. @param HitFromDirection - Direction the hit came FROM @param HitInfo - Collision or trace result that describes the hit @param EventInstigator - Controller that was responsible for causing this damage (e.g. player who shot the weapon) @param DamageCauser - Actor that actually caused the damage (e.g. the grenade that exploded) @param DamageTypeClass - Class that describes the damage that was done. @return Actual damage the ended up being applied to the actor.

| Improve this Doc View Source

ApplyRadialDamage(UObject, Single, Vector, Single, SubclassOf<DamageType>, Byte, Actor, Controller, Boolean, Byte)

Hurt locally authoritative actors within the radius.

Declaration
public static bool ApplyRadialDamage(UObject WorldContextObject, float BaseDamage, Vector Origin, float DamageRadius, SubclassOf<DamageType> DamageTypeClass, byte IgnoreActors, Actor DamageCauser, Controller InstigatedByController, bool bDoFullDamage, byte DamagePreventionChannel)
Parameters
Type Name Description
UObject WorldContextObject
System.Single BaseDamage
Vector Origin
System.Single DamageRadius
SubclassOf<DamageType> DamageTypeClass
System.Byte IgnoreActors
Actor DamageCauser
Controller InstigatedByController
System.Boolean bDoFullDamage
System.Byte DamagePreventionChannel
Returns
Type Description
System.Boolean
Remarks

Will only hit components that block the Visibility channel. @param BaseDamage - The base damage to apply, i.e. the damage at the origin. @param Origin - Epicenter of the damage area. @param DamageRadius - Radius of the damage area, from Origin @param DamageTypeClass - Class that describes the damage that was done. @param DamageCauser - Actor that actually caused the damage (e.g. the grenade that exploded). This actor will not be damaged and it will not block damage. @param InstigatedByController - Controller that was responsible for causing this damage (e.g. player who threw the grenade) @param bFullDamage - if true, damage not scaled based on distance from Origin @param DamagePreventionChannel - Damage will not be applied to victim if there is something between the origin and the victim which blocks traces on this channel @return true if damage was applied to at least one actor.

| Improve this Doc View Source

ApplyRadialDamageWithFalloff(UObject, Single, Single, Vector, Single, Single, Single, SubclassOf<DamageType>, Byte, Actor, Controller, Byte)

Hurt locally authoritative actors within the radius.

Declaration
public static bool ApplyRadialDamageWithFalloff(UObject WorldContextObject, float BaseDamage, float MinimumDamage, Vector Origin, float DamageInnerRadius, float DamageOuterRadius, float DamageFalloff, SubclassOf<DamageType> DamageTypeClass, byte IgnoreActors, Actor DamageCauser, Controller InstigatedByController, byte DamagePreventionChannel)
Parameters
Type Name Description
UObject WorldContextObject
System.Single BaseDamage
System.Single MinimumDamage
Vector Origin
System.Single DamageInnerRadius
System.Single DamageOuterRadius
System.Single DamageFalloff
SubclassOf<DamageType> DamageTypeClass
System.Byte IgnoreActors
Actor DamageCauser
Controller InstigatedByController
System.Byte DamagePreventionChannel
Returns
Type Description
System.Boolean
Remarks

Will only hit components that block the Visibility channel. @param BaseDamage - The base damage to apply, i.e. the damage at the origin. @param Origin - Epicenter of the damage area. @param DamageInnerRadius - Radius of the full damage area, from Origin @param DamageOuterRadius - Radius of the minimum damage area, from Origin @param DamageFalloff - Falloff exponent of damage from DamageInnerRadius to DamageOuterRadius @param DamageTypeClass - Class that describes the damage that was done. @param DamageCauser - Actor that actually caused the damage (e.g. the grenade that exploded) @param InstigatedByController - Controller that was responsible for causing this damage (e.g. player who threw the grenade) @param bFullDamage - if true, damage not scaled based on distance from Origin @param DamagePreventionChannel - Damage will not be applied to victim if there is something between the origin and the victim which blocks traces on this channel @return true if damage was applied to at least one actor.

| Improve this Doc View Source

AreAnyListenersWithinRange(UObject, Vector, Single)

Determines if any audio listeners are within range of the specified location @

Declaration
public static bool AreAnyListenersWithinRange(UObject WorldContextObject, Vector Location, float MaximumRange)
Parameters
Type Name Description
UObject WorldContextObject
Vector Location
System.Single MaximumRange
Returns
Type Description
System.Boolean
Remarks

param Location The location to potentially play a sound at @param MaximumRange The maximum distance away from Location that a listener can be @note This will always return false if there is no audio device, or the audio device is disabled.

| Improve this Doc View Source

AreSubtitlesEnabled()

Returns whether or not subtitles are currently enabled.

Declaration
public static bool AreSubtitlesEnabled()
Returns
Type Description
System.Boolean
Remarks

@return true if subtitles are enabled.

| Improve this Doc View Source

BeginDeferredActorSpawnFromClass(UObject, SubclassOf<Actor>, Transform, ESpawnActorCollisionHandlingMethod, Actor)

Spawns an instance of an actor class, but does not automatically run its construction script.

Declaration
public static Actor BeginDeferredActorSpawnFromClass(UObject WorldContextObject, SubclassOf<Actor> ActorClass, Transform SpawnTransform, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride, Actor Owner)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<Actor> ActorClass
Transform SpawnTransform
ESpawnActorCollisionHandlingMethod CollisionHandlingOverride
Actor Owner
Returns
Type Description
Actor
| Improve this Doc View Source

BeginSpawningActorFromBlueprint(UObject, Blueprint, Transform, Boolean)

Spawns an instance of a blueprint, but does not automatically run its construction script.

Declaration
public static Actor BeginSpawningActorFromBlueprint(UObject WorldContextObject, Blueprint Blueprint, Transform SpawnTransform, bool bNoCollisionFail)
Parameters
Type Name Description
UObject WorldContextObject
Blueprint Blueprint
Transform SpawnTransform
System.Boolean bNoCollisionFail
Returns
Type Description
Actor
| Improve this Doc View Source

BeginSpawningActorFromClass(UObject, SubclassOf<Actor>, Transform, Boolean, Actor)

Begin Spawning Actor from Class

Declaration
public static Actor BeginSpawningActorFromClass(UObject WorldContextObject, SubclassOf<Actor> ActorClass, Transform SpawnTransform, bool bNoCollisionFail, Actor Owner)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<Actor> ActorClass
Transform SpawnTransform
System.Boolean bNoCollisionFail
Actor Owner
Returns
Type Description
Actor
| Improve this Doc View Source

Blueprint_PredictProjectilePath_Advanced(UObject, PredictProjectilePathParams)

Predict the arc of a virtual projectile affected by gravity with collision checks along the arc.

Declaration
public static (PredictProjectilePathResult, bool) Blueprint_PredictProjectilePath_Advanced(UObject WorldContextObject, PredictProjectilePathParams PredictParams)
Parameters
Type Name Description
UObject WorldContextObject
PredictProjectilePathParams PredictParams
Returns
Type Description
System.ValueTuple<PredictProjectilePathResult, System.Boolean>
Remarks

Returns true if it hit something.

@param PredictParams Input params to the trace (start location, velocity, time to simulate, etc). @param PredictResult Output result of the trace (Hit result, array of location/velocity/times for each trace step, etc). @return True if hit something along the path (if tracing with collision).

| Improve this Doc View Source

Blueprint_PredictProjectilePath_ByObjectType(UObject, Vector, Vector, Boolean, Single, Byte, Boolean, Byte, Byte, Single, Single, Single, Single)

Predict the arc of a virtual projectile affected by gravity with collision checks along the arc.

Declaration
public static (HitResult, IReadOnlyCollection<Vector>, Vector, bool) Blueprint_PredictProjectilePath_ByObjectType(UObject WorldContextObject, Vector StartPos, Vector LaunchVelocity, bool bTracePath, float ProjectileRadius, byte ObjectTypes, bool bTraceComplex, byte ActorsToIgnore, byte DrawDebugType, float DrawDebugTime, float SimFrequency, float MaxSimTime, float OverrideGravityZ)
Parameters
Type Name Description
UObject WorldContextObject
Vector StartPos
Vector LaunchVelocity
System.Boolean bTracePath
System.Single ProjectileRadius
System.Byte ObjectTypes
System.Boolean bTraceComplex
System.Byte ActorsToIgnore
System.Byte DrawDebugType
System.Single DrawDebugTime
System.Single SimFrequency
System.Single MaxSimTime
System.Single OverrideGravityZ
Returns
Type Description
System.ValueTuple<HitResult, System.Collections.Generic.IReadOnlyCollection<Vector>, Vector, System.Boolean>
Remarks

Returns a list of positions of the simulated arc and the destination reached by the simulation. Returns true if it hit something.

@param OutPathPositions Predicted projectile path. Ordered series of positions from StartPos to the end. Includes location at point of impact if it hit something. @param OutHit Predicted hit result, if the projectile will hit something @param OutLastTraceDestination Goal position of the final trace it did. Will not be in the path if there is a hit. @param StartPos First start trace location @param LaunchVelocity Velocity the "virtual projectile" is launched at @param bTracePath Trace along the entire path to look for blocking hits @param ProjectileRadius Radius of the virtual projectile to sweep against the environment @param ObjectTypes ObjectTypes to trace against, if bTracePath is true. @param bTraceComplex Use TraceComplex (trace against triangles not primitives) @param ActorsToIgnore Actors to exclude from the traces @param DrawDebugType Debug type (one-frame, duration, persistent) @param DrawDebugTime Duration of debug lines (only relevant for DrawDebugType::Duration) @param SimFrequency Determines size of each sub-step in the simulation (chopping up MaxSimTime) @param MaxSimTime Maximum simulation time for the virtual projectile. @param OverrideGravityZ Optional override of Gravity (if 0, uses WorldGravityZ) @return True if hit something along the path if tracing for collision.

| Improve this Doc View Source

Blueprint_PredictProjectilePath_ByTraceChannel(UObject, Vector, Vector, Boolean, Single, Byte, Boolean, Byte, Byte, Single, Single, Single, Single)

Predict the arc of a virtual projectile affected by gravity with collision checks along the arc.

Declaration
public static (HitResult, IReadOnlyCollection<Vector>, Vector, bool) Blueprint_PredictProjectilePath_ByTraceChannel(UObject WorldContextObject, Vector StartPos, Vector LaunchVelocity, bool bTracePath, float ProjectileRadius, byte TraceChannel, bool bTraceComplex, byte ActorsToIgnore, byte DrawDebugType, float DrawDebugTime, float SimFrequency, float MaxSimTime, float OverrideGravityZ)
Parameters
Type Name Description
UObject WorldContextObject
Vector StartPos
Vector LaunchVelocity
System.Boolean bTracePath
System.Single ProjectileRadius
System.Byte TraceChannel
System.Boolean bTraceComplex
System.Byte ActorsToIgnore
System.Byte DrawDebugType
System.Single DrawDebugTime
System.Single SimFrequency
System.Single MaxSimTime
System.Single OverrideGravityZ
Returns
Type Description
System.ValueTuple<HitResult, System.Collections.Generic.IReadOnlyCollection<Vector>, Vector, System.Boolean>
Remarks

Returns a list of positions of the simulated arc and the destination reached by the simulation. Returns true if it hit something (if tracing with collision).

@param OutPathPositions Predicted projectile path. Ordered series of positions from StartPos to the end. Includes location at point of impact if it hit something. @param OutHit Predicted hit result, if the projectile will hit something @param OutLastTraceDestination Goal position of the final trace it did. Will not be in the path if there is a hit. @param StartPos First start trace location @param LaunchVelocity Velocity the "virtual projectile" is launched at @param bTracePath Trace along the entire path to look for blocking hits @param ProjectileRadius Radius of the virtual projectile to sweep against the environment @param TraceChannel TraceChannel to trace against, if bTracePath is true. @param bTraceComplex Use TraceComplex (trace against triangles not primitives) @param ActorsToIgnore Actors to exclude from the traces @param DrawDebugType Debug type (one-frame, duration, persistent) @param DrawDebugTime Duration of debug lines (only relevant for DrawDebugType::Duration) @param SimFrequency Determines size of each sub-step in the simulation (chopping up MaxSimTime) @param MaxSimTime Maximum simulation time for the virtual projectile. @param OverrideGravityZ Optional override of Gravity (if 0, uses WorldGravityZ) @return True if hit something along the path (if tracing with collision).

| Improve this Doc View Source

BlueprintSuggestProjectileVelocity(UObject, Vector, Vector, Single, Single, Byte, Single, Boolean, Boolean)

Calculates an launch velocity for a projectile to hit a specified point.

Declaration
public static (Vector, bool) BlueprintSuggestProjectileVelocity(UObject WorldContextObject, Vector StartLocation, Vector EndLocation, float LaunchSpeed, float OverrideGravityZ, byte TraceOption, float CollisionRadius, bool bFavorHighArc, bool bDrawDebug)
Parameters
Type Name Description
UObject WorldContextObject
Vector StartLocation
Vector EndLocation
System.Single LaunchSpeed
System.Single OverrideGravityZ
System.Byte TraceOption
System.Single CollisionRadius
System.Boolean bFavorHighArc
System.Boolean bDrawDebug
Returns
Type Description
System.ValueTuple<Vector, System.Boolean>
Remarks

@param TossVelocity (output) Result launch velocity. @param StartLocation Intended launch location @param EndLocation Desired landing location @param LaunchSpeed Desired launch speed @param OverrideGravityZ Optional gravity override. 0 means "do not override". @param TraceOption Controls whether or not to validate a clear path by tracing along the calculated arc @param CollisionRadius Radius of the projectile (assumed spherical), used when tracing @param bFavorHighArc If true and there are 2 valid solutions, will return the higher arc. If false, will favor the lower arc. @param bDrawDebug When true, a debug arc is drawn (red for an invalid arc, green for a valid arc) @return Returns false if there is no valid solution or the valid solutions are blocked. Returns true otherwise.

| Improve this Doc View Source

BreakHitResult(HitResult)

Extracts data from a HitResult.

Declaration
public static (bool, bool, float, float, Vector, Vector, Vector, Vector, PhysicalMaterial, Actor, PrimitiveComponent, Name, int, int, Vector, Vector) BreakHitResult(HitResult Hit)
Parameters
Type Name Description
HitResult Hit
Returns
Type Description
System.ValueTuple<System.Boolean, System.Boolean, System.Single, System.Single, Vector, Vector, Vector, System.ValueTuple<Vector, PhysicalMaterial, Actor, PrimitiveComponent, Name, System.Int32, System.Int32, System.ValueTuple<Vector, Vector>>>
Remarks

@param Hit The source HitResult. @param bBlockingHit True if there was a blocking hit, false otherwise. @param bInitialOverlap True if the hit started in an initial overlap. In this case some other values should be interpreted differently. Time will be 0, ImpactPoint will equal Location, and normals will be equal and indicate a depenetration vector. @param Time 'Time' of impact along trace direction ranging from [0.0 to 1.0) if there is a hit, indicating time between start and end. Equals 1.0 if there is no hit. @param Distance The distance from the TraceStart to the Location in world space. This value is 0 if there was an initial overlap (trace started inside another colliding object). @param Location Location of the hit in world space. If this was a swept shape test, this is the location where we can place the shape in the world where it will not penetrate. @param Normal Normal of the hit in world space, for the object that was swept (e.g. for a sphere trace this points towards the sphere's center). Equal to ImpactNormal for line tests. @param ImpactPoint Location of the actual contact point of the trace shape with the surface of the hit object. Equal to Location in the case of an initial overlap. @param ImpactNormal Normal of the hit in world space, for the object that was hit by the sweep. @param PhysMat Physical material that was hit. Must set bReturnPhysicalMaterial to true in the query params for this to be returned. @param HitActor Actor hit by the trace. @param HitComponent PrimitiveComponent hit by the trace. @param HitBoneName Name of the bone hit (valid only if we hit a skeletal mesh). @param HitItem Primitive-specific data recording which item in the primitive was hit @param FaceIndex If colliding with trimesh or landscape, index of face that was hit.

| Improve this Doc View Source

CancelAsyncLoading()

Cancels all currently queued streaming packages

Declaration
public static void CancelAsyncLoading()
| Improve this Doc View Source

ClearSoundMixClassOverride(UObject, SoundMix, SoundClass, Single)

Clears the override of the sound class adjuster in the given sound mix.

Declaration
public static void ClearSoundMixClassOverride(UObject WorldContextObject, SoundMix InSoundMixModifier, SoundClass InSoundClass, float FadeOutTime)
Parameters
Type Name Description
UObject WorldContextObject
SoundMix InSoundMixModifier
SoundClass InSoundClass
System.Single FadeOutTime
Remarks

If the override did not exist in the sound mix, this will do nothing. @param InSoundMixModifier The sound mix to modify. @param InSoundClass The sound class to override (or add) in the sound mix. @param FadeOutTime The interpolation time to use to go from the current sound class adjuster override values to the non-override values.

| Improve this Doc View Source

ClearSoundMixModifiers(UObject)

Clear all sound mix modifiers from the audio system *

Declaration
public static void ClearSoundMixModifiers(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
| Improve this Doc View Source

CreatePlayer(UObject, Int32, Boolean)

Create a new player for this game.

Declaration
public static PlayerController CreatePlayer(UObject WorldContextObject, int ControllerId, bool bSpawnPawn)
Parameters
Type Name Description
UObject WorldContextObject
System.Int32 ControllerId
System.Boolean bSpawnPawn
Returns
Type Description
PlayerController
Remarks

@param ControllerId The ID of the controller that the should control the newly created player. A value of -1 specifies to use the next available ID @param bSpawnPawn Whether a pawn should be spawned immediately. If false a pawn will not be created until transition to the next map.

| Improve this Doc View Source

CreateSaveGameObject(SubclassOf<SaveGame>)

Create a new, empty SaveGame object to set data on and then pass to SaveGameToSlot.

Declaration
public static SaveGame CreateSaveGameObject(SubclassOf<SaveGame> SaveGameClass)
Parameters
Type Name Description
SubclassOf<SaveGame> SaveGameClass
Returns
Type Description
SaveGame
Remarks

@param SaveGameClass Class of SaveGame to create @return New SaveGame object to write data to

| Improve this Doc View Source

CreateSaveGameObjectFromBlueprint(Blueprint)

Create a new, empty SaveGame object to set data on and then pass to SaveGameToSlot.

Declaration
public static SaveGame CreateSaveGameObjectFromBlueprint(Blueprint SaveGameBlueprint)
Parameters
Type Name Description
Blueprint SaveGameBlueprint
Returns
Type Description
SaveGame
Remarks

@param SaveGameBlueprint Blueprint of SaveGame to create @return New SaveGame object to write data to

| Improve this Doc View Source

CreateSound2D(UObject, SoundBase, Single, Single, Single, SoundConcurrency, Boolean, Boolean)

Creates a sound with no attenuation, perfect for UI sounds.

Declaration
public static AudioComponent CreateSound2D(UObject WorldContextObject, SoundBase Sound, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundConcurrency ConcurrencySettings, bool bPersistAcrossLevelTransition, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
SoundBase Sound
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundConcurrency ConcurrencySettings
System.Boolean bPersistAcrossLevelTransition
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks

This does NOT play the sound

  • Not Replicated. @param Sound - Sound to create. @param VolumeMultiplier - Multiplied with the volume to make the sound louder or softer. @param PitchMultiplier - Multiplies the pitch. @param StartTime - How far in to the sound to begin playback at @param ConcurrencySettings - Override concurrency settings package to play sound with @param PersistAcrossLevelTransition - Whether the sound should continue to play when the map it was played in is unloaded @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return An audio component to manipulate the created sound
| Improve this Doc View Source

DeactivateReverbEffect(UObject, Name)

Deactivates a Reverb Effect not applied by a volume @

Declaration
public static void DeactivateReverbEffect(UObject WorldContextObject, Name TagName)
Parameters
Type Name Description
UObject WorldContextObject
Name TagName
Remarks

param TagName Tag associated with Reverb Effect to remove

| Improve this Doc View Source

DeleteGameInSlot(String, Int32)

Delete a save game in a particular slot.

Declaration
public static bool DeleteGameInSlot(string SlotName, int UserIndex)
Parameters
Type Name Description
System.String SlotName
System.Int32 UserIndex
Returns
Type Description
System.Boolean
Remarks

@param SlotName Name of save game slot to delete. @param UserIndex For some platforms, master user index to identify the user doing the deletion. @return True if a file was actually able to be deleted. use DoesSaveGameExist to distinguish between delete failures and failure due to file not existing.

| Improve this Doc View Source

DeprojectScreenToWorld(PlayerController, Vector2D)

Transforms the given 2D screen space coordinate into a 3D world-space point and direction.

Declaration
public static (Vector, Vector, bool) DeprojectScreenToWorld(PlayerController Player, Vector2D ScreenPosition)
Parameters
Type Name Description
PlayerController Player
Vector2D ScreenPosition
Returns
Type Description
System.ValueTuple<Vector, Vector, System.Boolean>
Remarks

@param Player Deproject using this player's view. @param ScreenPosition 2D screen space to deproject. @param WorldPosition (out) Corresponding 3D position in world space. @param WorldDirection (out) World space direction vector away from the camera at the given 2d point.

| Improve this Doc View Source

DoesSaveGameExist(String, Int32)

See if a save game exists with the specified name.

Declaration
public static bool DoesSaveGameExist(string SlotName, int UserIndex)
Parameters
Type Name Description
System.String SlotName
System.Int32 UserIndex
Returns
Type Description
System.Boolean
Remarks

@param SlotName Name of save game slot. @param UserIndex For some platforms, master user index to identify the user doing the saving.

| Improve this Doc View Source

EnableLiveStreaming(Boolean)

Toggle live DVR streaming.

Declaration
public static void EnableLiveStreaming(bool Enable)
Parameters
Type Name Description
System.Boolean Enable
Remarks

@param Enable If true enable streaming, otherwise disable.

| Improve this Doc View Source

FindCollisionUV(HitResult, Int32)

Try and find the UV for a collision impact. Note this ONLY works if 'Support UV From Hit Results' is enabled in Physics Settings.

Declaration
public static (Vector2D, bool) FindCollisionUV(HitResult Hit, int UVChannel)
Parameters
Type Name Description
HitResult Hit
System.Int32 UVChannel
Returns
Type Description
System.ValueTuple<Vector2D, System.Boolean>
| Improve this Doc View Source

FinishSpawningActor(Actor, Transform)

'Finish' spawning an actor. This will run the construction script.

Declaration
public static Actor FinishSpawningActor(Actor Actor, Transform SpawnTransform)
Parameters
Type Name Description
Actor Actor
Transform SpawnTransform
Returns
Type Description
Actor
| Improve this Doc View Source

FlushLevelStreaming(UObject)

Flushes level streaming in blocking fashion and returns when all sub-levels are loaded / visible / hidden

Declaration
public static void FlushLevelStreaming(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
| Improve this Doc View Source

GetAccurateRealTime(UObject)

Get Accurate Real Time

Declaration
public static (int, float) GetAccurateRealTime(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.ValueTuple<System.Int32, System.Single>
| Improve this Doc View Source

GetActorArrayAverageLocation(Byte)

Find the average location (centroid) of an array of Actors

Declaration
public static Vector GetActorArrayAverageLocation(byte Actors)
Parameters
Type Name Description
System.Byte Actors
Returns
Type Description
Vector
| Improve this Doc View Source

GetActorArrayBounds(Byte, Boolean)

Bind the bounds of an array of Actors

Declaration
public static (Vector, Vector) GetActorArrayBounds(byte Actors, bool bOnlyCollidingComponents)
Parameters
Type Name Description
System.Byte Actors
System.Boolean bOnlyCollidingComponents
Returns
Type Description
System.ValueTuple<Vector, Vector>
| Improve this Doc View Source

GetAllActorsOfClass(UObject, SubclassOf<Actor>)

Find all Actors in the world of the specified class.

Declaration
public static IReadOnlyCollection<Actor> GetAllActorsOfClass(UObject WorldContextObject, SubclassOf<Actor> ActorClass)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<Actor> ActorClass
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<Actor>
Remarks

This is a slow operation, use with caution e.g. do not use every frame. @param ActorClass Class of Actor to find. Must be specified or result array will be empty. @param OutActors Output array of Actors of the specified class.

| Improve this Doc View Source

GetAllActorsWithInterface(UObject, SubclassOf<Interface>)

Find all Actors in the world with the specified interface.

Declaration
public static IReadOnlyCollection<Actor> GetAllActorsWithInterface(UObject WorldContextObject, SubclassOf<Interface> Interface)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<Interface> Interface
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<Actor>
Remarks

This is a slow operation, use with caution e.g. do not use every frame. @param Interface Interface to find. Must be specified or result array will be empty. @param OutActors Output array of Actors of the specified interface.

| Improve this Doc View Source

GetAllActorsWithTag(UObject, Name)

Find all Actors in the world with the specified tag.

Declaration
public static IReadOnlyCollection<Actor> GetAllActorsWithTag(UObject WorldContextObject, Name Tag)
Parameters
Type Name Description
UObject WorldContextObject
Name Tag
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<Actor>
Remarks

This is a slow operation, use with caution e.g. do not use every frame. @param Tag Tag to find. Must be specified or result array will be empty. @param OutActors Output array of Actors of the specified tag.

| Improve this Doc View Source

GetAudioTimeSeconds(UObject)

Returns time in seconds since world was brought up for play, IS stopped when game pauses, NOT dilated/clamped.

Declaration
public static float GetAudioTimeSeconds(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetCurrentLevelName(UObject, Boolean)

Get the name of the currently-open level.

Declaration
public static string GetCurrentLevelName(UObject WorldContextObject, bool bRemovePrefixString)
Parameters
Type Name Description
UObject WorldContextObject
System.Boolean bRemovePrefixString
Returns
Type Description
System.String
Remarks

@param bRemovePrefixString remove any streaming- or editor- added prefixes from the level name.

| Improve this Doc View Source

GetCurrentReverbEffect(UObject)

Returns the highest priority reverb settings currently active from any source (volumes or manual setting).

Declaration
public static ReverbEffect GetCurrentReverbEffect(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
ReverbEffect
| Improve this Doc View Source

GetEnableWorldRendering(UObject)

Returns the world rendering state @

Declaration
public static bool GetEnableWorldRendering(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Boolean
Remarks

return Whether the world should be rendered or not

| Improve this Doc View Source

GetGameInstance(UObject)

Returns the game instance object

Declaration
public static GameInstance GetGameInstance(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
GameInstance
| Improve this Doc View Source

GetGameMode(UObject)

Returns the current GameModeBase or Null if it can't be retrieved, such as on the client

Declaration
public static GameModeBase GetGameMode(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
GameModeBase
| Improve this Doc View Source

GetGameState(UObject)

Returns the current GameStateBase or Null if it can't be retrieved

Declaration
public static GameStateBase GetGameState(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
GameStateBase
| Improve this Doc View Source

GetGlobalTimeDilation(UObject)

Gets the current global time dilation.

Declaration
public static float GetGlobalTimeDilation(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
Remarks

@return Current time dilation.

| Improve this Doc View Source

GetIntOption(String, String, Int32)

Find an option in the options string and return it as an integer.

Declaration
public static int GetIntOption(string Options, string Key, int DefaultValue)
Parameters
Type Name Description
System.String Options
System.String Key
System.Int32 DefaultValue
Returns
Type Description
System.Int32
Remarks

@param Options The string containing the options. @param Key The key to find the value of in Options. @return The value associated with Key as an integer if Key found in Options string, otherwise DefaultValue.

| Improve this Doc View Source

GetKeyValue(String)

Break up a key=value pair into its key and value.

Declaration
public static (string, string) GetKeyValue(string Pair)
Parameters
Type Name Description
System.String Pair
Returns
Type Description
System.ValueTuple<System.String, System.String>
Remarks

@param Pair The string containing a pair to split apart. @param Key (out) Key portion of Pair. If no = in string will be the same as Pair. @param Value (out) Value portion of Pair. If no = in string will be empty.

| Improve this Doc View Source

GetObjectClass(UObject)

Returns the class of a passed in Object, will always be valid if Object is not NULL

Declaration
public static SubclassOf<UObject> GetObjectClass(UObject UObject)
Parameters
Type Name Description
UObject UObject
Returns
Type Description
SubclassOf<UObject>
| Improve this Doc View Source

GetPlatformName()

Returns the string name of the current platform, to perform different behavior based on platform.

Declaration
public static string GetPlatformName()
Returns
Type Description
System.String
Remarks

(Platform names include Windows, Mac, IOS, Android, PS4, XboxOne, HTML5, Linux)

| Improve this Doc View Source

GetPlayerCameraManager(UObject, Int32)

Returns the player's camera manager for the specified player index

Declaration
public static PlayerCameraManager GetPlayerCameraManager(UObject WorldContextObject, int PlayerIndex)
Parameters
Type Name Description
UObject WorldContextObject
System.Int32 PlayerIndex
Returns
Type Description
PlayerCameraManager
| Improve this Doc View Source

GetPlayerCharacter(UObject, Int32)

Returns the player character (NULL if the player pawn doesn't exist OR is not a character) at the specified player index

Declaration
public static Character GetPlayerCharacter(UObject WorldContextObject, int PlayerIndex)
Parameters
Type Name Description
UObject WorldContextObject
System.Int32 PlayerIndex
Returns
Type Description
Character
| Improve this Doc View Source

GetPlayerController(UObject, Int32)

Returns the player controller at the specified player index

Declaration
public static PlayerController GetPlayerController(UObject WorldContextObject, int PlayerIndex)
Parameters
Type Name Description
UObject WorldContextObject
System.Int32 PlayerIndex
Returns
Type Description
PlayerController
| Improve this Doc View Source

GetPlayerControllerID(PlayerController)

Gets what controller ID a Player is using @

Declaration
public static int GetPlayerControllerID(PlayerController Player)
Parameters
Type Name Description
PlayerController Player
Returns
Type Description
System.Int32
Remarks

param Player The player controller of the player to get the ID of @return The ID of the passed in player. -1 if there is no controller for the passed in player

| Improve this Doc View Source

GetPlayerPawn(UObject, Int32)

Returns the player pawn at the specified player index

Declaration
public static Pawn GetPlayerPawn(UObject WorldContextObject, int PlayerIndex)
Parameters
Type Name Description
UObject WorldContextObject
System.Int32 PlayerIndex
Returns
Type Description
Pawn
| Improve this Doc View Source

GetRealTimeSeconds(UObject)

Returns time in seconds since world was brought up for play, does NOT stop when game pauses, NOT dilated/clamped

Declaration
public static float GetRealTimeSeconds(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetStreamingLevel(UObject, Name)

Returns level streaming object with specified level package name

Declaration
public static LevelStreaming GetStreamingLevel(UObject WorldContextObject, Name PackageName)
Parameters
Type Name Description
UObject WorldContextObject
Name PackageName
Returns
Type Description
LevelStreaming
| Improve this Doc View Source

GetSurfaceType(HitResult)

Returns the EPhysicalSurface type of the given Hit.

Declaration
public static byte GetSurfaceType(HitResult Hit)
Parameters
Type Name Description
HitResult Hit
Returns
Type Description
System.Byte
Remarks

To edit surface type for your project, use ProjectSettings/Physics/PhysicalSurface section

| Improve this Doc View Source

GetTimeSeconds(UObject)

Returns time in seconds since world was brought up for play, adjusted by time dilation and IS stopped when game pauses

Declaration
public static float GetTimeSeconds(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetUnpausedTimeSeconds(UObject)

Returns time in seconds since world was brought up for play, adjusted by time dilation and IS NOT stopped when game pauses

Declaration
public static float GetUnpausedTimeSeconds(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetWorldDeltaSeconds(UObject)

Returns the frame delta time in seconds, adjusted by time dilation.

Declaration
public static float GetWorldDeltaSeconds(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Single
| Improve this Doc View Source

GetWorldOriginLocation(UObject)

Returns world origin current location.

Declaration
public static IntVector GetWorldOriginLocation(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
IntVector
| Improve this Doc View Source

GrassOverlappingSphereCount(UObject, StaticMesh, Vector, Single)

Counts how many grass foliage instances overlap a given sphere.

Declaration
public static int GrassOverlappingSphereCount(UObject WorldContextObject, StaticMesh StaticMesh, Vector CenterPosition, float Radius)
Parameters
Type Name Description
UObject WorldContextObject
StaticMesh StaticMesh
Vector CenterPosition
System.Single Radius
Returns
Type Description
System.Int32
Remarks

@param Mesh The static mesh we are interested in counting. @param CenterPosition The center position of the sphere. @param Radius The radius of the sphere.

@return Number of foliage instances with their mesh set to Mesh that overlap the sphere.

| Improve this Doc View Source

HasLaunchOption(String)

Checks the commandline to see if the desired option was specified on the commandline (e.

Declaration
public static bool HasLaunchOption(string OptionToCheck)
Parameters
Type Name Description
System.String OptionToCheck
Returns
Type Description
System.Boolean
Remarks

g. -demobuild) @return True if the launch option was specified on the commandline, false otherwise

| Improve this Doc View Source

HasOption(String, String)

Returns whether a key exists in an options string.

Declaration
public static bool HasOption(string Options, string InKey)
Parameters
Type Name Description
System.String Options
System.String InKey
Returns
Type Description
System.Boolean
Remarks

@param Options The string containing the options. @param Key The key to determine if it exists in Options. @return Whether Key was found in Options.

| Improve this Doc View Source

IsGamePaused(UObject)

Returns the game's paused state @

Declaration
public static bool IsGamePaused(UObject WorldContextObject)
Parameters
Type Name Description
UObject WorldContextObject
Returns
Type Description
System.Boolean
Remarks

return Whether the game is currently paused or not

| Improve this Doc View Source

LoadGameFromSlot(String, Int32)

Load the contents from a given slot.

Declaration
public static SaveGame LoadGameFromSlot(string SlotName, int UserIndex)
Parameters
Type Name Description
System.String SlotName
System.Int32 UserIndex
Returns
Type Description
SaveGame
Remarks

@param SlotName Name of the save game slot to load from. @param UserIndex For some platforms, master user index to identify the user doing the loading. @return SaveGameObject Object containing loaded game state (NULL if load fails)

| Improve this Doc View Source

LoadStreamLevel(UObject, Name, Boolean, Boolean, LatentActionInfo)

Stream the level with the LevelName ; Calling again before it finishes has no effect

Declaration
public static void LoadStreamLevel(UObject WorldContextObject, Name LevelName, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, LatentActionInfo LatentInfo)
Parameters
Type Name Description
UObject WorldContextObject
Name LevelName
System.Boolean bMakeVisibleAfterLoad
System.Boolean bShouldBlockOnLoad
LatentActionInfo LatentInfo
| Improve this Doc View Source

MakeHitResult(Boolean, Boolean, Single, Single, Vector, Vector, Vector, Vector, PhysicalMaterial, Actor, PrimitiveComponent, Name, Int32, Int32, Vector, Vector)

Create a HitResult struct @

Declaration
public static HitResult MakeHitResult(bool bBlockingHit, bool bInitialOverlap, float Time, float Distance, Vector Location, Vector ImpactPoint, Vector Normal, Vector ImpactNormal, PhysicalMaterial PhysMat, Actor HitActor, PrimitiveComponent HitComponent, Name HitBoneName, int HitItem, int FaceIndex, Vector TraceStart, Vector TraceEnd)
Parameters
Type Name Description
System.Boolean bBlockingHit
System.Boolean bInitialOverlap
System.Single Time
System.Single Distance
Vector Location
Vector ImpactPoint
Vector Normal
Vector ImpactNormal
PhysicalMaterial PhysMat
Actor HitActor
PrimitiveComponent HitComponent
Name HitBoneName
System.Int32 HitItem
System.Int32 FaceIndex
Vector TraceStart
Vector TraceEnd
Returns
Type Description
HitResult
Remarks

param Hit The source HitResult. @param bBlockingHit True if there was a blocking hit, false otherwise. @param bInitialOverlap True if the hit started in an initial overlap. In this case some other values should be interpreted differently. Time will be 0, ImpactPoint will equal Location, and normals will be equal and indicate a depenetration vector. @param Time 'Time' of impact along trace direction ranging from [0.0 to 1.0) if there is a hit, indicating time between start and end. Equals 1.0 if there is no hit. @param Distance The distance from the TraceStart to the Location in world space. This value is 0 if there was an initial overlap (trace started inside another colliding object). @param Location Location of the hit in world space. If this was a swept shape test, this is the location where we can place the shape in the world where it will not penetrate. @param Normal Normal of the hit in world space, for the object that was swept (e.g. for a sphere trace this points towards the sphere's center). Equal to ImpactNormal for line tests. @param ImpactPoint Location of the actual contact point of the trace shape with the surface of the hit object. Equal to Location in the case of an initial overlap. @param ImpactNormal Normal of the hit in world space, for the object that was hit by the sweep. @param PhysMat Physical material that was hit. Must set bReturnPhysicalMaterial to true in the query params for this to be returned. @param HitActor Actor hit by the trace. @param HitComponent PrimitiveComponent hit by the trace. @param HitBoneName Name of the bone hit (valid only if we hit a skeletal mesh). @param HitItem Primitive-specific data recording which item in the primitive was hit @param FaceIndex If colliding with trimesh or landscape, index of face that was hit.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static GameplayStatics New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
GameplayStatics
| Improve this Doc View Source

OpenLevel(UObject, Name, Boolean, String)

Travel to another level @

Declaration
public static void OpenLevel(UObject WorldContextObject, Name LevelName, bool bAbsolute, string Options)
Parameters
Type Name Description
UObject WorldContextObject
Name LevelName
System.Boolean bAbsolute
System.String Options
Remarks

param LevelName the level to open @param bAbsolute if true options are reset, if false options are carried over from current level @param Options a string of options to use for the travel URL

| Improve this Doc View Source

ParseOption(String, String)

Find an option in the options string and return it.

Declaration
public static string ParseOption(string Options, string Key)
Parameters
Type Name Description
System.String Options
System.String Key
Returns
Type Description
System.String
Remarks

@param Options The string containing the options. @param Key The key to find the value of in Options. @return The value associated with Key if Key found in Options string.

| Improve this Doc View Source

PlayDialogue2D(UObject, DialogueWave, DialogueContext, Single, Single, Single)

Plays a dialogue directly with no attenuation, perfect for UI.

Declaration
public static void PlayDialogue2D(UObject WorldContextObject, DialogueWave Dialogue, DialogueContext Context, float VolumeMultiplier, float PitchMultiplier, float StartTime)
Parameters
Type Name Description
UObject WorldContextObject
DialogueWave Dialogue
DialogueContext Context
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
Remarks
  • Fire and Forget.
  • Not Replicated. @param Dialogue - dialogue to play @param Context - context the dialogue is to play in @param VolumeMultiplier - Multiplied with the volume to make the sound louder or softer. @param PitchMultiplier - Multiplies the pitch. @param StartTime - How far in to the dialogue to begin playback at
| Improve this Doc View Source

PlayDialogueAtLocation(UObject, DialogueWave, DialogueContext, Vector, Rotator, Single, Single, Single, SoundAttenuation)

Plays a dialogue at the given location.

Declaration
public static void PlayDialogueAtLocation(UObject WorldContextObject, DialogueWave Dialogue, DialogueContext Context, Vector Location, Rotator Rotation, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings)
Parameters
Type Name Description
UObject WorldContextObject
DialogueWave Dialogue
DialogueContext Context
Vector Location
Rotator Rotation
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
Remarks

This is a fire and forget sound and does not travel with any actor. Replication is also not handled at this point. @param Dialogue - dialogue to play @param Context - context the dialogue is to play in @param Location - World position to play dialogue at @param Rotation - World rotation to play dialogue at @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - Pitch multiplier @param StartTime - How far in to the dialogue to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with

| Improve this Doc View Source

PlaySound2D(UObject, SoundBase, Single, Single, Single, SoundConcurrency, Actor)

Plays a sound directly with no attenuation, perfect for UI sounds.

Declaration
public static void PlaySound2D(UObject WorldContextObject, SoundBase Sound, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundConcurrency ConcurrencySettings, Actor OwningActor)
Parameters
Type Name Description
UObject WorldContextObject
SoundBase Sound
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundConcurrency ConcurrencySettings
Actor OwningActor
Remarks
  • Fire and Forget.
  • Not Replicated. @param Sound - Sound to play. @param VolumeMultiplier - Multiplied with the volume to make the sound louder or softer. @param PitchMultiplier - Multiplies the pitch. @param ConcurrencySettings - Override concurrency settings package to play sound with @param StartTime - How far in to the sound to begin playback at @param ConcurrencySettings - Override concurrency settings package to play sound with @param OwningActor - The actor to use as the "owner" for concurrency settings purposes. Allows PlaySound calls to do a concurrency limit per owner.
| Improve this Doc View Source

PlaySoundAtLocation(UObject, SoundBase, Vector, Rotator, Single, Single, Single, SoundAttenuation, SoundConcurrency, Actor)

Plays a sound at the given location.

Declaration
public static void PlaySoundAtLocation(UObject WorldContextObject, SoundBase Sound, Vector Location, Rotator Rotation, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings, SoundConcurrency ConcurrencySettings, Actor OwningActor)
Parameters
Type Name Description
UObject WorldContextObject
SoundBase Sound
Vector Location
Rotator Rotation
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
SoundConcurrency ConcurrencySettings
Actor OwningActor
Remarks

This is a fire and forget sound and does not travel with any actor. Replication is also not handled at this point. @param Sound - sound to play @param Location - World position to play sound at @param Rotation - World rotation to play sound at @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - PitchMultiplier @param StartTime - How far in to the sound to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with @param ConcurrencySettings - Override concurrency settings package to play sound with @param OwningActor - The actor to use as the "owner" for concurrency settings purposes. Allows PlaySound calls to do a concurrency limit per owner.

| Improve this Doc View Source

PlayWorldCameraShake(UObject, SubclassOf<CameraShake>, Vector, Single, Single, Single, Boolean)

Plays an in-world camera shake that affects all nearby local players, with distance-based attenuation.

Declaration
public static void PlayWorldCameraShake(UObject WorldContextObject, SubclassOf<CameraShake> Shake, Vector Epicenter, float InnerRadius, float OuterRadius, float Falloff, bool bOrientShakeTowardsEpicenter)
Parameters
Type Name Description
UObject WorldContextObject
SubclassOf<CameraShake> Shake
Vector Epicenter
System.Single InnerRadius
System.Single OuterRadius
System.Single Falloff
System.Boolean bOrientShakeTowardsEpicenter
Remarks

Does not replicate. @param WorldContextObject - Object that we can obtain a world context from @param Shake - Camera shake asset to use @param Epicenter - location to place the effect in world space @param InnerRadius - Cameras inside this radius are ignored @param OuterRadius - Cameras outside of InnerRadius and inside this are effected @param Falloff - Affects falloff of effect as it nears OuterRadius @param bOrientShakeTowardsEpicenter - Changes the rotation of shake to point towards epicenter instead of forward

| Improve this Doc View Source

PopSoundMixModifier(UObject, SoundMix)

Pop a sound mix modifier from the audio system *

Declaration
public static void PopSoundMixModifier(UObject WorldContextObject, SoundMix InSoundMixModifier)
Parameters
Type Name Description
UObject WorldContextObject
SoundMix InSoundMixModifier
| Improve this Doc View Source

ProjectWorldToScreen(PlayerController, Vector, Boolean)

Transforms the given 3D world-space point into a its 2D screen space coordinate.

Declaration
public static (Vector2D, bool) ProjectWorldToScreen(PlayerController Player, Vector WorldPosition, bool bPlayerViewportRelative)
Parameters
Type Name Description
PlayerController Player
Vector WorldPosition
System.Boolean bPlayerViewportRelative
Returns
Type Description
System.ValueTuple<Vector2D, System.Boolean>
Remarks

@param Player Project using this player's view. @param WorldPosition World position to project. @param ScreenPosition (out) Corresponding 2D position in screen space @param bPlayerViewportRelative Should this be relative to the player viewport subregion (useful when using player attached widgets in split screen)

| Improve this Doc View Source

PushSoundMixModifier(UObject, SoundMix)

Push a sound mix modifier onto the audio system *

Declaration
public static void PushSoundMixModifier(UObject WorldContextObject, SoundMix InSoundMixModifier)
Parameters
Type Name Description
UObject WorldContextObject
SoundMix InSoundMixModifier
| Improve this Doc View Source

RebaseLocalOriginOntoZero(UObject, Vector)

Returns origin based position for local world location.

Declaration
public static Vector RebaseLocalOriginOntoZero(UObject WorldContextObject, Vector WorldLocation)
Parameters
Type Name Description
UObject WorldContextObject
Vector WorldLocation
Returns
Type Description
Vector
| Improve this Doc View Source

RebaseZeroOriginOntoLocal(UObject, Vector)

Returns local location for origin based position.

Declaration
public static Vector RebaseZeroOriginOntoLocal(UObject WorldContextObject, Vector WorldLocation)
Parameters
Type Name Description
UObject WorldContextObject
Vector WorldLocation
Returns
Type Description
Vector
| Improve this Doc View Source

RemovePlayer(PlayerController, Boolean)

Removes a player from this game.

Declaration
public static void RemovePlayer(PlayerController Player, bool bDestroyPawn)
Parameters
Type Name Description
PlayerController Player
System.Boolean bDestroyPawn
Remarks

@param Player The player controller of the player to be removed @param bDestroyPawn Whether the controlled pawn should be deleted as well

| Improve this Doc View Source

SaveGameToSlot(SaveGame, String, Int32)

Save the contents of the SaveGameObject to a slot.

Declaration
public static bool SaveGameToSlot(SaveGame SaveGameObject, string SlotName, int UserIndex)
Parameters
Type Name Description
SaveGame SaveGameObject
System.String SlotName
System.Int32 UserIndex
Returns
Type Description
System.Boolean
Remarks

@param SaveGameObject Object that contains data about the save game that we want to write out @param SlotName Name of save game slot to save to. @param UserIndex For some platforms, master user index to identify the user doing the saving. @return Whether we successfully saved this information

| Improve this Doc View Source

SetBaseSoundMix(UObject, SoundMix)

Set the sound mix of the audio system for special EQing *

Declaration
public static void SetBaseSoundMix(UObject WorldContextObject, SoundMix InSoundMix)
Parameters
Type Name Description
UObject WorldContextObject
SoundMix InSoundMix
| Improve this Doc View Source

SetEnableWorldRendering(UObject, Boolean)

Enabled rendering of the world @

Declaration
public static void SetEnableWorldRendering(UObject WorldContextObject, bool bEnable)
Parameters
Type Name Description
UObject WorldContextObject
System.Boolean bEnable
Remarks

param bEnable Whether the world should be rendered or not

| Improve this Doc View Source

SetGamePaused(UObject, Boolean)

Sets the game's paused state @

Declaration
public static bool SetGamePaused(UObject WorldContextObject, bool bPaused)
Parameters
Type Name Description
UObject WorldContextObject
System.Boolean bPaused
Returns
Type Description
System.Boolean
Remarks

param bPaused Whether the game should be paused or not @return Whether the game was successfully paused/unpaused

| Improve this Doc View Source

SetGlobalListenerFocusParameters(UObject, Single, Single, Single, Single, Single, Single, Single, Single)

Declaration
public static void SetGlobalListenerFocusParameters(UObject WorldContextObject, float FocusAzimuthScale, float NonFocusAzimuthScale, float FocusDistanceScale, float NonFocusDistanceScale, float FocusVolumeScale, float NonFocusVolumeScale, float FocusPriorityScale, float NonFocusPriorityScale)
Parameters
Type Name Description
UObject WorldContextObject
System.Single FocusAzimuthScale
System.Single NonFocusAzimuthScale
System.Single FocusDistanceScale
System.Single NonFocusDistanceScale
System.Single FocusVolumeScale
System.Single NonFocusVolumeScale
System.Single FocusPriorityScale
System.Single NonFocusPriorityScale
| Improve this Doc View Source

SetGlobalPitchModulation(UObject, Single, Single)

Sets a global pitch modulation scalar that will apply to all non-UI sounds

  • Fire and Forget.
Declaration
public static void SetGlobalPitchModulation(UObject WorldContextObject, float PitchModulation, float TimeSec)
Parameters
Type Name Description
UObject WorldContextObject
System.Single PitchModulation
System.Single TimeSec
Remarks
  • Not Replicated. @param PitchModulation - A pitch modulation value to globally set. @param TimeSec - A time value to linearly interpolate the global modulation pitch over from it's current value.
| Improve this Doc View Source

SetGlobalTimeDilation(UObject, Single)

Sets the global time dilation.

Declaration
public static void SetGlobalTimeDilation(UObject WorldContextObject, float TimeDilation)
Parameters
Type Name Description
UObject WorldContextObject
System.Single TimeDilation
Remarks

@param TimeDilation value to set the global time dilation to

| Improve this Doc View Source

SetPlayerControllerID(PlayerController, Int32)

Sets what controller ID a Player should be using @

Declaration
public static void SetPlayerControllerID(PlayerController Player, int ControllerId)
Parameters
Type Name Description
PlayerController Player
System.Int32 ControllerId
Remarks

param Player The player controller of the player to change the controller ID of @param ControllerId The controller ID to assign to this player

| Improve this Doc View Source

SetSoundMixClassOverride(UObject, SoundMix, SoundClass, Single, Single, Single, Boolean)

Overrides the sound class adjuster in the given sound mix.

Declaration
public static void SetSoundMixClassOverride(UObject WorldContextObject, SoundMix InSoundMixModifier, SoundClass InSoundClass, float Volume, float Pitch, float FadeInTime, bool bApplyToChildren)
Parameters
Type Name Description
UObject WorldContextObject
SoundMix InSoundMixModifier
SoundClass InSoundClass
System.Single Volume
System.Single Pitch
System.Single FadeInTime
System.Boolean bApplyToChildren
Remarks

If the sound class does not exist in the input sound mix, the sound class adjustment will be added to the sound mix. @param InSoundMixModifier The sound mix to modify. @param InSoundClass The sound class to override (or add) in the sound mix. @param Volume The volume scale to set the sound class adjuster to. @param Pitch The pitch scale to set the sound class adjuster to. @param FadeInTime The interpolation time to use to go from the current sound class adjuster values to the new values. @param bApplyToChildren Whether or not to apply this override to the sound class' children or to just the specified sound class.

| Improve this Doc View Source

SetSubtitlesEnabled(Boolean)

Will set subtitles to be enabled or disabled.

Declaration
public static void SetSubtitlesEnabled(bool bEnabled)
Parameters
Type Name Description
System.Boolean bEnabled
Remarks

@param bEnabled will enable subtitle drawing if true, disable if false.

| Improve this Doc View Source

SetWorldOriginLocation(UObject, IntVector)

Requests a new location for a world origin.

Declaration
public static void SetWorldOriginLocation(UObject WorldContextObject, IntVector NewLocation)
Parameters
Type Name Description
UObject WorldContextObject
IntVector NewLocation
| Improve this Doc View Source

SpawnDecalAtLocation(UObject, MaterialInterface, Vector, Vector, Rotator, Single)

Spawns a decal at the given location and rotation, fire and forget.

Declaration
public static DecalComponent SpawnDecalAtLocation(UObject WorldContextObject, MaterialInterface DecalMaterial, Vector DecalSize, Vector Location, Rotator Rotation, float LifeSpan)
Parameters
Type Name Description
UObject WorldContextObject
MaterialInterface DecalMaterial
Vector DecalSize
Vector Location
Rotator Rotation
System.Single LifeSpan
Returns
Type Description
DecalComponent
Remarks

Does not replicate. @param DecalMaterial - decal's material @param DecalSize - size of decal @param Location - location to place the decal in world space @param Rotation - rotation to place the decal in world space @param LifeSpan - destroy decal component after time runs out (0 = infinite)

| Improve this Doc View Source

SpawnDecalAttached(MaterialInterface, Vector, SceneComponent, Name, Vector, Rotator, Byte, Single)

Spawns a decal attached to and following the specified component.

Declaration
public static DecalComponent SpawnDecalAttached(MaterialInterface DecalMaterial, Vector DecalSize, SceneComponent AttachToComponent, Name AttachPointName, Vector Location, Rotator Rotation, byte LocationType, float LifeSpan)
Parameters
Type Name Description
MaterialInterface DecalMaterial
Vector DecalSize
SceneComponent AttachToComponent
Name AttachPointName
Vector Location
Rotator Rotation
System.Byte LocationType
System.Single LifeSpan
Returns
Type Description
DecalComponent
Remarks

Does not replicate. @param DecalMaterial - decal's material @param DecalSize - size of decal @param AttachComponent - Component to attach to. @param AttachPointName - Optional named point within the AttachComponent to spawn the emitter at @param Location - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world position that will be translated to a relative offset @param Rotation - Depending on the value of LocationType this is either a relative offset from the attach component/point or an absolute world rotation that will be translated to a realative offset @param LocationType - Specifies whether Location is a relative offset or an absolute world position @param LifeSpan - destroy decal component after time runs out (0 = infinite)

| Improve this Doc View Source

SpawnDialogue2D(UObject, DialogueWave, DialogueContext, Single, Single, Single, Boolean)

Spawns a dialogue with no attenuation, perfect for UI.

Declaration
public static AudioComponent SpawnDialogue2D(UObject WorldContextObject, DialogueWave Dialogue, DialogueContext Context, float VolumeMultiplier, float PitchMultiplier, float StartTime, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
DialogueWave Dialogue
DialogueContext Context
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks
  • Not Replicated. @param Dialogue - dialogue to play @param Context - context the dialogue is to play in @param VolumeMultiplier - Multiplied with the volume to make the sound louder or softer. @param PitchMultiplier - Multiplies the pitch. @param StartTime - How far in to the dialogue to begin playback at @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return An audio component to manipulate the spawned sound
| Improve this Doc View Source

SpawnDialogueAtLocation(UObject, DialogueWave, DialogueContext, Vector, Rotator, Single, Single, Single, SoundAttenuation, Boolean)

Plays a dialogue at the given location.

Declaration
public static AudioComponent SpawnDialogueAtLocation(UObject WorldContextObject, DialogueWave Dialogue, DialogueContext Context, Vector Location, Rotator Rotation, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
DialogueWave Dialogue
DialogueContext Context
Vector Location
Rotator Rotation
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks

This is a fire and forget sound and does not travel with any actor. Replication is also not handled at this point. @param Dialogue - dialogue to play @param Context - context the dialogue is to play in @param Location - World position to play dialogue at @param Rotation - World rotation to play dialogue at @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - PitchMultiplier @param StartTime - How far in to the dialogue to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return Audio Component to manipulate the playing dialogue with

| Improve this Doc View Source

SpawnDialogueAttached(DialogueWave, DialogueContext, SceneComponent, Name, Vector, Rotator, Byte, Boolean, Single, Single, Single, SoundAttenuation, Boolean)

Spawns a dialogue attached to and following the specified component.

Declaration
public static AudioComponent SpawnDialogueAttached(DialogueWave Dialogue, DialogueContext Context, SceneComponent AttachToComponent, Name AttachPointName, Vector Location, Rotator Rotation, byte LocationType, bool bStopWhenAttachedToDestroyed, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings, bool bAutoDestroy)
Parameters
Type Name Description
DialogueWave Dialogue
DialogueContext Context
SceneComponent AttachToComponent
Name AttachPointName
Vector Location
Rotator Rotation
System.Byte LocationType
System.Boolean bStopWhenAttachedToDestroyed
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks

This is a fire and forget sound. Replication is also not handled at this point. @param Dialogue - dialogue to play @param Context - context the dialogue is to play in @param AttachComponent - Component to attach to. @param AttachPointName - Optional named point within the AttachComponent to play the sound at @param Location - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world position that will be translated to a relative offset @param Rotation - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world rotation that will be translated to a relative offset @param LocationType - Specifies whether Location is a relative offset or an absolute world position @param bStopWhenAttachedToDestroyed - Specifies whether the sound should stop playing when the owner of the attach to component is destroyed. @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - PitchMultiplier @param StartTime - How far in to the dialogue to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return Audio Component to manipulate the playing dialogue with

| Improve this Doc View Source

SpawnEmitterAtLocation(UObject, ParticleSystem, Vector, Rotator, Vector, Boolean, EPSCPoolMethod)

Plays the specified effect at the given location and rotation, fire and forget.

Declaration
public static ParticleSystemComponent SpawnEmitterAtLocation(UObject WorldContextObject, ParticleSystem EmitterTemplate, Vector Location, Rotator Rotation, Vector Scale, bool bAutoDestroy, EPSCPoolMethod PoolingMethod)
Parameters
Type Name Description
UObject WorldContextObject
ParticleSystem EmitterTemplate
Vector Location
Rotator Rotation
Vector Scale
System.Boolean bAutoDestroy
EPSCPoolMethod PoolingMethod
Returns
Type Description
ParticleSystemComponent
Remarks

The system will go away when the effect is complete. Does not replicate. @param WorldContextObject - Object that we can obtain a world context from @param EmitterTemplate - particle system to create @param Location - location to place the effect in world space @param Rotation - rotation to place the effect in world space @param Scale - scale to create the effect at @param bAutoDestroy - Whether the component will automatically be destroyed when the particle system completes playing or whether it can be reactivated @param PoolingMethod - Method used for pooling this component. Defaults to none.

| Improve this Doc View Source

SpawnEmitterAttached(ParticleSystem, SceneComponent, Name, Vector, Rotator, Vector, Byte, Boolean, EPSCPoolMethod)

Plays the specified effect attached to and following the specified component.

Declaration
public static ParticleSystemComponent SpawnEmitterAttached(ParticleSystem EmitterTemplate, SceneComponent AttachToComponent, Name AttachPointName, Vector Location, Rotator Rotation, Vector Scale, byte LocationType, bool bAutoDestroy, EPSCPoolMethod PoolingMethod)
Parameters
Type Name Description
ParticleSystem EmitterTemplate
SceneComponent AttachToComponent
Name AttachPointName
Vector Location
Rotator Rotation
Vector Scale
System.Byte LocationType
System.Boolean bAutoDestroy
EPSCPoolMethod PoolingMethod
Returns
Type Description
ParticleSystemComponent
Remarks

The system will go away when the effect is complete. Does not replicate. @param EmitterTemplate - particle system to create @param AttachComponent - Component to attach to. @param AttachPointName - Optional named point within the AttachComponent to spawn the emitter at @param Location - Depending on the value of LocationType this is either a relative offset from the attach component/point or an absolute world location that will be translated to a relative offset (if LocationType is KeepWorldPosition). @param Rotation - Depending on the value of LocationType this is either a relative offset from the attach component/point or an absolute world rotation that will be translated to a relative offset (if LocationType is KeepWorldPosition). @param Scale - Depending on the value of LocationType this is either a relative scale from the attach component or an absolute world scale that will be translated to a relative scale (if LocationType is KeepWorldPosition). @param LocationType - Specifies whether Location is a relative offset or an absolute world position @param bAutoDestroy - Whether the component will automatically be destroyed when the particle system completes playing or whether it can be reactivated @param PoolingMethod - Method used for pooling this component. Defaults to none.

| Improve this Doc View Source

SpawnForceFeedbackAtLocation(UObject, ForceFeedbackEffect, Vector, Rotator, Boolean, Single, Single, ForceFeedbackAttenuation, Boolean)

Plays a force feedback effect at the given location.

Declaration
public static ForceFeedbackComponent SpawnForceFeedbackAtLocation(UObject WorldContextObject, ForceFeedbackEffect ForceFeedbackEffect, Vector Location, Rotator Rotation, bool bLooping, float IntensityMultiplier, float StartTime, ForceFeedbackAttenuation AttenuationSettings, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
ForceFeedbackEffect ForceFeedbackEffect
Vector Location
Rotator Rotation
System.Boolean bLooping
System.Single IntensityMultiplier
System.Single StartTime
ForceFeedbackAttenuation AttenuationSettings
System.Boolean bAutoDestroy
Returns
Type Description
ForceFeedbackComponent
Remarks

This is a fire and forget effect and does not travel with any actor. Replication is also not handled at this point. @param ForceFeedbackEffect - effect to play @param Location - World position to center the effect at @param Rotation - World rotation to center the effect at @param IntensityMultiplier - Intensity multiplier @param StartTime - How far in to the feedback effect to begin playback at @param AttenuationSettings - Override attenuation settings package to play effect with @param bAutoDestroy - Whether the returned force feedback component will be automatically cleaned up when the feedback patern finishes (by completing or stopping) or whether it can be reactivated @return Force Feedback Component to manipulate the playing feedback effect with

| Improve this Doc View Source

SpawnForceFeedbackAttached(ForceFeedbackEffect, SceneComponent, Name, Vector, Rotator, Byte, Boolean, Boolean, Single, Single, ForceFeedbackAttenuation, Boolean)

Plays a force feedback effect attached to and following the specified component.

Declaration
public static ForceFeedbackComponent SpawnForceFeedbackAttached(ForceFeedbackEffect ForceFeedbackEffect, SceneComponent AttachToComponent, Name AttachPointName, Vector Location, Rotator Rotation, byte LocationType, bool bStopWhenAttachedToDestroyed, bool bLooping, float IntensityMultiplier, float StartTime, ForceFeedbackAttenuation AttenuationSettings, bool bAutoDestroy)
Parameters
Type Name Description
ForceFeedbackEffect ForceFeedbackEffect
SceneComponent AttachToComponent
Name AttachPointName
Vector Location
Rotator Rotation
System.Byte LocationType
System.Boolean bStopWhenAttachedToDestroyed
System.Boolean bLooping
System.Single IntensityMultiplier
System.Single StartTime
ForceFeedbackAttenuation AttenuationSettings
System.Boolean bAutoDestroy
Returns
Type Description
ForceFeedbackComponent
Remarks

This is a fire and forget effect. Replication is also not handled at this point. @param ForceFeedbackEffect - effect to play @param AttachComponent - Component to attach to. @param AttachPointName - Optional named point within the AttachComponent to attach to @param Location - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world position that will be translated to a relative offset @param Rotation - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world rotation that will be translated to a relative offset @param LocationType - Specifies whether Location is a relative offset or an absolute world position @param bStopWhenAttachedToDestroyed - Specifies whether the feedback effect should stop playing when the owner of the attach to component is destroyed. @param IntensityMultiplier - Intensity multiplier @param StartTime - How far in to the feedback effect to begin playback at @param AttenuationSettings - Override attenuation settings package to play effect with @param bAutoDestroy - Whether the returned force feedback component will be automatically cleaned up when the feedback patern finishes (by completing or stopping) or whether it can be reactivated @return Force Feedback Component to manipulate the playing feedback effect with

| Improve this Doc View Source

SpawnObject(SubclassOf<UObject>, UObject)

--- Create Object

Declaration
public static UObject SpawnObject(SubclassOf<UObject> ObjectClass, UObject Outer)
Parameters
Type Name Description
SubclassOf<UObject> ObjectClass
UObject Outer
Returns
Type Description
UObject
| Improve this Doc View Source

SpawnSound2D(UObject, SoundBase, Single, Single, Single, SoundConcurrency, Boolean, Boolean)

Spawns a sound with no attenuation, perfect for UI sounds.

Declaration
public static AudioComponent SpawnSound2D(UObject WorldContextObject, SoundBase Sound, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundConcurrency ConcurrencySettings, bool bPersistAcrossLevelTransition, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
SoundBase Sound
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundConcurrency ConcurrencySettings
System.Boolean bPersistAcrossLevelTransition
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks
  • Not Replicated. @param Sound - Sound to play. @param VolumeMultiplier - Multiplied with the volume to make the sound louder or softer. @param PitchMultiplier - Multiplies the pitch. @param StartTime - How far in to the sound to begin playback at @param ConcurrencySettings - Override concurrency settings package to play sound with @param PersistAcrossLevelTransition - Whether the sound should continue to play when the map it was played in is unloaded @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return An audio component to manipulate the spawned sound
| Improve this Doc View Source

SpawnSoundAtLocation(UObject, SoundBase, Vector, Rotator, Single, Single, Single, SoundAttenuation, SoundConcurrency, Boolean)

Spawns a sound at the given location.

Declaration
public static AudioComponent SpawnSoundAtLocation(UObject WorldContextObject, SoundBase Sound, Vector Location, Rotator Rotation, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings, SoundConcurrency ConcurrencySettings, bool bAutoDestroy)
Parameters
Type Name Description
UObject WorldContextObject
SoundBase Sound
Vector Location
Rotator Rotation
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
SoundConcurrency ConcurrencySettings
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks

This does not travel with any actor. Replication is also not handled at this point. @param Sound - sound to play @param Location - World position to play sound at @param Rotation - World rotation to play sound at @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - PitchMultiplier @param StartTime - How far in to the sound to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with @param ConcurrencySettings - Override concurrency settings package to play sound with @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return An audio component to manipulate the spawned sound

| Improve this Doc View Source

SpawnSoundAttached(SoundBase, SceneComponent, Name, Vector, Rotator, Byte, Boolean, Single, Single, Single, SoundAttenuation, SoundConcurrency, Boolean)

Plays a sound attached to and following the specified component.

Declaration
public static AudioComponent SpawnSoundAttached(SoundBase Sound, SceneComponent AttachToComponent, Name AttachPointName, Vector Location, Rotator Rotation, byte LocationType, bool bStopWhenAttachedToDestroyed, float VolumeMultiplier, float PitchMultiplier, float StartTime, SoundAttenuation AttenuationSettings, SoundConcurrency ConcurrencySettings, bool bAutoDestroy)
Parameters
Type Name Description
SoundBase Sound
SceneComponent AttachToComponent
Name AttachPointName
Vector Location
Rotator Rotation
System.Byte LocationType
System.Boolean bStopWhenAttachedToDestroyed
System.Single VolumeMultiplier
System.Single PitchMultiplier
System.Single StartTime
SoundAttenuation AttenuationSettings
SoundConcurrency ConcurrencySettings
System.Boolean bAutoDestroy
Returns
Type Description
AudioComponent
Remarks

This is a fire and forget sound. Replication is also not handled at this point. @param Sound - sound to play @param AttachComponent - Component to attach to. @param AttachPointName - Optional named point within the AttachComponent to play the sound at @param Location - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world position that will be translated to a relative offset @param Rotation - Depending on the value of Location Type this is either a relative offset from the attach component/point or an absolute world rotation that will be translated to a relative offset @param LocationType - Specifies whether Location is a relative offset or an absolute world position @param bStopWhenAttachedToDestroyed - Specifies whether the sound should stop playing when the owner of the attach to component is destroyed. @param VolumeMultiplier - Volume multiplier @param PitchMultiplier - PitchMultiplier @param StartTime - How far in to the sound to begin playback at @param AttenuationSettings - Override attenuation settings package to play sound with @param ConcurrencySettings - Override concurrency settings package to play sound with @param bAutoDestroy - Whether the returned audio component will be automatically cleaned up when the sound finishes (by completing or stopping) or whether it can be reactivated @return An audio component to manipulate the spawned sound

| Improve this Doc View Source

SuggestProjectileVelocity_CustomArc(UObject, Vector, Vector, Single, Single)

Returns the launch velocity needed for a projectile at rest at StartPos to land on EndPos.

Declaration
public static (Vector, bool) SuggestProjectileVelocity_CustomArc(UObject WorldContextObject, Vector StartPos, Vector EndPos, float OverrideGravityZ, float ArcParam)
Parameters
Type Name Description
UObject WorldContextObject
Vector StartPos
Vector EndPos
System.Single OverrideGravityZ
System.Single ArcParam
Returns
Type Description
System.ValueTuple<Vector, System.Boolean>
Remarks

Assumes a medium arc (e.g. 45 deg on level ground). Projectile velocity is variable and unconstrained. Does no tracing.

@param OutLaunchVelocity Returns the launch velocity required to reach the EndPos @param StartPos Start position of the simulation @param EndPos Desired end location for the simulation @param OverrideGravityZ Optional override of WorldGravityZ @param ArcParam Change height of arc between 0.0-1.0 where 0.5 is the default medium arc, 0 is up, and 1 is directly toward EndPos.

| Improve this Doc View Source

UnloadStreamLevel(UObject, Name, LatentActionInfo, Boolean)

Unload a streamed in level

Declaration
public static void UnloadStreamLevel(UObject WorldContextObject, Name LevelName, LatentActionInfo LatentInfo, bool bShouldBlockOnUnload)
Parameters
Type Name Description
UObject WorldContextObject
Name LevelName
LatentActionInfo LatentInfo
System.Boolean bShouldBlockOnUnload

Operators

| Improve this Doc View Source

Implicit(IntPtr to GameplayStatics)

Convert from IntPtr to UObject

Declaration
public static implicit operator GameplayStatics(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
GameplayStatics
  • Improve this Doc
  • View Source
Back to top Generated by DocFX