UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UGameplayStatics Class Reference

#include <GameplayStatics.h>

+ Inheritance diagram for UGameplayStatics:

Classes

struct  FSuggestProjectileVelocityParameters
 

Public Member Functions

 UFUNCTION (BlueprintCallable, Category="Game", DisplayName="Predict Projectile Path (Advanced)", meta=(WorldContext="WorldContextObject")) static ENGINE_API bool Blueprint_PredictProjectilePath_Advanced(const UObject *WorldContextObject
 
- Public Member Functions inherited from UObject
COREUOBJECT_API UObject ()
 
COREUOBJECT_API UObject (const FObjectInitializer &ObjectInitializer)
 
COREUOBJECT_API UObject (EStaticConstructor, EObjectFlags InFlags)
 
COREUOBJECT_API UObject (FVTableHelper &Helper)
 
COREUOBJECT_API UObjectCreateDefaultSubobject (FName SubobjectFName, UClass *ReturnType, UClass *ClassToCreateByDefault, bool bIsRequired, bool bIsTransient)
 
template<class TReturnType >
TReturnTypeCreateEditorOnlyDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType >
TReturnTypeCreateDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType , class TClassToConstructByDefault >
TReturnTypeCreateDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType >
TReturnTypeCreateOptionalDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
template<class TReturnType , class TClassToConstructByDefault >
TReturnTypeCreateOptionalDefaultSubobject (FName SubobjectName, bool bTransient=false)
 
COREUOBJECT_API void GetDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects)
 
COREUOBJECT_API UObjectGetDefaultSubobjectByName (FName ToFind)
 
virtual COREUOBJECT_API void PostInitProperties ()
 
virtual COREUOBJECT_API void PostReinitProperties ()
 
virtual void PostCDOContruct ()
 
virtual COREUOBJECT_API void PreSaveRoot (FObjectPreSaveRootContext ObjectSaveContext)
 
virtual COREUOBJECT_API void PostSaveRoot (FObjectPostSaveRootContext ObjectSaveContext)
 
virtual COREUOBJECT_API void PreSave (FObjectPreSaveContext SaveContext)
 
virtual COREUOBJECT_API void CollectSaveOverrides (FObjectCollectSaveOverridesContext SaveContext)
 
UE_FORCEINLINE_HINT bool Modify (bool bAlwaysMarkDirty=true)
 
UE_FORCEINLINE_HINT bool IsCapturingAsRootObjectForTransaction () const
 
virtual bool ResolveSubobject (const TCHAR *SubObjectPath, UObject *&OutObject, bool bLoadIfExists)
 
virtual bool IsReadyForAsyncPostLoad () const
 
virtual COREUOBJECT_API void PostLoad ()
 
virtual COREUOBJECT_API void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 
virtual COREUOBJECT_API void BeginDestroy ()
 
virtual bool IsReadyForFinishDestroy ()
 
virtual COREUOBJECT_API void FinishDestroy ()
 
virtual COREUOBJECT_API void Serialize (FArchive &Ar)
 
virtual COREUOBJECT_API void Serialize (FStructuredArchive::FRecord Record)
 
virtual void ShutdownAfterError ()
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 
virtual COREUOBJECT_API void PostRename (UObject *OldOuter, const FName OldName)
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 
virtual void PostDuplicate (EDuplicateMode::Type DuplicateMode)
 
virtual COREUOBJECT_API bool NeedsLoadForClient () const
 
virtual COREUOBJECT_API bool NeedsLoadForServer () const
 
virtual COREUOBJECT_API bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 
virtual bool NeedsLoadForEditorGame () const
 
virtual bool IsEditorOnly () const
 
virtual bool HasNonEditorOnlyReferences () const
 
virtual bool IsPostLoadThreadSafe () const
 
virtual COREUOBJECT_API bool IsDestructionThreadSafe () const
 
virtual COREUOBJECT_API void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 
virtual void PostEditImport ()
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 
virtual COREUOBJECT_API bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 
virtual FString GetDesc ()
 
COREUOBJECT_API UScriptStructGetSparseClassDataStruct () const
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 
virtual COREUOBJECT_API void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 
virtual FName GetExporterName (void)
 
COREUOBJECT_API void CallAddReferencedObjects (FReferenceCollector &Collector)
 
virtual FRestoreForUObjectOverwriteGetRestoreForUObjectOverwrite ()
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 
virtual COREUOBJECT_API void GetAssetRegistryTags (FAssetRegistryTagsContext Context) const
 
virtual COREUOBJECT_API void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 
COREUOBJECT_API void GetAssetRegistryTags (FAssetData &Out) const
 
COREUOBJECT_API void GetAssetRegistryTags (FAssetRegistryTagsContext Context, FAssetData &Out) const
 
virtual COREUOBJECT_API bool IsAsset () const
 
virtual COREUOBJECT_API FPrimaryAssetId GetPrimaryAssetId () const
 
virtual COREUOBJECT_API bool IsLocalizedResource () const
 
virtual COREUOBJECT_API bool IsSafeForRootSet () const
 
virtual COREUOBJECT_API void TagSubobjects (EObjectFlags NewFlags)
 
virtual COREUOBJECT_API void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 
virtual COREUOBJECT_API void GetReplicatedCustomConditionState (FCustomPropertyConditionState &OutActiveState) const
 
virtual COREUOBJECT_API void RegisterReplicationFragments (UE::Net::FFragmentRegistrationContext &Context, UE::Net::EFragmentRegistrationFlags RegistrationFlags)
 
virtual COREUOBJECT_API bool IsNameStableForNetworking () const
 
virtual COREUOBJECT_API bool IsFullNameStableForNetworking () const
 
virtual COREUOBJECT_API bool IsSupportedForNetworking () const
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 
virtual COREUOBJECT_API void PreNetReceive ()
 
virtual COREUOBJECT_API void PostNetReceive ()
 
virtual void PostRepNotifies ()
 
virtual COREUOBJECT_API void PreDestroyFromReplication ()
 
COREUOBJECT_API bool IsSelected () const
 
COREUOBJECT_API void SerializeScriptProperties (FArchive &Ar) const
 
COREUOBJECT_API void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 
COREUOBJECT_API void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 
COREUOBJECT_API FString GetDetailedInfo () const
 
COREUOBJECT_API bool ConditionalBeginDestroy ()
 
COREUOBJECT_API bool ConditionalFinishDestroy ()
 
COREUOBJECT_API void ConditionalPostLoad ()
 
COREUOBJECT_API void ConditionalPreload ()
 
COREUOBJECT_API void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 
COREUOBJECT_API UFunctionFindFunction (FName InName) const
 
COREUOBJECT_API UFunctionFindFunctionChecked (FName InName) const
 
virtual COREUOBJECT_API void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 
COREUOBJECT_API void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 
COREUOBJECT_API bool CheckDefaultSubobjects (bool bForceCheck=false) const
 
COREUOBJECT_API void SaveConfig (uint64 RequiredPropertyFlags=CPF_Config, const TCHAR *Filename=nullptr, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 
COREUOBJECT_API void SaveConfig (const FSaveConfigContext &Context)
 
COREUOBJECT_API void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 
COREUOBJECT_API bool TryUpdateDefaultConfigFile (const FString &SpecificFileLocation="", bool bWarnIfFail=true)
 
COREUOBJECT_API void UpdateGlobalUserConfigFile ()
 
COREUOBJECT_API void UpdateProjectUserConfigFile ()
 
COREUOBJECT_API void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 
COREUOBJECT_API FString GetDefaultConfigFilename () const
 
COREUOBJECT_API FString GetGlobalUserConfigFilename () const
 
COREUOBJECT_API FString GetProjectUserConfigFilename () const
 
virtual const TCHARGetConfigOverridePlatform () const
 
virtual void OverrideConfigSection (FString &SectionName)
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 
COREUOBJECT_API void LoadConfig (UClass *ConfigClass=nullptr, const TCHAR *Filename=nullptr, uint32 PropagationFlags=UE::LCPF_None, class FProperty *PropertyToLoad=nullptr, TArray< UE::ConfigAccessTracking::FConfigAccessData > *OutAccessedKeys=nullptr)
 
COREUOBJECT_API void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE::LCPF_None, class FProperty *PropertyToLoad=NULL)
 
COREUOBJECT_API void ParseParms (const TCHAR *Parms)
 
COREUOBJECT_API void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 
COREUOBJECT_API void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 
COREUOBJECT_API void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true, bool bSilenceLogs=false)
 
COREUOBJECT_API UObjectGetArchetype () const
 
COREUOBJECT_API void GetArchetypeInstances (TArray< UObject * > &Instances)
 
COREUOBJECT_API void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 
template<class T >
bool Implements () const
 
virtual COREUOBJECT_API void ProcessEvent (UFunction *Function, void *Parms)
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 
COREUOBJECT_API bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 
COREUOBJECT_API void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 
 DECLARE_FUNCTION (ProcessInternal)
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 
COREUOBJECT_API void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 
virtual UClassRegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 
COREUOBJECT_API bool IsInBlueprint () const
 
COREUOBJECT_API void DestroyNonNativeProperties ()
 
virtual void MarkAsEditorOnlySubobject ()
 
COREUOBJECT_API void AbortInsideMemberFunction () const
 
 DECLARE_FUNCTION (execUndefined)
 
 DECLARE_FUNCTION (execLocalVariable)
 
 DECLARE_FUNCTION (execInstanceVariable)
 
 DECLARE_FUNCTION (execDefaultVariable)
 
 DECLARE_FUNCTION (execLocalOutVariable)
 
 DECLARE_FUNCTION (execInterfaceVariable)
 
 DECLARE_FUNCTION (execClassSparseDataVariable)
 
 DECLARE_FUNCTION (execInterfaceContext)
 
 DECLARE_FUNCTION (execArrayElement)
 
 DECLARE_FUNCTION (execBoolVariable)
 
 DECLARE_FUNCTION (execClassDefaultVariable)
 
 DECLARE_FUNCTION (execEndFunctionParms)
 
 DECLARE_FUNCTION (execNothing)
 
 DECLARE_FUNCTION (execNothingInt32)
 
 DECLARE_FUNCTION (execNothingOp4a)
 
 DECLARE_FUNCTION (execBreakpoint)
 
 DECLARE_FUNCTION (execTracepoint)
 
 DECLARE_FUNCTION (execWireTracepoint)
 
 DECLARE_FUNCTION (execInstrumentation)
 
 DECLARE_FUNCTION (execEndOfScript)
 
 DECLARE_FUNCTION (execReturnNothing)
 
 DECLARE_FUNCTION (execEmptyParmValue)
 
 DECLARE_FUNCTION (execJump)
 
 DECLARE_FUNCTION (execJumpIfNot)
 
 DECLARE_FUNCTION (execAssert)
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 
 DECLARE_FUNCTION (execComputedJump)
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 
 DECLARE_FUNCTION (execLet)
 
 DECLARE_FUNCTION (execLetObj)
 
 DECLARE_FUNCTION (execLetWeakObjPtr)
 
 DECLARE_FUNCTION (execLetBool)
 
 DECLARE_FUNCTION (execLetDelegate)
 
 DECLARE_FUNCTION (execLetMulticastDelegate)
 
 DECLARE_FUNCTION (execAddMulticastDelegate)
 
 DECLARE_FUNCTION (execClearMulticastDelegate)
 
 DECLARE_FUNCTION (execEatReturnValue)
 
 DECLARE_FUNCTION (execRemoveMulticastDelegate)
 
 DECLARE_FUNCTION (execSelf)
 
 DECLARE_FUNCTION (execContext)
 
 DECLARE_FUNCTION (execContext_FailSilent)
 
 DECLARE_FUNCTION (execStructMemberContext)
 
 DECLARE_FUNCTION (execVirtualFunction)
 
 DECLARE_FUNCTION (execFinalFunction)
 
 DECLARE_FUNCTION (execLocalVirtualFunction)
 
 DECLARE_FUNCTION (execLocalFinalFunction)
 
 DECLARE_FUNCTION (execStructCmpEq)
 
 DECLARE_FUNCTION (execStructCmpNe)
 
 DECLARE_FUNCTION (execStructMember)
 
 DECLARE_FUNCTION (execEqualEqual_DelegateDelegate)
 
 DECLARE_FUNCTION (execNotEqual_DelegateDelegate)
 
 DECLARE_FUNCTION (execEqualEqual_DelegateFunction)
 
 DECLARE_FUNCTION (execNotEqual_DelegateFunction)
 
 DECLARE_FUNCTION (execIntConst)
 
 DECLARE_FUNCTION (execInt64Const)
 
 DECLARE_FUNCTION (execUInt64Const)
 
 DECLARE_FUNCTION (execSkipOffsetConst)
 
 DECLARE_FUNCTION (execFloatConst)
 
 DECLARE_FUNCTION (execDoubleConst)
 
 DECLARE_FUNCTION (execStringConst)
 
 DECLARE_FUNCTION (execUnicodeStringConst)
 
 DECLARE_FUNCTION (execTextConst)
 
 DECLARE_FUNCTION (execPropertyConst)
 
 DECLARE_FUNCTION (execObjectConst)
 
 DECLARE_FUNCTION (execSoftObjectConst)
 
 DECLARE_FUNCTION (execFieldPathConst)
 
 DECLARE_FUNCTION (execInstanceDelegate)
 
 DECLARE_FUNCTION (execNameConst)
 
 DECLARE_FUNCTION (execByteConst)
 
 DECLARE_FUNCTION (execIntZero)
 
 DECLARE_FUNCTION (execIntOne)
 
 DECLARE_FUNCTION (execTrue)
 
 DECLARE_FUNCTION (execFalse)
 
 DECLARE_FUNCTION (execNoObject)
 
 DECLARE_FUNCTION (execNullInterface)
 
 DECLARE_FUNCTION (execIntConstByte)
 
 DECLARE_FUNCTION (execRotationConst)
 
 DECLARE_FUNCTION (execVectorConst)
 
 DECLARE_FUNCTION (execVector3fConst)
 
 DECLARE_FUNCTION (execTransformConst)
 
 DECLARE_FUNCTION (execStructConst)
 
 DECLARE_FUNCTION (execSetArray)
 
 DECLARE_FUNCTION (execSetSet)
 
 DECLARE_FUNCTION (execSetMap)
 
 DECLARE_FUNCTION (execArrayConst)
 
 DECLARE_FUNCTION (execSetConst)
 
 DECLARE_FUNCTION (execMapConst)
 
 DECLARE_FUNCTION (execBitFieldConst)
 
 DECLARE_FUNCTION (execNew)
 
 DECLARE_FUNCTION (execClassContext)
 
 DECLARE_FUNCTION (execNativeParm)
 
 DECLARE_FUNCTION (execCast)
 
 DECLARE_FUNCTION (execDynamicCast)
 
 DECLARE_FUNCTION (execMetaCast)
 
 DECLARE_FUNCTION (execInterfaceCast)
 
 DECLARE_FUNCTION (execDoubleToFloatCast)
 
 DECLARE_FUNCTION (execFloatToDoubleCast)
 
 DECLARE_FUNCTION (execObjectToBool)
 
 DECLARE_FUNCTION (execInterfaceToBool)
 
 DECLARE_FUNCTION (execObjectToInterface)
 
 DECLARE_FUNCTION (execInterfaceToInterface)
 
 DECLARE_FUNCTION (execInterfaceToObject)
 
 DECLARE_FUNCTION (execGetDynArrayElement)
 
 DECLARE_FUNCTION (execSetDynArrayElement)
 
 DECLARE_FUNCTION (execGetDynArrayLength)
 
 DECLARE_FUNCTION (execSetDynArrayLength)
 
 DECLARE_FUNCTION (execDynArrayInsert)
 
 DECLARE_FUNCTION (execDynArrayRemove)
 
 DECLARE_FUNCTION (execDynArrayFind)
 
 DECLARE_FUNCTION (execDynArrayFindStruct)
 
 DECLARE_FUNCTION (execDynArrayAdd)
 
 DECLARE_FUNCTION (execDynArrayAddItem)
 
 DECLARE_FUNCTION (execDynArrayInsertItem)
 
 DECLARE_FUNCTION (execDynArrayRemoveItem)
 
 DECLARE_FUNCTION (execDynArraySort)
 
 DECLARE_FUNCTION (execBindDelegate)
 
 DECLARE_FUNCTION (execCallMulticastDelegate)
 
 DECLARE_FUNCTION (execLetValueOnPersistentFrame)
 
 DECLARE_FUNCTION (execCallMathFunction)
 
 DECLARE_FUNCTION (execSwitchValue)
 
 DECLARE_FUNCTION (execArrayGetByRef)
 
 DECLARE_FUNCTION (execAutoRtfmTransact)
 
 DECLARE_FUNCTION (execAutoRtfmStopTransact)
 
 DECLARE_FUNCTION (execAutoRtfmAbortIfNot)
 
void ExecuteUbergraph (int32 EntryPoint)
 
virtual void ValidateGeneratedRepEnums (const TArray< struct FRepRecord > &ClassReps) const
 
virtual uint64 GetNetPushIdDynamic () const
 
- Public Member Functions inherited from UObjectBaseUtility
 UObjectBaseUtility ()
 
 UObjectBaseUtility (EObjectFlags InFlags)
 
void SetFlags (EObjectFlags NewFlags)
 
void ClearFlags (EObjectFlags FlagsToClear)
 
bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 
bool HasAllFlags (EObjectFlags FlagsToCheck) const
 
UE_FORCEINLINE_HINT EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 
UE_FORCEINLINE_HINT void Mark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT void UnMark (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAnyMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT bool HasAllMarks (EObjectMark Marks) const
 
UE_FORCEINLINE_HINT EObjectMark GetAllMarks () const
 
void MarkAsGarbage ()
 
void ClearGarbage ()
 
UE_FORCEINLINE_HINT void AddToRoot ()
 
UE_FORCEINLINE_HINT void RemoveFromRoot ()
 
UE_FORCEINLINE_HINT bool IsRooted () const
 
UE_FORCEINLINE_HINT int32 GetRefCount () const
 
bool ThisThreadAtomicallyClearedRFUnreachable ()
 
UE_FORCEINLINE_HINT bool IsUnreachable () const
 
UE_FORCEINLINE_HINT bool IsNative () const
 
void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 
UE_FORCEINLINE_HINT EInternalObjectFlags GetInternalFlags () const
 
UE_FORCEINLINE_HINT bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 
void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 
COREUOBJECT_API FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API void GetFullName (FStringBuilderBase &ResultString, const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 
COREUOBJECT_API FString GetPathName (const UObject *StopOuter=NULL) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FString &ResultString) const
 
COREUOBJECT_API void GetPathName (const UObject *StopOuter, FStringBuilderBase &ResultString) const
 
virtual bool CanBeClusterRoot () const
 
virtual COREUOBJECT_API bool CanBeInCluster () const
 
virtual COREUOBJECT_API void CreateCluster ()
 
virtual void OnClusterMarkedAsPendingKill ()
 
COREUOBJECT_API void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 
COREUOBJECT_API FString GetFullGroupName (bool bStartWithOuter) const
 
UE_FORCEINLINE_HINT FString GetName () const
 
UE_FORCEINLINE_HINT void GetName (FString &ResultString) const
 
UE_FORCEINLINE_HINT void AppendName (FString &ResultString) const
 
COREUOBJECT_API bool IsPackageExternal () const
 
COREUOBJECT_API void DetachExternalPackage ()
 
COREUOBJECT_API void ReattachExternalPackage ()
 
COREUOBJECT_API UObjectGetOutermostObject () const
 
COREUOBJECT_API UPackageGetPackage () const
 
UE_INTERNAL virtual COREUOBJECT_API UE::Core::FVersePath GetVersePath () const
 
COREUOBJECT_API UPackageGetOutermost () const
 
COREUOBJECT_API bool MarkPackageDirty () const
 
COREUOBJECT_API bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 
COREUOBJECT_API UObjectGetTypedOuter (UClass *Target) const
 
template<typename T >
T * GetTypedOuter () const
 
template<typename InterfaceClassType >
InterfaceClassTypeGetImplementingOuter () const
 
COREUOBJECT_API UObjectBaseUtilityGetImplementingOuterObject (const UClass *InInterfaceClass) const
 
COREUOBJECT_API bool IsIn (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsIn (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInOuter (const UObject *SomeOuter) const
 
COREUOBJECT_API bool IsInPackage (const UPackage *SomePackage) const
 
COREUOBJECT_API bool IsInA (const UClass *SomeBaseClass) const
 
COREUOBJECT_API bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 
template<typename OtherClassType >
bool IsA (OtherClassType SomeBase) const
 
template<class T >
bool IsA () const
 
COREUOBJECT_API const UClassFindNearestCommonBaseClass (const UClass *TestClass) const
 
COREUOBJECT_API voidGetInterfaceAddress (UClass *InterfaceClass)
 
COREUOBJECT_API voidGetNativeInterfaceAddress (UClass *InterfaceClass)
 
const voidGetNativeInterfaceAddress (UClass *InterfaceClass) const
 
COREUOBJECT_API bool IsTemplateForSubobjects (EObjectFlags TemplateTypes=RF_ClassDefaultObject|RF_DefaultSubObject|RF_InheritableComponentTemplate) const
 
COREUOBJECT_API bool IsDefaultSubobject () const
 
COREUOBJECT_API class FLinkerLoadGetLinker () const
 
COREUOBJECT_API int32 GetLinkerIndex () const
 
COREUOBJECT_API FPackageFileVersion GetLinkerUEVersion () const
 
int32 GetLinkerUE4Version () const
 
COREUOBJECT_API int32 GetLinkerLicenseeUEVersion () const
 
int32 GetLinkerLicenseeUE4Version () const
 
COREUOBJECT_API int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 
UE_FORCEINLINE_HINT bool operator< (const UObjectBaseUtility &Other) const
 
TStatId GetStatID (bool bForDeferredUse=false) const
 
- Public Member Functions inherited from UObjectBase
COREUOBJECT_API UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName, int32 InInternalIndex=-1, int32 InSerialNumber=0, FRemoteObjectId InRemoteId=FRemoteObjectId())
 
virtual COREUOBJECT_API ~UObjectBase ()
 
COREUOBJECT_API bool IsValidLowLevel () const
 
COREUOBJECT_API bool IsValidLowLevelFast (bool bRecursive=true) const
 
FORCEINLINE uint32 GetUniqueID () const
 
FORCEINLINE UClassGetClass () const
 
FORCEINLINE UObjectGetOuter () const
 
FORCEINLINE FName GetFName () const
 
virtual COREUOBJECT_API FName GetFNameForStatID () const
 
COREUOBJECT_API UPackageGetExternalPackage () const
 
COREUOBJECT_API void SetExternalPackage (UPackage *InPackage)
 
COREUOBJECT_API UPackageGetExternalPackageInternal () const
 
COREUOBJECT_API void MarkAsReachable () const
 
COREUOBJECT_API void AddRef () const
 
COREUOBJECT_API void ReleaseRef () const
 
FORCEINLINE EObjectFlags GetFlags () const
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 

Static Public Member Functions

static ENGINE_API 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)
 
static ENGINE_API 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)
 
static ENGINE_API bool AreAnyListenersWithinRange (const UObject *WorldContextObject, const FVector &Location, float MaximumRange)
 
static ENGINE_API bool GetClosestListenerLocation (const UObject *WorldContextObject, const FVector &Location, float MaximumRange, const bool bAllowAttenuationOverride, FVector &ListenerPosition)
 
static ENGINE_API void SetGlobalPitchModulation (const UObject *WorldContextObject, float PitchModulation, float TimeSec)
 
static ENGINE_API void SetSoundClassDistanceScale (const UObject *WorldContextObject, USoundClass *SoundClass, float DistanceAttenuationScale, float TimeSec=0.0f)
 
static ENGINE_API 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)
 
static ENGINE_API 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)
 
static ENGINE_API UAudioComponentSpawnSound2D (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)
 
static ENGINE_API UAudioComponentCreateSound2D (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)
 
static ENGINE_API 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)
 
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)
 
static ENGINE_API UAudioComponentSpawnSoundAtLocation (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)
 
static ENGINE_API UAudioComponentSpawnSoundAttached (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)
 
static class UAudioComponentSpawnSoundAttached (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)
 
static ENGINE_API void PlayDialogue2D (const UObject *WorldContextObject, UDialogueWave *Dialogue, const struct FDialogueContext &Context, float VolumeMultiplier=1.f, float PitchMultiplier=1.f, float StartTime=0.f)
 
static ENGINE_API UAudioComponentSpawnDialogue2D (const UObject *WorldContextObject, UDialogueWave *Dialogue, const struct FDialogueContext &Context, float VolumeMultiplier=1.f, float PitchMultiplier=1.f, float StartTime=0.f, bool bAutoDestroy=true)
 
static ENGINE_API 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)
 
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)
 
static ENGINE_API UAudioComponentSpawnDialogueAtLocation (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)
 
static ENGINE_API UAudioComponentSpawnDialogueAttached (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)
 
static UAudioComponentSpawnDialogueAttached (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)
 
static ENGINE_API UForceFeedbackComponentSpawnForceFeedbackAtLocation (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)
 
static ENGINE_API UForceFeedbackComponentSpawnForceFeedbackAttached (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)
 
static ENGINE_API void SetSubtitlesEnabled (bool bEnabled)
 
static ENGINE_API bool AreSubtitlesEnabled ()
 
static ENGINE_API void SetBaseSoundMix (const UObject *WorldContextObject, class USoundMix *InSoundMix)
 
static ENGINE_API void PrimeSound (USoundBase *InSound)
 
static ENGINE_API TArray< FNameGetAvailableSpatialPluginNames (const UObject *WorldContextObject)
 
static ENGINE_API FName GetActiveSpatialPluginName (const UObject *WorldContextObject)
 
static ENGINE_API bool SetActiveSpatialPluginByName (const UObject *WorldContextObject, FName InPluginName)
 
static ENGINE_API void PrimeAllSoundsInSoundClass (class USoundClass *InSoundClass)
 
static ENGINE_API void UnRetainAllSoundsInSoundClass (class USoundClass *InSoundClass)
 
static ENGINE_API 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)
 
static ENGINE_API void ClearSoundMixClassOverride (const UObject *WorldContextObject, class USoundMix *InSoundMixModifier, class USoundClass *InSoundClass, float FadeOutTime=1.0f)
 
static ENGINE_API void PushSoundMixModifier (const UObject *WorldContextObject, class USoundMix *InSoundMixModifier)
 
static ENGINE_API void PopSoundMixModifier (const UObject *WorldContextObject, class USoundMix *InSoundMixModifier)
 
static ENGINE_API void ClearSoundMixModifiers (const UObject *WorldContextObject)
 
static ENGINE_API void ActivateReverbEffect (const UObject *WorldContextObject, class UReverbEffect *ReverbEffect, FName TagName, float Priority=0.f, float Volume=0.5f, float FadeTime=2.f)
 
static ENGINE_API void DeactivateReverbEffect (const UObject *WorldContextObject, FName TagName)
 
static ENGINE_API class UReverbEffectGetCurrentReverbEffect (const UObject *WorldContextObject)
 
static ENGINE_API void SetMaxAudioChannelsScaled (const UObject *WorldContextObject, float MaxChannelCountScale)
 
static ENGINE_API int32 GetMaxAudioChannelCount (const UObject *WorldContextObject)
 
static ENGINE_API UDecalComponentSpawnDecalAtLocation (const UObject *WorldContextObject, class UMaterialInterface *DecalMaterial, FVector DecalSize, FVector Location, FRotator Rotation=FRotator(-90, 0, 0), float LifeSpan=0)
 
static ENGINE_API UDecalComponentSpawnDecalAttached (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)
 
static ENGINE_API 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)
 
static ENGINE_API 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)
 
static ENGINE_API EPhysicalSurface GetSurfaceType (const struct FHitResult &Hit)
 
static ENGINE_API bool FindCollisionUV (const struct FHitResult &Hit, int32 UVChannel, FVector2D &UV)
 
static ENGINE_API USaveGameCreateSaveGameObject (TSubclassOf< USaveGame > SaveGameClass)
 
static ENGINE_API bool SaveGameToMemory (USaveGame *SaveGameObject, TArray< uint8 > &OutSaveData)
 
static ENGINE_API bool SaveDataToSlot (const TArray< uint8 > &InSaveData, const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API void AsyncSaveGameToSlot (USaveGame *SaveGameObject, const FString &SlotName, const int32 UserIndex, FAsyncSaveGameToSlotDelegate SavedDelegate=FAsyncSaveGameToSlotDelegate())
 
static ENGINE_API bool SaveGameToSlot (USaveGame *SaveGameObject, const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API bool DoesSaveGameExist (const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API USaveGameLoadGameFromMemory (const TArray< uint8 > &InSaveData)
 
static ENGINE_API bool LoadDataFromSlot (TArray< uint8 > &OutSaveData, const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API void AsyncLoadGameFromSlot (const FString &SlotName, const int32 UserIndex, FAsyncLoadGameFromSlotDelegate LoadedDelegate)
 
static ENGINE_API USaveGameLoadGameFromSlot (const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API FMemoryReader StripSaveGameHeader (const TArray< uint8 > &SaveData)
 
static ENGINE_API bool DeleteGameInSlot (const FString &SlotName, const int32 UserIndex)
 
static ENGINE_API double GetWorldDeltaSeconds (const UObject *WorldContextObject)
 
static ENGINE_API double GetTimeSeconds (const UObject *WorldContextObject)
 
static ENGINE_API double GetUnpausedTimeSeconds (const UObject *WorldContextObject)
 
static ENGINE_API double GetRealTimeSeconds (const UObject *WorldContextObject)
 
static ENGINE_API double GetAudioTimeSeconds (const UObject *WorldContextObject)
 
static ENGINE_API void GetAccurateRealTime (int32 &Seconds, double &PartialSeconds)
 
static ENGINE_API void EnableLiveStreaming (bool Enable)
 
static ENGINE_API FString GetPlatformName ()
 
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)
 
static ENGINE_API bool SuggestProjectileVelocity (const UObject *WorldContextObject, FVector &TossVelocity, FVector StartLocation, FVector EndLocation, float TossSpeed, bool bHighArc=false, float CollisionRadius=0.f, float OverrideGravityZ=0, ESuggestProjVelocityTraceOption::Type TraceOption=ESuggestProjVelocityTraceOption::TraceFullPath, FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam, TArray< AActor * > ActorsToIgnore=TArray< AActor * >(), bool bDrawDebug=false, bool bAcceptClosestOnNoSolutions=false)
 
static ENGINE_API bool SuggestProjectileVelocity (const FSuggestProjectileVelocityParameters &ProjectileParams, FVector &OutTossVelocity)
 
static ENGINE_API 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)
 
static ENGINE_API 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)
 
static ENGINE_API 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)
 
static ENGINE_API bool PredictProjectilePath (const UObject *WorldContextObject, const FPredictProjectilePathParams &PredictParams, FPredictProjectilePathResult &PredictResult)
 
static ENGINE_API bool SuggestProjectileVelocity_CustomArc (const UObject *WorldContextObject, FVector &OutLaunchVelocity, FVector StartPos, FVector EndPos, float OverrideGravityZ=0, float ArcParam=0.5f)
 
static ENGINE_API 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)
 
static ENGINE_API FIntVector GetWorldOriginLocation (const UObject *WorldContextObject)
 
static ENGINE_API void SetWorldOriginLocation (const UObject *WorldContextObject, FIntVector NewLocation)
 
static ENGINE_API FVector RebaseLocalOriginOntoZero (UObject *WorldContextObject, FVector WorldLocation)
 
static ENGINE_API FVector RebaseZeroOriginOntoLocal (UObject *WorldContextObject, FVector WorldLocation)
 
static ENGINE_API int32 GrassOverlappingSphereCount (const UObject *WorldContextObject, const UStaticMesh *StaticMesh, FVector CenterPosition, float Radius)
 
static ENGINE_API bool DeprojectScreenToWorld (APlayerController const *Player, const FVector2D &ScreenPosition, FVector &WorldPosition, FVector &WorldDirection)
 
static ENGINE_API bool DeprojectSceneCaptureToWorld (ASceneCapture2D const *SceneCapture2D, const FVector2D &TargetUV, FVector &WorldPosition, FVector &WorldDirection)
 
static ENGINE_API bool DeprojectSceneCaptureComponentToWorld (USceneCaptureComponent2D *SceneCaptureComponent2D, const FVector2D &TargetUV, FVector &WorldPosition, FVector &WorldDirection)
 
static ENGINE_API bool ProjectWorldToScreen (APlayerController const *Player, const FVector &WorldPosition, FVector2D &ScreenPosition, bool bPlayerViewportRelative=false)
 
static ENGINE_API FVector TransformWorldToFirstPerson (const FMinimalViewInfo &ViewInfo, const FVector &WorldPosition, bool bIgnoreFirstPersonScale)
 
static ENGINE_API void GetViewProjectionMatrix (FMinimalViewInfo DesiredView, FMatrix &ViewMatrix, FMatrix &ProjectionMatrix, FMatrix &ViewProjectionMatrix)
 
static ENGINE_API void CalculateViewProjectionMatricesFromViewTarget (AActor *InViewTarget, FMatrix &OutViewMatrix, FMatrix &OutProjectionMatrix, FMatrix &OutViewProjectionMatrix)
 
static ENGINE_API void CalculateViewProjectionMatricesFromMinimalView (const FMinimalViewInfo &MinimalViewInfo, const TOptional< FMatrix > &CustomProjectionMatrix, FMatrix &OutViewMatrix, FMatrix &OutProjectionMatrix, FMatrix &OutViewProjectionMatrix)
 
static ENGINE_API bool GrabOption (FString &Options, FString &ResultString)
 
static ENGINE_API void GetKeyValue (const FString &Pair, FString &Key, FString &Value)
 
static ENGINE_API FString ParseOption (FString Options, const FString &Key)
 
static ENGINE_API bool HasOption (FString Options, const FString &InKey)
 
static ENGINE_API int32 GetIntOption (const FString &Options, const FString &Key, int32 DefaultValue)
 
static ENGINE_API bool HasLaunchOption (const FString &OptionToCheck)
 
static ENGINE_API void AnnounceAccessibleString (const FString &AnnouncementString)
 
- Static Public Member Functions inherited from UObject
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API bool CanCreateInCurrentContext (UObject *Template)
 
static COREUOBJECT_API void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 
static COREUOBJECT_API const FNameSourceFileTagName ()
 
static COREUOBJECT_API UObjectGetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 
- Static Public Member Functions inherited from UObjectBaseUtility
static bool IsGarbageEliminationEnabled ()
 
static bool IsPendingKillEnabled ()
 
static void SetGarbageEliminationEnabled (bool bEnabled)
 
static COREUOBJECT_API void ReloadObjectsFromModifiedConfigSections (const class FConfigModificationTracker *ChangeTracker)
 
- Static Public Member Functions inherited from UObjectBase
static COREUOBJECT_API FString RemoveClassPrefix (const TCHAR *ClassName)
 
static void PrefetchClass (UObject *Object)
 
static void PrefetchOuter (UObject *Object)
 

Public Attributes

const FPredictProjectilePathParamsPredictParams
 
const FPredictProjectilePathParams FPredictProjectilePathResultPredictResult
 

Additional Inherited Members

- Public Types inherited from UObject
enum class  ENetFields_Private { NETFIELD_REP_START = 0 , NETFIELD_REP_END = -1 }
 
typedef UObject WithinClass
 
- Protected Member Functions inherited from UObject
virtual FString GetDetailedInfoInternal () const
 
COREUOBJECT_API bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 
virtual COREUOBJECT_API bool CheckDefaultSubobjectsInternal () const
 
- Protected Member Functions inherited from UObjectBase
 UObjectBase ()
 
COREUOBJECT_API UObjectBase (EObjectFlags InFlags)
 
COREUOBJECT_API void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 
virtual void RegisterDependencies ()
 
COREUOBJECT_API void Register (class UClass *(*StaticClassFn)(), const TCHAR *PackageName, const TCHAR *Name)
 
COREUOBJECT_API void Register (const TCHAR *PackageName, const TCHAR *Name)
 
virtual COREUOBJECT_API void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 

Detailed Description

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

Member Function Documentation

◆ ActivateReverbEffect()

void UGameplayStatics::ActivateReverbEffect ( const UObject WorldContextObject,
class UReverbEffect ReverbEffect,
FName  TagName,
float  Priority = 0.f,
float  Volume = 0.5f,
float  FadeTime = 2.f 
)
static

Activates a Reverb Effect without the need for an Audio Volume

Parameters
ReverbEffectReverb Effect to use
TagNameTag to associate with Reverb Effect
PriorityPriority of the Reverb Effect
VolumeVolume level of Reverb Effect
FadeTimeTime before Reverb Effect is fully active

◆ AnnounceAccessibleString()

void UGameplayStatics::AnnounceAccessibleString ( const FString &  AnnouncementString)
static

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 be used judiciously as flooding a player with announcements can be overrwhelming and confusing. Try to make announcements concise and clear. NOTE: Currently only supported on Win10, Mac, iOS

◆ AreAnyListenersWithinRange()

bool UGameplayStatics::AreAnyListenersWithinRange ( const UObject WorldContextObject,
const FVector Location,
float  MaximumRange 
)
static

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

Parameters
LocationThe location from which test if a listener is in range
MaximumRangeThe distance away from Location to test if any listener is within
Note
This will always return false if there is no audio device, or the audio device is disabled.

◆ AreSubtitlesEnabled()

bool UGameplayStatics::AreSubtitlesEnabled ( )
static

Returns whether or not subtitles are currently enabled.

Returns
true if subtitles are enabled.

◆ AsyncLoadGameFromSlot()

void UGameplayStatics::AsyncLoadGameFromSlot ( const FString &  SlotName,
const int32  UserIndex,
FAsyncLoadGameFromSlotDelegate  LoadedDelegate 
)
static

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 the game thread, and then will call the passed in delegate The passed in delegate will be copied to a worker thread so make sure any payload is thread safe to copy by value

Parameters
SlotNameName of the save game slot to load from.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
LoadedDelegateDelegate that will be called on game thread when load succeeds or fails.

◆ AsyncSaveGameToSlot()

void UGameplayStatics::AsyncSaveGameToSlot ( USaveGame SaveGameObject,
const FString &  SlotName,
const int32  UserIndex,
FAsyncSaveGameToSlotDelegate  SavedDelegate = FAsyncSaveGameToSlotDelegate() 
)
static

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 thread, then call the complete delegate on the game thread. The passed in delegate will be copied to a worker thread so make sure any payload is thread safe to copy by value.

Parameters
SaveGameObjectObject that contains data about the save game that we want to write out.
SlotNameName of the save game slot to load from.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
SavedDelegateDelegate that will be called on game thread when save succeeds or fails.

◆ Blueprint_PredictProjectilePath_ByObjectType()

bool UGameplayStatics::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 
)
static

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 something.

Parameters
OutPathPositionsPredicted projectile path. Ordered series of positions from StartPos to the end. Includes location at point of impact if it hit something.
OutHitPredicted hit result, if the projectile will hit something
OutLastTraceDestinationGoal position of the final trace it did. Will not be in the path if there is a hit.
StartPosFirst start trace location
LaunchVelocityVelocity the "virtual projectile" is launched at
bTracePathTrace along the entire path to look for blocking hits
ProjectileRadiusRadius of the virtual projectile to sweep against the environment
ObjectTypesObjectTypes to trace against, if bTracePath is true.
bTraceComplexUse TraceComplex (trace against triangles not primitives)
ActorsToIgnoreActors to exclude from the traces
DrawDebugTypeDebug type (one-frame, duration, persistent)
DrawDebugTimeDuration of debug lines (only relevant for DrawDebugType::Duration)
SimFrequencyDetermines size of each sub-step in the simulation (chopping up MaxSimTime)
MaxSimTimeMaximum simulation time for the virtual projectile.
OverrideGravityZOptional override of Gravity (if 0, uses WorldGravityZ)
Returns
True if hit something along the path if tracing for collision.

◆ Blueprint_PredictProjectilePath_ByTraceChannel()

bool UGameplayStatics::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 
)
static

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 something (if tracing with collision).

Parameters
OutPathPositionsPredicted projectile path. Ordered series of positions from StartPos to the end. Includes location at point of impact if it hit something.
OutHitPredicted hit result, if the projectile will hit something
OutLastTraceDestinationGoal position of the final trace it did. Will not be in the path if there is a hit.
StartPosFirst start trace location
LaunchVelocityVelocity the "virtual projectile" is launched at
bTracePathTrace along the entire path to look for blocking hits
ProjectileRadiusRadius of the virtual projectile to sweep against the environment
TraceChannelTraceChannel to trace against, if bTracePath is true.
bTraceComplexUse TraceComplex (trace against triangles not primitives)
ActorsToIgnoreActors to exclude from the traces
DrawDebugTypeDebug type (one-frame, duration, persistent)
DrawDebugTimeDuration of debug lines (only relevant for DrawDebugType::Duration)
SimFrequencyDetermines size of each sub-step in the simulation (chopping up MaxSimTime)
MaxSimTimeMaximum simulation time for the virtual projectile.
OverrideGravityZOptional override of Gravity (if 0, uses WorldGravityZ)
Returns
True if hit something along the path (if tracing with collision).

◆ BlueprintSuggestProjectileVelocity()

bool UGameplayStatics::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 
)
static

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

Parameters
TossVelocity(output) Result launch velocity.
StartLocationIntended launch location
EndLocationDesired landing location
LaunchSpeedDesired launch speed
OverrideGravityZOptional gravity override. 0 means "do not override".
TraceOptionControls whether or not to validate a clear path by tracing along the calculated arc
CollisionRadiusRadius of the projectile (assumed spherical), used when tracing
bFavorHighArcIf true and there are 2 valid solutions, will return the higher arc. If false, will favor the lower arc.
bDrawDebugWhen true, a debug arc is drawn (red for an invalid arc, green for a valid arc)
bAcceptClosestOnNoSolutionsIf target is unreachable and no solutions are possible, provide a velocity that gets as close to the target as possible given this launch speed
Returns
Returns false if there is no valid solution or the valid solutions are blocked. Returns true otherwise.

◆ BreakHitResult()

void UGameplayStatics::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 
)
static

Extracts data from a HitResult.

Parameters
HitThe source HitResult.
bBlockingHitTrue if there was a blocking hit, false otherwise.
bInitialOverlapTrue 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.
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.
DistanceThe 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).
LocationLocation 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.
NormalNormal 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.
ImpactPointLocation 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.
ImpactNormalNormal of the hit in world space, for the object that was hit by the sweep.
PhysMatPhysical material that was hit. Must set bReturnPhysicalMaterial to true in the query params for this to be returned.
HitActorActor hit by the trace.
HitComponentPrimitiveComponent hit by the trace.
HitBoneNameName of the bone hit (valid only if we hit a skeletal mesh).
BoneNameName of the trace bone hit (valid only if we hit a skeletal mesh).
HitItemPrimitive-specific data recording which item in the primitive was hit
ElementIndexIf colliding with a primitive with multiple parts, index of the part that was hit.
FaceIndexIf colliding with trimesh or landscape, index of face that was hit.

◆ CalculateViewProjectionMatricesFromMinimalView()

void UGameplayStatics::CalculateViewProjectionMatricesFromMinimalView ( const FMinimalViewInfo MinimalViewInfo,
const TOptional< FMatrix > &  CustomProjectionMatrix,
FMatrix OutViewMatrix,
FMatrix OutProjectionMatrix,
FMatrix OutViewProjectionMatrix 
)
static

Calculate view-projection matrices from a specified MinimalViewInfo and optional custom projection matrix

◆ CalculateViewProjectionMatricesFromViewTarget()

void UGameplayStatics::CalculateViewProjectionMatricesFromViewTarget ( AActor InViewTarget,
FMatrix OutViewMatrix,
FMatrix OutProjectionMatrix,
FMatrix OutViewProjectionMatrix 
)
static

Calculate view-projection matrices from a specified view target

◆ ClearSoundMixClassOverride()

void UGameplayStatics::ClearSoundMixClassOverride ( const UObject WorldContextObject,
class USoundMix InSoundMixModifier,
class USoundClass InSoundClass,
float  FadeOutTime = 1.0f 
)
static

Clears any existing override of the Sound Class Adjuster in the given Sound Mix

Parameters
InSoundMixModifierThe sound mix to modify.
InSoundClassThe sound class in the sound mix to clear overrides from.
FadeOutTimeThe interpolation time to use to go from the current sound class adjuster override values to the non-override values.

◆ ClearSoundMixModifiers()

void UGameplayStatics::ClearSoundMixModifiers ( const UObject WorldContextObject)
static

Clear all sound mix modifiers from the audio system

◆ CreateSaveGameObject()

USaveGame * UGameplayStatics::CreateSaveGameObject ( TSubclassOf< USaveGame SaveGameClass)
static

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

Parameters
SaveGameClassClass of SaveGame to create
Returns
New SaveGame object to write data to

◆ CreateSound2D()

UAudioComponent * UGameplayStatics::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 
)
static

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 will not have Spatialization applied.

Parameters
Sound- Sound to create.
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far into the sound to begin playback at
ConcurrencySettings- Override concurrency settings package to play sound with
PersistAcrossLevelTransition- Whether the sound should continue to play when the map it was played in is unloaded
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
Returns
An audio component to manipulate the created sound

◆ DeactivateReverbEffect()

void UGameplayStatics::DeactivateReverbEffect ( const UObject WorldContextObject,
FName  TagName 
)
static

Deactivates a Reverb Effect that was applied outside of an Audio Volume

Parameters
TagNameTag associated with Reverb Effect to remove

◆ DeleteGameInSlot()

bool UGameplayStatics::DeleteGameInSlot ( const FString &  SlotName,
const int32  UserIndex 
)
static

Delete a save game in a particular slot.

Parameters
SlotNameName of save game slot to delete.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
Returns
True if a file was actually able to be deleted. use DoesSaveGameExist to distinguish between delete failures and failure due to file not existing.

◆ DeprojectSceneCaptureComponentToWorld()

bool UGameplayStatics::DeprojectSceneCaptureComponentToWorld ( USceneCaptureComponent2D SceneCaptureComponent2D,
const FVector2D TargetUV,
FVector WorldPosition,
FVector WorldDirection 
)
static

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

Parameters
SceneCaptureComponent2DDeproject using this scene capture component's view.
ScreenPositionUV in scene capture render target to deproject.
WorldPosition(out) Corresponding 3D position on camera near plane, in world space.
WorldDirection(out) World space direction vector away from the camera at the given 2d point.

◆ DeprojectSceneCaptureToWorld()

bool UGameplayStatics::DeprojectSceneCaptureToWorld ( ASceneCapture2D const *  SceneCapture2D,
const FVector2D TargetUV,
FVector WorldPosition,
FVector WorldDirection 
)
static

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

Parameters
SceneCapture2DDeproject using this scene capture's view.
ScreenPositionUV in scene capture render target to deproject.
WorldPosition(out) Corresponding 3D position on camera near plane, in world space.
WorldDirection(out) World space direction vector away from the camera at the given 2d point.

◆ DeprojectScreenToWorld()

bool UGameplayStatics::DeprojectScreenToWorld ( APlayerController const *  Player,
const FVector2D ScreenPosition,
FVector WorldPosition,
FVector WorldDirection 
)
static

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

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

◆ DoesSaveGameExist()

bool UGameplayStatics::DoesSaveGameExist ( const FString &  SlotName,
const int32  UserIndex 
)
static

See if a save game exists with the specified name.

Parameters
SlotNameName of save game slot.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.

◆ EnableLiveStreaming()

void UGameplayStatics::EnableLiveStreaming ( bool  Enable)
static

Toggle live DVR streaming.

Parameters
EnableIf true enable streaming, otherwise disable.

◆ FindCollisionUV()

bool UGameplayStatics::FindCollisionUV ( const struct FHitResult Hit,
int32  UVChannel,
FVector2D UV 
)
static

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

◆ GetAccurateRealTime()

void UGameplayStatics::GetAccurateRealTime ( int32 Seconds,
double PartialSeconds 
)
static

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.

◆ GetActiveSpatialPluginName()

FName UGameplayStatics::GetActiveSpatialPluginName ( const UObject WorldContextObject)
static

Get currently active Audio Spatialization Plugin name

◆ GetAudioTimeSeconds()

double UGameplayStatics::GetAudioTimeSeconds ( const UObject WorldContextObject)
static

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

◆ GetAvailableSpatialPluginNames()

TArray< FName > UGameplayStatics::GetAvailableSpatialPluginNames ( const UObject WorldContextObject)
static

Get list of available Audio Spatialization Plugin names

◆ GetClosestListenerLocation()

bool UGameplayStatics::GetClosestListenerLocation ( const UObject WorldContextObject,
const FVector Location,
float  MaximumRange,
const bool  bAllowAttenuationOverride,
FVector ListenerPosition 
)
static

Finds and returns the position of the closest listener to the specified location

Parameters
LocationThe location from which we'd like to find the closest listener, in world space.
MaximumRangeThe maximum distance away from Location that a listener can be.
bAllowAttenuationOverrideTrue for the adjusted listener position (if attenuation override is set), false for the raw listener position (for panning)
ListenerPosition[Out] The position of the closest listener in world space, if found.
Returns
true if we've successfully found a listener within MaximumRange of Location, otherwise false.
Note
This will always return false if there is no audio device, or the audio device is disabled.

◆ GetCurrentReverbEffect()

class UReverbEffect * UGameplayStatics::GetCurrentReverbEffect ( const UObject WorldContextObject)
static

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

◆ GetIntOption()

int32 UGameplayStatics::GetIntOption ( const FString &  Options,
const FString &  Key,
int32  DefaultValue 
)
static

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

Parameters
OptionsThe string containing the options.
KeyThe key to find the value of in Options.
Returns
The value associated with Key as an integer if Key found in Options string, otherwise DefaultValue.

◆ GetKeyValue()

void UGameplayStatics::GetKeyValue ( const FString &  Pair,
FString &  Key,
FString &  Value 
)
static

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

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

◆ GetMaxAudioChannelCount()

int32 UGameplayStatics::GetMaxAudioChannelCount ( const UObject WorldContextObject)
static

Retrieves the max voice count currently used by the audio engine.

◆ GetPlatformName()

FString UGameplayStatics::GetPlatformName ( )
static

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.).

◆ GetRealTimeSeconds()

double UGameplayStatics::GetRealTimeSeconds ( const UObject WorldContextObject)
static

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

◆ GetSurfaceType()

EPhysicalSurface UGameplayStatics::GetSurfaceType ( const struct FHitResult Hit)
static

Returns the EPhysicalSurface type of the given Hit. To edit surface type for your project, use ProjectSettings/Physics/PhysicalSurface section

◆ GetTimeSeconds()

double UGameplayStatics::GetTimeSeconds ( const UObject WorldContextObject)
static

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

◆ GetUnpausedTimeSeconds()

double UGameplayStatics::GetUnpausedTimeSeconds ( const UObject WorldContextObject)
static

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

◆ GetViewProjectionMatrix()

void UGameplayStatics::GetViewProjectionMatrix ( FMinimalViewInfo  DesiredView,
FMatrix ViewMatrix,
FMatrix ProjectionMatrix,
FMatrix ViewProjectionMatrix 
)
static

Returns the View Matrix, Projection Matrix and the View x Projection Matrix for a given view

Parameters
DesiredViewFMinimalViewInfo struct for a camera.
ViewMatrix(out) Corresponding View Matrix
ProjectionMatrix(out) Corresponding Projection Matrix
ViewProjectionMatrix(out) Corresponding View x Projection Matrix

◆ GetWorldDeltaSeconds()

double UGameplayStatics::GetWorldDeltaSeconds ( const UObject WorldContextObject)
static

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

◆ GetWorldOriginLocation()

FIntVector UGameplayStatics::GetWorldOriginLocation ( const UObject WorldContextObject)
static

Returns world origin current location.

◆ GrabOption()

bool UGameplayStatics::GrabOption ( FString &  Options,
FString &  ResultString 
)
static

◆ GrassOverlappingSphereCount()

int32 UGameplayStatics::GrassOverlappingSphereCount ( const UObject WorldContextObject,
const UStaticMesh StaticMesh,
FVector  CenterPosition,
float  Radius 
)
static

Counts how many grass foliage instances overlap a given sphere.

Parameters
MeshThe static mesh we are interested in counting.
CenterPositionThe center position of the sphere.
RadiusThe radius of the sphere.
Returns
Number of foliage instances with their mesh set to Mesh that overlap the sphere.

◆ HasLaunchOption()

bool UGameplayStatics::HasLaunchOption ( const FString &  OptionToCheck)
static

Checks the commandline to see if the desired option was specified on the commandline (e.g. -demobuild)

Returns
True if the launch option was specified on the commandline, false otherwise

◆ HasOption()

bool UGameplayStatics::HasOption ( FString  Options,
const FString &  InKey 
)
static

Returns whether a key exists in an options string.

Parameters
OptionsThe string containing the options.
KeyThe key to determine if it exists in Options.
Returns
Whether Key was found in Options.

◆ IsProjectileTrajectoryBlocked()

bool UGameplayStatics::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 
)
static

Stepwise trace along the path of a given velocity

◆ LoadDataFromSlot()

bool UGameplayStatics::LoadDataFromSlot ( TArray< uint8 > &  OutSaveData,
const FString &  SlotName,
const int32  UserIndex 
)
static

Load contents from a slot/file into a buffer of save data.

Parameters
OutSaveDataData buffer to load into
SlotNameName of save game slot to save to.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
Returns
Whether valid save data was found and loaded.

◆ LoadGameFromMemory()

USaveGame * UGameplayStatics::LoadGameFromMemory ( const TArray< uint8 > &  InSaveData)
static

Tries to load a SaveGame object from a given array of bytes.

Parameters
InSaveDataThe array containing the serialized USaveGame data to load
Returns
Object containing loaded game state (nullptr if load fails)

◆ LoadGameFromSlot()

USaveGame * UGameplayStatics::LoadGameFromSlot ( const FString &  SlotName,
const int32  UserIndex 
)
static

Load the contents from a given slot.

Parameters
SlotNameName of the save game slot to load from.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
Returns
Object containing loaded game state (nullptr if load fails)

◆ MakeHitResult()

FHitResult UGameplayStatics::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 
)
static

Create a HitResult struct

Parameters
HitThe source HitResult.
bBlockingHitTrue if there was a blocking hit, false otherwise.
bInitialOverlapTrue 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.
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.
DistanceThe 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).
LocationLocation 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.
NormalNormal 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.
ImpactPointLocation 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.
ImpactNormalNormal of the hit in world space, for the object that was hit by the sweep.
PhysMatPhysical material that was hit. Must set bReturnPhysicalMaterial to true in the query params for this to be returned.
HitActorActor hit by the trace.
HitComponentPrimitiveComponent hit by the trace.
HitBoneNameName of the bone hit (valid only if we hit a skeletal mesh).
BoneNameName of the trace bone hit (valid only if we hit a skeletal mesh).
HitItemPrimitive-specific data recording which item in the primitive was hit
ElementIndexIf colliding with a primitive with multiple parts, index of the part that was hit.
FaceIndexIf colliding with trimesh or landscape, index of face that was hit.

◆ ParseOption()

FString UGameplayStatics::ParseOption ( FString  Options,
const FString &  Key 
)
static

Find an option in the options string and return it.

Parameters
OptionsThe string containing the options.
KeyThe key to find the value of in Options.
Returns
The value associated with Key if Key found in Options string.

◆ PlayDialogue2D()

void UGameplayStatics::PlayDialogue2D ( const UObject WorldContextObject,
UDialogueWave Dialogue,
const struct FDialogueContext Context,
float  VolumeMultiplier = 1.f,
float  PitchMultiplier = 1.f,
float  StartTime = 0.f 
)
static

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

  • Fire and Forget.
  • Not Replicated.
    Parameters
    Dialogue- dialogue to play
    Context- context the dialogue is to play in
    VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
    PitchMultiplier- A linear scalar multiplied with the pitch.
    StartTime- How far in to the dialogue to begin playback at

◆ PlayDialogueAtLocation() [1/2]

void UGameplayStatics::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 
)
static

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.

Parameters
Dialogue- dialogue to play
Context- context the dialogue is to play in
Location- World position to play dialogue at
Rotation- World rotation to play dialogue at
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far in to the dialogue to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with

◆ PlayDialogueAtLocation() [2/2]

static void UGameplayStatics::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 
)
inlinestatic

◆ PlaySound2D()

void UGameplayStatics::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 
)
static

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

  • Fire and Forget.
  • Not Replicated.
    Parameters
    Sound- Sound to play.
    VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
    PitchMultiplier- A linear scalar multiplied with the pitch.
    StartTime- How far in to the sound to begin playback at
    ConcurrencySettings- Override concurrency settings package to play sound with
    OwningActor- The actor to use as the "owner" for concurrency settings purposes. Allows PlaySound calls to do a concurrency limit per owner.
    bIsUISound- True if sound is UI related, else false

◆ PlaySoundAtLocation() [1/2]

static void UGameplayStatics::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 
)
inlinestatic

◆ PlaySoundAtLocation() [2/2]

void UGameplayStatics::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 
)
static

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.

Parameters
Sound- sound to play
Location- World position to play sound at
Rotation- World rotation to play sound at
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far in to the sound to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with
ConcurrencySettings- Override concurrency settings package to play sound with
OwningActor- The actor to use as the "owner" for concurrency settings purposes. Allows PlaySound calls to do a concurrency limit per owner.

◆ PopSoundMixModifier()

void UGameplayStatics::PopSoundMixModifier ( const UObject WorldContextObject,
class USoundMix InSoundMixModifier 
)
static

Pop a sound mix modifier from the audio system

Parameters
InSoundMixModifierThe Sound Mix Modifier to remove from the system

◆ PredictProjectilePath()

bool UGameplayStatics::PredictProjectilePath ( const UObject WorldContextObject,
const FPredictProjectilePathParams PredictParams,
FPredictProjectilePathResult PredictResult 
)
static

Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns true if it hit something.

Parameters
PredictParamsInput params to the trace (start location, velocity, time to simulate, etc).
PredictResultOutput result of the trace (Hit result, array of location/velocity/times for each trace step, etc).
Returns
True if hit something along the path (if tracing with collision).

◆ PrimeAllSoundsInSoundClass()

void UGameplayStatics::PrimeAllSoundsInSoundClass ( class USoundClass InSoundClass)
static

Primes the sound waves in the given USoundClass, caching the first chunk of streamed audio.

◆ PrimeSound()

void UGameplayStatics::PrimeSound ( USoundBase InSound)
static

Primes the sound, caching the first chunk of streamed audio.

◆ ProjectWorldToScreen()

bool UGameplayStatics::ProjectWorldToScreen ( APlayerController const *  Player,
const FVector WorldPosition,
FVector2D ScreenPosition,
bool  bPlayerViewportRelative = false 
)
static

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

Parameters
PlayerProject using this player's view.
WorldPositionWorld position to project.
ScreenPosition(out) Corresponding 2D position in screen space
bPlayerViewportRelativeShould this be relative to the player viewport subregion (useful when using player attached widgets in split screen)

◆ PushSoundMixModifier()

void UGameplayStatics::PushSoundMixModifier ( const UObject WorldContextObject,
class USoundMix InSoundMixModifier 
)
static

Push a sound mix modifier onto the audio system

Parameters
InSoundMixModifierThe Sound Mix Modifier to add to the system

◆ RebaseLocalOriginOntoZero()

FVector UGameplayStatics::RebaseLocalOriginOntoZero ( UObject WorldContextObject,
FVector  WorldLocation 
)
static

Returns origin based position for local world location.

◆ RebaseZeroOriginOntoLocal()

FVector UGameplayStatics::RebaseZeroOriginOntoLocal ( UObject WorldContextObject,
FVector  WorldLocation 
)
static

Returns local location for origin based position.

◆ SaveDataToSlot()

bool UGameplayStatics::SaveDataToSlot ( const TArray< uint8 > &  InSaveData,
const FString &  SlotName,
const int32  UserIndex 
)
static

Save the contents of the buffer to a platform-specific save slot/file

Parameters
InSaveDataData to save
SlotNameName of save game slot to save to.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
Returns
Whether we successfully saved this information

◆ SaveGameToMemory()

bool UGameplayStatics::SaveGameToMemory ( USaveGame SaveGameObject,
TArray< uint8 > &  OutSaveData 
)
static

Serialize our USaveGame object into a given array of bytes

Note
This will write out all non-transient properties, the SaveGame property flag is not checked
Parameters
SaveGameObjectObject that contains data about the save game that we want to write out
OutSaveDataByte array that is written into
Returns
Whether we successfully wrote data

◆ SaveGameToSlot()

bool UGameplayStatics::SaveGameToSlot ( USaveGame SaveGameObject,
const FString &  SlotName,
const int32  UserIndex 
)
static

Save the contents of the SaveGameObject to a platform-specific save slot/file.

Note
This will write out all non-transient properties, the SaveGame property flag is not checked
Parameters
SaveGameObjectObject that contains data about the save game that we want to write out
SlotNameName of save game slot to save to.
UserIndexThe platform user index that identifies the user doing the saving, ignored on some platforms.
Returns
Whether we successfully saved this information

◆ SetActiveSpatialPluginByName()

bool UGameplayStatics::SetActiveSpatialPluginByName ( const UObject WorldContextObject,
FName  InPluginName 
)
static

Get list of available Audio Spatialization Plugins

◆ SetBaseSoundMix()

void UGameplayStatics::SetBaseSoundMix ( const UObject WorldContextObject,
class USoundMix InSoundMix 
)
static

Set the sound mix of the audio system for special EQing

◆ SetGlobalListenerFocusParameters()

void UGameplayStatics::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 
)
static

Sets the global listener focus parameters, which will scale focus behavior of sounds based on their focus azimuth settings in their attenuation settings.

  • Fire and Forget.
  • Not Replicated.
    Parameters
    FocusAzimuthScale- An angle scale value used to scale the azimuth angle that defines where sounds are in-focus.
    NonFocusAzimuthScale-An angle scale value used to scale the azimuth angle that defines where sounds are out-of-focus.
    FocusDistanceScale- A distance scale value to use for sounds which are in-focus. Values < 1.0 will reduce perceived distance to sounds, values > 1.0 will increase perceived distance to in-focus sounds.
    NonFocusDistanceScale- A distance scale value to use for sounds which are out-of-focus. Values < 1.0 will reduce perceived distance to sounds, values > 1.0 will increase perceived distance to in-focus sounds.
    FocusVolumeScale-A volume attenuation value to use for sounds which are in-focus.
    NonFocusVolumeScale-A volume attenuation value to use for sounds which are out-of-focus.
    FocusPriorityScale- A priority scale value (> 0.0) to use for sounds which are in-focus. Values < 1.0 will reduce the priority of in-focus sounds, values > 1.0 will increase the priority of in-focus sounds.
    NonFocusPriorityScale- A priority scale value (> 0.0) to use for sounds which are out-of-focus. Values < 1.0 will reduce the priority of sounds out-of-focus sounds, values > 1.0 will increase the priority of out-of-focus sounds.

◆ SetGlobalPitchModulation()

void UGameplayStatics::SetGlobalPitchModulation ( const UObject WorldContextObject,
float  PitchModulation,
float  TimeSec 
)
static

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

  • Fire and Forget.
  • Not Replicated.
    Parameters
    PitchModulation- A pitch modulation value to globally set.
    TimeSec- A time value to linearly interpolate the global modulation pitch over from it's current value.

◆ SetMaxAudioChannelsScaled()

void UGameplayStatics::SetMaxAudioChannelsScaled ( const UObject WorldContextObject,
float  MaxChannelCountScale 
)
static

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.

Parameters
MaxChannelCountScaleThe percentage of the original voice count to set the max number of voices to

◆ SetSoundClassDistanceScale()

void UGameplayStatics::SetSoundClassDistanceScale ( const UObject WorldContextObject,
USoundClass SoundClass,
float  DistanceAttenuationScale,
float  TimeSec = 0.0f 
)
static

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

  • Fire and Forget.
  • Not Replicated.
    Parameters
    SoundClass- Sound class to to use to set the attenuation distance scale on.
    DistanceAttenuationScale- A scalar for the attenuation distance used for computing distance attenuation.
    TimeSec- A time value to linearly interpolate from the current distance attenuation scale value to the new value.

◆ SetSoundMixClassOverride()

void UGameplayStatics::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 
)
static

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.

Parameters
InSoundMixModifierThe sound mix to modify.
InSoundClassThe sound class to override (or add) in the sound mix.
VolumeThe volume scale to set the sound class adjuster to.
PitchThe pitch scale to set the sound class adjuster to.
FadeInTimeThe interpolation time to use to go from the current sound class adjuster values to the new values.
bApplyToChildrenWhether or not to apply this override to the sound class' children or to just the specified sound class.

◆ SetSubtitlesEnabled()

void UGameplayStatics::SetSubtitlesEnabled ( bool  bEnabled)
static

Will set subtitles to be enabled or disabled.

Parameters
bEnabledwill enable subtitle drawing if true, disable if false.

◆ SetWorldOriginLocation()

void UGameplayStatics::SetWorldOriginLocation ( const UObject WorldContextObject,
FIntVector  NewLocation 
)
static

Requests a new location for a world origin.

◆ SpawnDecalAtLocation()

UDecalComponent * UGameplayStatics::SpawnDecalAtLocation ( const UObject WorldContextObject,
class UMaterialInterface DecalMaterial,
FVector  DecalSize,
FVector  Location,
FRotator  Rotation = FRotator(-90, 0, 0),
float  LifeSpan = 0 
)
static

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

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

◆ SpawnDecalAttached()

UDecalComponent * UGameplayStatics::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 
)
static

Spawns a decal attached to and following the specified component. Does not replicate.

Parameters
DecalMaterial- decal's material
DecalSize- size of decal
AttachComponent- Component to attach to.
AttachPointName- Optional named point within the AttachComponent to spawn the emitter at
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
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
LocationType- Specifies whether Location is a relative offset or an absolute world position
LifeSpan- destroy decal component after time runs out (0 = infinite)

◆ SpawnDialogue2D()

UAudioComponent * UGameplayStatics::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 
)
static

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 default will not have Spatialization applied. Sound instances will begin playing upon spawning this Audio Component.

  • Not Replicated.
    Parameters
    Dialogue- dialogue to play
    Context- context the dialogue is to play in
    VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
    PitchMultiplier- A linear scalar multiplied with the pitch.
    StartTime- How far in to the dialogue to begin playback at
    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
    Returns
    An audio component to manipulate the spawned sound

◆ SpawnDialogueAtLocation()

UAudioComponent * UGameplayStatics::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 
)
static

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 Audio Components at a specific World Location and Rotation. Useful for spatialized and/or distance-attenuated dialogue.

Parameters
Dialogue- Dialogue to play
Context- Context the dialogue is to play in
Location- World position to play dialogue at
Rotation- World rotation to play dialogue at
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far into the dialogue to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with
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
Returns
Audio Component to manipulate the playing dialogue with

◆ SpawnDialogueAttached() [1/2]

static UAudioComponent * UGameplayStatics::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 
)
inlinestatic

◆ SpawnDialogueAttached() [2/2]

UAudioComponent * UGameplayStatics::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 
)
static

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 Audio Components attached to a specific Scene Component. Useful for spatialized and/or distance-attenuated dialogue that needs to follow another object in space.

Parameters
Dialogue- dialogue to play
Context- context the dialogue is to play in
AttachComponent- Component to attach to.
AttachPointName- Optional named point within the AttachComponent to play the sound at
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
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
LocationType- Specifies whether Location is a relative offset or an absolute world position
bStopWhenAttachedToDestroyed- Specifies whether the sound should stop playing when the owner its attached to is destroyed.
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far in to the dialogue to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with
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
Returns
Audio Component to manipulate the playing dialogue with

◆ SpawnEmitterAttached() [1/2]

UParticleSystemComponent * UGameplayStatics::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 
)
static

◆ SpawnEmitterAttached() [2/2]

UParticleSystemComponent * UGameplayStatics::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 
)
static

Plays the specified effect attached to and following the specified component. The system will go away when the effect is complete. Does not replicate.

Parameters
EmitterTemplate- particle system to create
AttachComponent- Component to attach to.
AttachPointName- Optional named point within the AttachComponent to spawn the emitter at
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).
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).
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).
LocationType- Specifies whether Location is a relative offset or an absolute world position
bAutoDestroy- Whether the component will automatically be destroyed when the particle system completes playing or whether it can be reactivated
PoolingMethod- Method used for pooling this component. Defaults to none.
bAutoActivate- Whether the component will be automatically activated on creation.

◆ SpawnForceFeedbackAtLocation()

UForceFeedbackComponent * UGameplayStatics::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 
)
static

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.

Parameters
ForceFeedbackEffect- effect to play
Location- World position to center the effect at
Rotation- World rotation to center the effect at
IntensityMultiplier- Intensity multiplier
StartTime- How far in to the feedback effect to begin playback at
AttenuationSettings- Override attenuation settings package to play effect with
bAutoDestroy- Whether the returned force feedback component will be automatically cleaned up when the feedback pattern finishes (by completing or stopping) or whether it can be reactivated
Returns
Force Feedback Component to manipulate the playing feedback effect with

◆ SpawnForceFeedbackAttached()

UForceFeedbackComponent * UGameplayStatics::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 
)
static

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.

Parameters
ForceFeedbackEffect- effect to play
AttachComponent- Component to attach to.
AttachPointName- Optional named point within the AttachComponent to attach to
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
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
LocationType- Specifies whether Location is a relative offset or an absolute world position
bStopWhenAttachedToDestroyed- Specifies whether the feedback effect should stop playing when the owner of the attach to component is destroyed.
IntensityMultiplier- Intensity multiplier
StartTime- How far in to the feedback effect to begin playback at
AttenuationSettings- Override attenuation settings package to play effect with
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
Returns
Force Feedback Component to manipulate the playing feedback effect with

◆ SpawnSound2D()

UAudioComponent * UGameplayStatics::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 
)
static

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 Spatialization applied. Sound instances will begin playing upon spawning this Audio Component.

  • Not Replicated.
    Parameters
    Sound- Sound to play.
    VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
    PitchMultiplier- A linear scalar multiplied with the pitch.
    StartTime- How far in to the sound to begin playback at
    ConcurrencySettings- Override concurrency settings package to play sound with
    PersistAcrossLevelTransition- Whether the sound should continue to play when the map it was played in is unloaded
    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
    Returns
    An audio component to manipulate the spawned sound

◆ SpawnSoundAtLocation()

UAudioComponent * UGameplayStatics::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 
)
static

Spawns a sound at the given location. This does not travel with any actor. Replication is also not handled at this point.

Parameters
Sound- sound to play
Location- World position to play sound at
Rotation- World rotation to play sound at
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far in to the sound to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with
ConcurrencySettings- Override concurrency settings package to play sound with
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
Returns
An audio component to manipulate the spawned sound

◆ SpawnSoundAttached() [1/2]

static class UAudioComponent * UGameplayStatics::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 
)
inlinestatic

◆ SpawnSoundAttached() [2/2]

UAudioComponent * UGameplayStatics::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 
)
static

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.

Parameters
Sound- sound to play
AttachComponent- Component to attach to.
AttachPointName- Optional named point within the AttachComponent to play the sound at
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
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
LocationType- Specifies whether Location is a relative offset or an absolute world position
bStopWhenAttachedToDestroyed- Specifies whether the sound should stop playing when the owner of the attach to component is destroyed.
VolumeMultiplier- A linear scalar multiplied with the volume, in order to make the sound louder or softer.
PitchMultiplier- A linear scalar multiplied with the pitch.
StartTime- How far in to the sound to begin playback at
AttenuationSettings- Override attenuation settings package to play sound with
ConcurrencySettings- Override concurrency settings package to play sound with
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
Returns
An audio component to manipulate the spawned sound

◆ StripSaveGameHeader()

FMemoryReader UGameplayStatics::StripSaveGameHeader ( const TArray< uint8 > &  SaveData)
static

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 object serialization begins. NOTE: that the returned object has a reference to the supplied data - scope them accordingly.

Parameters
SaveDataA byte array, presumably produced by one of the SaveGame functions here.
Returns
A memory reader, wrapping SaveData, offset to the point past the header data.

◆ SuggestProjectileVelocity() [1/2]

bool UGameplayStatics::SuggestProjectileVelocity ( const FSuggestProjectileVelocityParameters ProjectileParams,
FVector OutTossVelocity 
)
static

Native version, has more options than the Blueprint version.

◆ SuggestProjectileVelocity() [2/2]

bool UGameplayStatics::SuggestProjectileVelocity ( const UObject WorldContextObject,
FVector TossVelocity,
FVector  StartLocation,
FVector  EndLocation,
float  TossSpeed,
bool  bHighArc = false,
float  CollisionRadius = 0.f,
float  OverrideGravityZ = 0,
ESuggestProjVelocityTraceOption::Type  TraceOption = ESuggestProjVelocityTraceOption::TraceFullPath,
FCollisionResponseParams ResponseParam = FCollisionResponseParams::DefaultResponseParam,
TArray< AActor * >  ActorsToIgnore = TArray<AActor*>(),
bool  bDrawDebug = false,
bool  bAcceptClosestOnNoSolutions = false 
)
static

◆ SuggestProjectileVelocity_CustomArc()

bool UGameplayStatics::SuggestProjectileVelocity_CustomArc ( const UObject WorldContextObject,
FVector OutLaunchVelocity,
FVector  StartPos,
FVector  EndPos,
float  OverrideGravityZ = 0,
float  ArcParam = 0.5f 
)
static

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.

Parameters
OutLaunchVelocityReturns the launch velocity required to reach the EndPos
StartPosStart position of the simulation
EndPosDesired end location for the simulation
OverrideGravityZOptional override of WorldGravityZ
ArcParamChange 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.

◆ SuggestProjectileVelocity_MovingTarget()

bool UGameplayStatics::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 
)
static

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 forces), and that the TargetActor is moving at a constant velocity.

Parameters
OutLaunchVelocityThe launch velocity returned from this calculation
ProjectileStartLocationLocation the projectile is launched from
TargetActorActor that the projectile should hit in TimeToTarget seconds
TargetLocationOffsetOffset to apply to the location the projectile is aiming for
GravityZOverrideOptional override of WorldGravityZ
TimeToTargetTime (in seconds) between the projectile being launched and the projectile hitting the TargetActor - clamped to be at least 0.1

◆ TransformWorldToFirstPerson()

FVector UGameplayStatics::TransformWorldToFirstPerson ( const FMinimalViewInfo ViewInfo,
const FVector WorldPosition,
bool  bIgnoreFirstPersonScale 
)
static

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 (e.g. projectiles or ejected shell casings) relative to the morphed first person geometry on screen.

Parameters
ViewInfoFMinimalViewInfo struct holding the first person camera parameters.
WorldPositionWorld space position to transform.
bIgnoreFirstPersonScaleIgnores the scaling that is applied to first person primitives which can be useful when spawning full size world space projectiles relative to a first person weapon.

◆ UFUNCTION()

UGameplayStatics::UFUNCTION ( BlueprintCallable  ,
Category  = "Game",
DisplayName  = "Predict Projectile Path (Advanced)",
meta  = (WorldContext = "WorldContextObject") 
) const

Predict the arc of a virtual projectile affected by gravity with collision checks along the arc. Returns true if it hit something.

Parameters
PredictParamsInput params to the trace (start location, velocity, time to simulate, etc).
PredictResultOutput result of the trace (Hit result, array of location/velocity/times for each trace step, etc).
Returns
True if hit something along the path (if tracing with collision).

◆ UnRetainAllSoundsInSoundClass()

void UGameplayStatics::UnRetainAllSoundsInSoundClass ( class USoundClass InSoundClass)
static

Iterate through all sound waves and releases handles to retained chunks. (If the chunk is not being played it will be up for eviction)

Member Data Documentation

◆ PredictParams

const FPredictProjectilePathParams& UGameplayStatics::PredictParams

◆ PredictResult

const FPredictProjectilePathParams FPredictProjectilePathResult& UGameplayStatics::PredictResult

The documentation for this class was generated from the following files: