UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GameplayStatics.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "UObject/Object.h"
10#include "UObject/Interface.h"
11#include "GameFramework/Actor.h"
17#include "Sound/DialogueTypes.h"
20#include "GameplayStatics.generated.h"
21
22class ASceneCapture2D;
23class UAudioComponent;
25class UBlueprint;
26class UDecalComponent;
27class UDialogueWave;
28class UParticleSystem;
29class UParticleSystemComponent;
30class USaveGame;
32class USceneComponent;
34class USoundBase;
36class UStaticMesh;
37class FMemoryReader;
39struct FDialogueContext;
40
41
42
45
48
50UCLASS(MinimalAPI)
52{
54
55 // --- Create Object
56 UFUNCTION(BlueprintCallable, Category = "Spawning", meta = (BlueprintInternalUseOnly = "true", DefaultToSelf = "Outer"))
57 static ENGINE_API UObject* SpawnObject(TSubclassOf<UObject> ObjectClass, UObject* Outer);
58
59 // --- Spawning functions ------------------------------
60
62 UFUNCTION(BlueprintCallable, Category="Spawning", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction = "true", BlueprintInternalUseOnly = "true", DeprecatedFunction="Note", DeprecationMessage = "Use BeginSpawningActorFromClass"))
63 static ENGINE_API class AActor* BeginSpawningActorFromBlueprint(const UObject* WorldContextObject, const class UBlueprint* Blueprint, const FTransform& SpawnTransform, bool bNoCollisionFail);
64
66 UFUNCTION(BlueprintCallable, Category = "Spawning", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true", BlueprintInternalUseOnly = "true"))
67 static ENGINE_API class AActor* BeginDeferredActorSpawnFromClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, const FTransform& SpawnTransform, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::Undefined, AActor* Owner = nullptr, ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot);
68
70 UFUNCTION(BlueprintCallable, Category="Spawning", meta=(UnsafeDuringActorConstruction = "true", BlueprintInternalUseOnly = "true"))
71 static ENGINE_API class AActor* FinishSpawningActor(class AActor* Actor, const FTransform& SpawnTransform, ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot);
72
73 // --- Actor functions ------------------------------
74
76 UFUNCTION(BlueprintCallable, Category="Transformation")
77 static ENGINE_API FVector GetActorArrayAverageLocation(const TArray<AActor*>& Actors);
78
80 UFUNCTION(BlueprintCallable, Category="Collision")
81 static ENGINE_API void GetActorArrayBounds(const TArray<AActor*>& Actors, bool bOnlyCollidingComponents, FVector& Center, FVector& BoxExtent);
82
88 UFUNCTION(BlueprintCallable, Category="Actor", meta=(WorldContext="WorldContextObject", DeterminesOutputType="ActorClass"))
89 static ENGINE_API class AActor* GetActorOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass);
90
97 UFUNCTION(BlueprintCallable, Category="Actor", meta=(WorldContext="WorldContextObject", DeterminesOutputType="ActorClass", DynamicOutputParam="OutActors"))
98 static ENGINE_API void GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors);
99
106 UFUNCTION(BlueprintCallable, Category="Actor", meta=(WorldContext="WorldContextObject", DeterminesOutputType="Interface", DynamicOutputParam="OutActors"))
107 static ENGINE_API void GetAllActorsWithInterface(const UObject* WorldContextObject, TSubclassOf<UInterface> Interface, TArray<AActor*>& OutActors);
108
115 UFUNCTION(BlueprintCallable, Category="Actor", meta=(WorldContext="WorldContextObject"))
116 static ENGINE_API void GetAllActorsWithTag(const UObject* WorldContextObject, FName Tag, TArray<AActor*>& OutActors);
117
125 UFUNCTION(BlueprintCallable, Category = "Actor", meta = (WorldContext="WorldContextObject", DeterminesOutputType="ActorClass", DynamicOutputParam="OutActors"))
126 static ENGINE_API void GetAllActorsOfClassWithTag(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, FName Tag, TArray<AActor*>& OutActors);
127
135 UFUNCTION(BlueprintPure, Category = "Actor")
136 static ENGINE_API AActor* FindNearestActor(FVector Origin, const TArray<AActor*>& ActorsToCheck, float& Distance);
137
138 // --- Player functions ------------------------------
139
141 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
142 static ENGINE_API class UGameInstance* GetGameInstance(const UObject* WorldContextObject);
143
148 UFUNCTION(BlueprintPure, Category="Game", meta = (WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
149 static ENGINE_API int32 GetNumPlayerStates(const UObject* WorldContextObject);
150
158 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true"))
159 static ENGINE_API class APlayerState* GetPlayerState(const UObject* WorldContextObject, int32 PlayerStateIndex);
160
167 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true"))
168 static ENGINE_API class APlayerState* GetPlayerStateFromUniqueNetId(const UObject* WorldContextObject, const FUniqueNetIdRepl& UniqueId);
169
174 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true"))
175 static ENGINE_API int32 GetNumPlayerControllers(const UObject* WorldContextObject);
176
181 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true"))
182 static ENGINE_API int32 GetNumLocalPlayerControllers(const UObject* WorldContextObject);
183
191 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
192 static ENGINE_API class APlayerController* GetPlayerController(const UObject* WorldContextObject, int32 PlayerIndex);
193
200 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
201 static ENGINE_API class APawn* GetPlayerPawn(const UObject* WorldContextObject, int32 PlayerIndex);
202
209 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
210 static ENGINE_API class ACharacter* GetPlayerCharacter(const UObject* WorldContextObject, int32 PlayerIndex);
211
218 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
219 static ENGINE_API class APlayerCameraManager* GetPlayerCameraManager(const UObject* WorldContextObject, int32 PlayerIndex);
220
227 UFUNCTION(BlueprintPure, BlueprintCosmetic, Category="Game", meta=(WorldContext="WorldContextObject"))
228 static ENGINE_API bool IsAnyLocalPlayerCameraWithinRange(const UObject* WorldContextObject, const FVector& Location, float MaximumRange);
229
235 UFUNCTION(BlueprintPure, Category="Game", meta=(DisplayName="Get Local Player Controller From ID", WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
236 static ENGINE_API class APlayerController* GetPlayerControllerFromID(const UObject* WorldContextObject, int32 ControllerID);
237
243 UFUNCTION(BlueprintPure, Category="Game", meta=(DisplayName="Get Local Player Controller From Platform User", WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
244 static ENGINE_API APlayerController* GetPlayerControllerFromPlatformUser(const UObject* WorldContextObject, FPlatformUserId UserId);
245
253 UFUNCTION(BlueprintCallable, Category = "Game", meta = (DisplayName="Create Local Player", WorldContext = "WorldContextObject", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true"))
254 static ENGINE_API class APlayerController* CreatePlayer(const UObject* WorldContextObject, int32 ControllerId = -1, bool bSpawnPlayerController = true);
255
263 UFUNCTION(BlueprintCallable, Category = "Game", meta = (AutoCreateRefTerm="UserId", DisplayName="Create Local Player For Platform User", WorldContext = "WorldContextObject", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true"))
264 static ENGINE_API class APlayerController* CreatePlayerFromPlatformUser(const UObject* WorldContextObject, FPlatformUserId UserId, bool bSpawnPlayerController = true);
265
272 UFUNCTION(BlueprintCallable, Category = "Game", meta = (DisplayName="Remove Local Player", UnsafeDuringActorConstruction = "true"))
273 static ENGINE_API void RemovePlayer(APlayerController* Player, bool bDestroyPawn);
274
281 UFUNCTION(BlueprintPure, Category="Game", meta=(DisplayName="Get Local Player Controller ID", UnsafeDuringActorConstruction="true"))
282 static ENGINE_API int32 GetPlayerControllerID(APlayerController* Player);
283
290 UFUNCTION(BlueprintCallable, Category="Game", meta=(DisplayName="Set Local Player Controller ID",UnsafeDuringActorConstruction="true"))
291 static ENGINE_API void SetPlayerControllerID(APlayerController* Player, int32 ControllerId);
292
299 UFUNCTION(BlueprintCallable, Category="Game", meta=(DisplayName="Set Local Player Controller Platform User Id",UnsafeDuringActorConstruction="true"))
300 static ENGINE_API void SetPlayerPlatformUserId(APlayerController* PlayerController, FPlatformUserId UserId);
301
302 // --- Level Streaming functions ------------------------
303
305 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", Latent = "", LatentInfo = "LatentInfo", DisplayName = "Load Stream Level (by Name)"), Category="Game")
306 static ENGINE_API void LoadStreamLevel(const UObject* WorldContextObject, FName LevelName, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, FLatentActionInfo LatentInfo);
307
309 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", Latent = "", LatentInfo = "LatentInfo", DisplayName = "Load Stream Level (by Object Reference)"), Category="Game")
310 static ENGINE_API void LoadStreamLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, FLatentActionInfo LatentInfo);
311
313 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", Latent = "", LatentInfo = "LatentInfo", DisplayName = "Unload Stream Level (by Name)"), Category="Game")
314 static ENGINE_API void UnloadStreamLevel(const UObject* WorldContextObject, FName LevelName, FLatentActionInfo LatentInfo, bool bShouldBlockOnUnload);
315
317 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", Latent = "", LatentInfo = "LatentInfo", DisplayName = "Unload Stream Level (by Object Reference)"), Category="Game")
318 static ENGINE_API void UnloadStreamLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, FLatentActionInfo LatentInfo, bool bShouldBlockOnUnload);
319
321 UFUNCTION(BlueprintPure, meta=(WorldContext="WorldContextObject"), Category="Game")
322 static ENGINE_API class ULevelStreaming* GetStreamingLevel(const UObject* WorldContextObject, FName PackageName);
323
325 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject"), Category = "Game")
326 static ENGINE_API void FlushLevelStreaming(const UObject* WorldContextObject);
327
329 UFUNCTION(BlueprintCallable, Category = "Game")
330 static ENGINE_API void CancelAsyncLoading();
331
332
340 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", AdvancedDisplay = "2", DisplayName = "Open Level (by Name)"), Category="Game")
341 static ENGINE_API void OpenLevel(const UObject* WorldContextObject, FName LevelName, bool bAbsolute = true, FString Options = FString(TEXT("")));
342
350 UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", AdvancedDisplay = "2", DisplayName = "Open Level (by Object Reference)"), Category="Game")
351 static ENGINE_API void OpenLevelBySoftObjectPtr(const UObject* WorldContextObject, const TSoftObjectPtr<UWorld> Level, bool bAbsolute = true, FString Options = FString(TEXT("")));
352
358 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject", AdvancedDisplay = "1"), Category = "Game")
359 static ENGINE_API FString GetCurrentLevelName(const UObject* WorldContextObject, bool bRemovePrefixString = true);
360
361 // --- Global functions ------------------------------
362
364 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
365 static ENGINE_API class AGameModeBase* GetGameMode(const UObject* WorldContextObject);
366
368 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
369 static ENGINE_API class AGameStateBase* GetGameState(const UObject* WorldContextObject);
370
372 UFUNCTION(BlueprintPure, meta=(DisplayName = "Get Class", DeterminesOutputType = "Object"), Category="Utilities")
373 static ENGINE_API class UClass *GetObjectClass(const UObject *Object);
374
379 UFUNCTION(BlueprintPure, meta = (DisplayName = "IsA"), Category = "Utilities")
380 static ENGINE_API bool ObjectIsA(const UObject* Object, TSubclassOf<UObject> ObjectClass);
381
386 UFUNCTION(BlueprintPure, Category="Utilities|Time", meta=(WorldContext="WorldContextObject") )
387 static ENGINE_API float GetGlobalTimeDilation(const UObject* WorldContextObject);
388
393 UFUNCTION(BlueprintCallable, Category="Utilities|Time", meta=(WorldContext="WorldContextObject") )
394 static ENGINE_API void SetGlobalTimeDilation(const UObject* WorldContextObject, float TimeDilation);
395
401 UFUNCTION(BlueprintCallable, Category="Game", meta=(WorldContext="WorldContextObject") )
402 static ENGINE_API bool SetGamePaused(const UObject* WorldContextObject, bool bPaused);
403
408 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject") )
409 static ENGINE_API bool IsGamePaused(const UObject* WorldContextObject);
410
415 UFUNCTION(BlueprintCallable, Category = "Viewport", meta = (WorldContext = "WorldContextObject"))
416 static ENGINE_API void SetForceDisableSplitscreen(const UObject* WorldContextObject, bool bDisable);
417
422 UFUNCTION(BlueprintPure, Category = "Viewport", meta = (WorldContext = "WorldContextObject"))
423 static ENGINE_API bool IsSplitscreenForceDisabled(const UObject* WorldContextObject);
424
429 UFUNCTION(BlueprintCallable, Category = "Rendering", meta = (WorldContext = "WorldContextObject"))
430 static ENGINE_API void SetEnableWorldRendering(const UObject* WorldContextObject, bool bEnable);
431
436 UFUNCTION(BlueprintCallable, Category = "Rendering", meta = (WorldContext = "WorldContextObject"))
437 static ENGINE_API bool GetEnableWorldRendering(const UObject* WorldContextObject);
438
442 UFUNCTION(BlueprintPure, Category = "Viewport", meta = (WorldContext = "WorldContextObject"))
443 static ENGINE_API EMouseCaptureMode GetViewportMouseCaptureMode(const UObject* WorldContextObject);
444
448 UFUNCTION(BlueprintCallable, Category = "Viewport", meta = (WorldContext = "WorldContextObject"))
449 static ENGINE_API void SetViewportMouseCaptureMode(const UObject* WorldContextObject, const EMouseCaptureMode MouseCaptureMode);
450
463 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="Game|Damage", meta=(WorldContext="WorldContextObject", AutoCreateRefTerm="IgnoreActors"))
464 static ENGINE_API bool ApplyRadialDamage(const UObject* WorldContextObject, float BaseDamage, const FVector& Origin, float DamageRadius, TSubclassOf<class UDamageType> DamageTypeClass, const TArray<AActor*>& IgnoreActors, AActor* DamageCauser = NULL, AController* InstigatedByController = NULL, bool bDoFullDamage = false, ECollisionChannel DamagePreventionChannel = ECC_Visibility);
465
480 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="Game|Damage", meta=(WorldContext="WorldContextObject", AutoCreateRefTerm="IgnoreActors"))
481 static ENGINE_API bool ApplyRadialDamageWithFalloff(const UObject* WorldContextObject, float BaseDamage, float MinimumDamage, const FVector& Origin, float DamageInnerRadius, float DamageOuterRadius, float DamageFalloff, TSubclassOf<class UDamageType> DamageTypeClass, const TArray<AActor*>& IgnoreActors, AActor* DamageCauser = NULL, AController* InstigatedByController = NULL, ECollisionChannel DamagePreventionChannel = ECC_Visibility);
482
483
494 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="Game|Damage")
495 static ENGINE_API float ApplyPointDamage(AActor* DamagedActor, float BaseDamage, const FVector& HitFromDirection, const FHitResult& HitInfo, AController* EventInstigator, AActor* DamageCauser, TSubclassOf<class UDamageType> DamageTypeClass);
496
505 UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="Game|Damage")
506 static ENGINE_API float ApplyDamage(AActor* DamagedActor, float BaseDamage, AController* EventInstigator, AActor* DamageCauser, TSubclassOf<class UDamageType> DamageTypeClass);
507
508 // --- Camera functions ------------------------------
509
519 UFUNCTION(BlueprintCallable, Category="Camera", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction = "true"))
520 static ENGINE_API void PlayWorldCameraShake(const UObject* WorldContextObject, TSubclassOf<class UCameraShakeBase> Shake, FVector Epicenter, float InnerRadius, float OuterRadius, float Falloff = 1.f, bool bOrientShakeTowardsEpicenter = false);
521
522 // --- Particle functions ------------------------------
523
534 UFUNCTION(BlueprintCallable, Category="Effects", meta=(Keywords = "particle system", WorldContext="WorldContextObject", UnsafeDuringActorConstruction = "true"))
535 static ENGINE_API UParticleSystemComponent* SpawnEmitterAtLocation(const UObject* WorldContextObject, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation = FRotator::ZeroRotator, FVector Scale = FVector(1.f), bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivateSystem = true);
536
537 // Backwards compatible version of SpawnEmitterAttached for C++ without Scale
538 static ENGINE_API UParticleSystemComponent* SpawnEmitterAtLocation(const UObject* WorldContextObject, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation, bool bAutoDestroy, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivateSystem =true);
539
548 static ENGINE_API UParticleSystemComponent* SpawnEmitterAtLocation(UWorld* World, UParticleSystem* EmitterTemplate, const FTransform& SpawnTransform, bool bAutoDestroy = true, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivate = true);
549
550private:
551 static ENGINE_API UParticleSystemComponent* InternalSpawnEmitterAtLocation(UWorld* World, UParticleSystem* EmitterTemplate, FVector Location, FRotator Rotation, FVector Scale, bool bAutoDestroy, EPSCPoolMethod PoolingMethod = EPSCPoolMethod::None, bool bAutoActivate = true);
552
553public:
554
555 /* Struct of parameters passed to SuggestProjectileVelocity function. */
557 {
558 public:
559 const UObject* WorldContextObject = nullptr;
562 float TossSpeed = 0.f;
563 bool bFavorHighArc = false;
564 float CollisionRadius = 0.f;
565 float OverrideGravityZ = 0;
569 bool bDrawDebug = false;
570 bool bAcceptClosestOnNoSolutions = false;
571
572 FSuggestProjectileVelocityParameters(const UObject* World, FVector StartLocation, FVector EndLocation, float Speed)
573 : WorldContextObject{ World }, Start{ StartLocation }, End{ EndLocation }, TossSpeed{ Speed } {}
574 };
575
588 UFUNCTION(BlueprintCallable, Category="Effects", meta=(Keywords = "particle system", UnsafeDuringActorConstruction = "true"))
589 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);
590
591 // Backwards compatible version of SpawnEmitterAttached for C++ without Scale
592 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);
593
594 // --- Sound functions ------------------------------
595
602 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
603 static ENGINE_API bool AreAnyListenersWithinRange(const UObject* WorldContextObject, const FVector& Location, float MaximumRange);
604
605
615 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
616 static ENGINE_API bool GetClosestListenerLocation(const UObject* WorldContextObject, const FVector& Location, float MaximumRange, const bool bAllowAttenuationOverride, FVector& ListenerPosition);
617
626 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
627 static ENGINE_API void SetGlobalPitchModulation(const UObject* WorldContextObject, float PitchModulation, float TimeSec);
628
639 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
640 static ENGINE_API void SetSoundClassDistanceScale(const UObject* WorldContextObject, USoundClass* SoundClass, float DistanceAttenuationScale, float TimeSec = 0.0f);
641
642
663 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
664 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);
665
680 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Audio", meta=( WorldContext="WorldContextObject", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true" ))
681 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);
682
699 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Audio", meta=( WorldContext="WorldContextObject", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true", Keywords = "play" ))
700 static ENGINE_API UAudioComponent* SpawnSound2D(const UObject* WorldContextObject, USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundConcurrency* ConcurrencySettings = nullptr, bool bPersistAcrossLevelTransition = false, bool bAutoDestroy = true);
701
715 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Audio", meta=( WorldContext="WorldContextObject", AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true", Keywords = "play" ))
716 static ENGINE_API UAudioComponent* CreateSound2D(const UObject* WorldContextObject, USoundBase* Sound, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundConcurrency* ConcurrencySettings = nullptr, bool bPersistAcrossLevelTransition = false, bool bAutoDestroy = true);
717
732 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext="WorldContextObject", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true", Keywords = "play"))
733 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);
734
735 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)
736 {
737 PlaySoundAtLocation(WorldContextObject, Sound, Location, FRotator::ZeroRotator, VolumeMultiplier, PitchMultiplier, StartTime, AttenuationSettings, ConcurrencySettings, nullptr, InitialParams);
738 }
739
754 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext="WorldContextObject", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true", Keywords = "play"))
755 static ENGINE_API UAudioComponent* SpawnSoundAtLocation(const UObject* WorldContextObject, USoundBase* Sound, FVector Location, FRotator Rotation = FRotator::ZeroRotator, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, class USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true);
756
778 UFUNCTION(BlueprintCallable, Category="Audio", meta=(AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true", Keywords = "play"))
779 static ENGINE_API UAudioComponent* SpawnSoundAttached(USoundBase* Sound, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true);
780
781 static class UAudioComponent* SpawnSoundAttached(USoundBase* Sound, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, USoundConcurrency* ConcurrencySettings = nullptr, bool bAutoDestroy = true)
782 {
783 return SpawnSoundAttached(Sound, AttachToComponent, AttachPointName, Location, FRotator::ZeroRotator, LocationType, bStopWhenAttachedToDestroyed, VolumeMultiplier, PitchMultiplier, StartTime, AttenuationSettings, ConcurrencySettings, bAutoDestroy);
784 }
785
797 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Audio", meta=( WorldContext="WorldContextObject", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true" ))
798 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);
799
815 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Audio", meta=( WorldContext="WorldContextObject", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true", Keywords = "play" ))
816 static ENGINE_API UAudioComponent* SpawnDialogue2D(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, bool bAutoDestroy = true);
817
829 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext="WorldContextObject", AdvancedDisplay = "4", UnsafeDuringActorConstruction = "true"))
830 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);
831
832 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)
833 {
834 PlayDialogueAtLocation(WorldContextObject, Dialogue, Context, Location, FRotator::ZeroRotator, VolumeMultiplier, PitchMultiplier, StartTime, AttenuationSettings);
835 }
836
852 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext="WorldContextObject", AdvancedDisplay = "4", UnsafeDuringActorConstruction = "true", Keywords = "play"))
853 static ENGINE_API UAudioComponent* SpawnDialogueAtLocation(const UObject* WorldContextObject, UDialogueWave* Dialogue, const struct FDialogueContext& Context, FVector Location, FRotator Rotation = FRotator::ZeroRotator, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);
854
878 UFUNCTION(BlueprintCallable, Category="Audio", meta=(AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true", Keywords = "play"))
879 static ENGINE_API UAudioComponent* SpawnDialogueAttached(UDialogueWave* Dialogue, const FDialogueContext& Context, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);
880
881 static UAudioComponent* SpawnDialogueAttached(UDialogueWave* Dialogue, const FDialogueContext& Context, USceneComponent* AttachToComponent, FName AttachPointName, FVector Location, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, float VolumeMultiplier = 1.f, float PitchMultiplier = 1.f, float StartTime = 0.f, USoundAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true)
882 {
883 return SpawnDialogueAttached(Dialogue, Context, AttachToComponent, AttachPointName, Location, FRotator::ZeroRotator, LocationType, bStopWhenAttachedToDestroyed, VolumeMultiplier, PitchMultiplier, StartTime, AttenuationSettings, bAutoDestroy);
884 }
885
896 UFUNCTION(BlueprintCallable, Category="ForceFeedback", meta=(WorldContext="WorldContextObject", AdvancedDisplay = "3", UnsafeDuringActorConstruction = "true", Keywords = "play"))
897 static ENGINE_API UForceFeedbackComponent* SpawnForceFeedbackAtLocation(const UObject* WorldContextObject, UForceFeedbackEffect* ForceFeedbackEffect, FVector Location, FRotator Rotation = FRotator::ZeroRotator, bool bLooping = false, float IntensityMultiplier = 1.f, float StartTime = 0.f, UForceFeedbackAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);
898
913 UFUNCTION(BlueprintCallable, Category="ForceFeedback", meta=(AdvancedDisplay = "2", UnsafeDuringActorConstruction = "true", Keywords = "play"))
914 static ENGINE_API UForceFeedbackComponent* SpawnForceFeedbackAttached(UForceFeedbackEffect* ForceFeedbackEffect, USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, bool bStopWhenAttachedToDestroyed = false, bool bLooping = false, float IntensityMultiplier = 1.f, float StartTime = 0.f, class UForceFeedbackAttenuation* AttenuationSettings = nullptr, bool bAutoDestroy = true);
915
920 UFUNCTION(BlueprintCallable, Category = "Audio|Subtitles")
921 static ENGINE_API void SetSubtitlesEnabled(bool bEnabled);
922
927 UFUNCTION(BlueprintPure, Category = "Audio|Subtitles")
928 static ENGINE_API bool AreSubtitlesEnabled();
929
930 // --- Audio Functions ----------------------------
932 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject"))
933 static ENGINE_API void SetBaseSoundMix(const UObject* WorldContextObject, class USoundMix* InSoundMix);
934
936 UFUNCTION(BlueprintCallable, Category = "Audio")
937 static ENGINE_API void PrimeSound(USoundBase* InSound);
938
940 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
941 static ENGINE_API TArray<FName> GetAvailableSpatialPluginNames(const UObject* WorldContextObject);
942
944 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
945 static ENGINE_API FName GetActiveSpatialPluginName(const UObject* WorldContextObject);
946
948 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
949 static ENGINE_API bool SetActiveSpatialPluginByName(const UObject* WorldContextObject, FName InPluginName);
950
952 UFUNCTION(BlueprintCallable, Category = "Audio")
953 static ENGINE_API void PrimeAllSoundsInSoundClass(class USoundClass* InSoundClass);
954
956 UFUNCTION(BlueprintCallable, Category = "Audio")
957 static ENGINE_API void UnRetainAllSoundsInSoundClass(class USoundClass* InSoundClass);
958
968 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
969 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);
970
976 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
977 static ENGINE_API void ClearSoundMixClassOverride(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier, class USoundClass* InSoundClass, float FadeOutTime = 1.0f);
978
982 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject"))
983 static ENGINE_API void PushSoundMixModifier(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier);
984
988 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject"))
989 static ENGINE_API void PopSoundMixModifier(const UObject* WorldContextObject, class USoundMix* InSoundMixModifier);
990
992 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject"))
993 static ENGINE_API void ClearSoundMixModifiers(const UObject* WorldContextObject);
994
1002 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject", AdvancedDisplay = "2"))
1003 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);
1004
1010 UFUNCTION(BlueprintCallable, Category="Audio", meta=(WorldContext = "WorldContextObject"))
1011 static ENGINE_API void DeactivateReverbEffect(const UObject* WorldContextObject, FName TagName);
1012
1016 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
1017 static ENGINE_API class UReverbEffect* GetCurrentReverbEffect(const UObject* WorldContextObject);
1018
1024 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
1025 static ENGINE_API void SetMaxAudioChannelsScaled(const UObject* WorldContextObject, float MaxChannelCountScale);
1026
1030 UFUNCTION(BlueprintCallable, Category = "Audio", meta = (WorldContext = "WorldContextObject"))
1031 static ENGINE_API int32 GetMaxAudioChannelCount(const UObject* WorldContextObject);
1032
1033
1034 // --- Decal functions ------------------------------
1035
1043 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Rendering|Decal", meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction = "true"))
1044 static ENGINE_API UDecalComponent* SpawnDecalAtLocation(const UObject* WorldContextObject, class UMaterialInterface* DecalMaterial, FVector DecalSize, FVector Location, FRotator Rotation = FRotator(-90, 0, 0), float LifeSpan = 0);
1045
1056 UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="Rendering|Decal", meta=(UnsafeDuringActorConstruction = "true"))
1057 static ENGINE_API UDecalComponent* SpawnDecalAttached(class UMaterialInterface* DecalMaterial, FVector DecalSize, class USceneComponent* AttachToComponent, FName AttachPointName = NAME_None, FVector Location = FVector(ForceInit), FRotator Rotation = FRotator::ZeroRotator, EAttachLocation::Type LocationType = EAttachLocation::KeepRelativeOffset, float LifeSpan = 0);
1058
1078 UFUNCTION(BlueprintPure, Category = "Collision", meta=(NativeBreakFunc, AdvancedDisplay="3"))
1079 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);
1080
1101 UFUNCTION(BlueprintPure, Category = "Collision", meta = (NativeMakeFunc, AdvancedDisplay="2", Normal="0,0,1", ImpactNormal="0,0,1"))
1102 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);
1103
1104
1108 UFUNCTION(BlueprintPure, Category="Collision")
1109 static ENGINE_API EPhysicalSurface GetSurfaceType(const struct FHitResult& Hit);
1110
1114 UFUNCTION(BlueprintPure, Category = "Collision")
1115 static ENGINE_API bool FindCollisionUV(const struct FHitResult& Hit, int32 UVChannel, FVector2D& UV);
1116
1117 // --- Save Game functions ------------------------------
1118
1124 UFUNCTION(BlueprintCallable, Category="SaveGame", meta=(DeterminesOutputType="SaveGameClass"))
1126
1135 static ENGINE_API bool SaveGameToMemory(USaveGame* SaveGameObject, TArray<uint8>& OutSaveData);
1136
1144 static ENGINE_API bool SaveDataToSlot(const TArray<uint8>& InSaveData, const FString& SlotName, const int32 UserIndex);
1145
1156 static ENGINE_API void AsyncSaveGameToSlot(USaveGame* SaveGameObject, const FString& SlotName, const int32 UserIndex, FAsyncSaveGameToSlotDelegate SavedDelegate = FAsyncSaveGameToSlotDelegate());
1157
1167 UFUNCTION(BlueprintCallable, Category="SaveGame")
1168 static ENGINE_API bool SaveGameToSlot(USaveGame* SaveGameObject, const FString& SlotName, const int32 UserIndex);
1169
1175 UFUNCTION(BlueprintCallable, Category="SaveGame")
1176 static ENGINE_API bool DoesSaveGameExist(const FString& SlotName, const int32 UserIndex);
1177
1183 static ENGINE_API USaveGame* LoadGameFromMemory(const TArray<uint8>& InSaveData);
1184
1192 static ENGINE_API bool LoadDataFromSlot(TArray<uint8>& OutSaveData, const FString& SlotName, const int32 UserIndex);
1193
1203 static ENGINE_API void AsyncLoadGameFromSlot(const FString& SlotName, const int32 UserIndex, FAsyncLoadGameFromSlotDelegate LoadedDelegate);
1204
1211 UFUNCTION(BlueprintCallable, Category="SaveGame")
1212 static ENGINE_API USaveGame* LoadGameFromSlot(const FString& SlotName, const int32 UserIndex);
1213
1223 static ENGINE_API FMemoryReader StripSaveGameHeader(const TArray<uint8>& SaveData);
1224
1231 UFUNCTION(BlueprintCallable, Category = "SaveGame")
1232 static ENGINE_API bool DeleteGameInSlot(const FString& SlotName, const int32 UserIndex);
1233
1235 UFUNCTION(BlueprintPure, Category = "Utilities|Time", meta = (WorldContext="WorldContextObject"))
1236 static ENGINE_API double GetWorldDeltaSeconds(const UObject* WorldContextObject);
1237
1239 UFUNCTION(BlueprintPure, Category="Utilities|Time", meta=(WorldContext="WorldContextObject"))
1240 static ENGINE_API double GetTimeSeconds(const UObject* WorldContextObject);
1241
1243 UFUNCTION(BlueprintPure, Category="Utilities|Time", meta=(WorldContext="WorldContextObject"))
1244 static ENGINE_API double GetUnpausedTimeSeconds(const UObject* WorldContextObject);
1245
1247 UFUNCTION(BlueprintPure, Category="Utilities|Time", meta=(WorldContext="WorldContextObject"))
1248 static ENGINE_API double GetRealTimeSeconds(const UObject* WorldContextObject);
1249
1251 UFUNCTION(BlueprintPure, Category="Utilities|Time", meta=(WorldContext="WorldContextObject"))
1252 static ENGINE_API double GetAudioTimeSeconds(const UObject* WorldContextObject);
1253
1255 UFUNCTION(BlueprintPure, Category="Utilities|Time")
1256 static ENGINE_API void GetAccurateRealTime(int32& Seconds, double& PartialSeconds);
1257
1258 /*~ DVRStreaming API */
1259
1264 UFUNCTION(BlueprintCallable, Category="Game", meta=(Enable="true"))
1265 static ENGINE_API void EnableLiveStreaming(bool Enable);
1266
1270 UFUNCTION(BlueprintPure, Category="Game")
1271 static ENGINE_API FString GetPlatformName();
1272
1287 UFUNCTION(BlueprintCallable, Category="Game", DisplayName="Suggest Projectile Velocity", meta=(WorldContext="WorldContextObject"))
1288 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);
1289
1290 UE_DEPRECATED(5.4, "Deprecated parameter list. Please use FSuggestProjectileVelocityParameters instead.")
1291 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);
1292
1294 static ENGINE_API bool SuggestProjectileVelocity(const FSuggestProjectileVelocityParameters& ProjectileParams, FVector& OutTossVelocity);
1295
1296
1298 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);
1299
1321 UFUNCTION(BlueprintCallable, Category = "Game", DisplayName="Predict Projectile Path By ObjectType", meta = (WorldContext = "WorldContextObject", AutoCreateRefTerm = "ActorsToIgnore", AdvancedDisplay = "DrawDebugTime, DrawDebugType, SimFrequency, MaxSimTime, OverrideGravityZ", bTracePath = true))
1322 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);
1323
1345 UFUNCTION(BlueprintCallable, Category = "Game", DisplayName="Predict Projectile Path By TraceChannel", meta = (WorldContext = "WorldContextObject", AutoCreateRefTerm = "ActorsToIgnore", AdvancedDisplay = "DrawDebugTime, DrawDebugType, SimFrequency, MaxSimTime, OverrideGravityZ", TraceChannel = ECC_WorldDynamic, bTracePath = true))
1346 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);
1347
1356 static ENGINE_API bool PredictProjectilePath(const UObject* WorldContextObject, const FPredictProjectilePathParams& PredictParams, FPredictProjectilePathResult& PredictResult);
1357
1366 UFUNCTION(BlueprintCallable, Category = "Game", DisplayName="Predict Projectile Path (Advanced)", meta = (WorldContext = "WorldContextObject"))
1368
1380 UFUNCTION(BlueprintCallable, Category = "Game", DisplayName = "Suggest Projectile Velocity Custom Arc", meta = (WorldContext = "WorldContextObject", AdvancedDisplay = "OverrideGravityZ, ArcParam"))
1381 static ENGINE_API bool SuggestProjectileVelocity_CustomArc(const UObject* WorldContextObject, FVector& OutLaunchVelocity, FVector StartPos, FVector EndPos, float OverrideGravityZ = 0, float ArcParam = 0.5f);
1382
1394 UFUNCTION(BlueprintCallable, Category = "Game", DisplayName = "Suggest Projectile Velocity Moving Target", meta = (WorldContext = "WorldContextObject", AdvancedDisplay = "DrawDebugType, DrawDebugTime, DrawDebugColor"))
1395 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);
1396
1398 UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject") )
1399 static ENGINE_API FIntVector GetWorldOriginLocation(const UObject* WorldContextObject);
1400
1402 UFUNCTION(BlueprintCallable, Category="Game", meta=(WorldContext="WorldContextObject"))
1403 static ENGINE_API void SetWorldOriginLocation(const UObject* WorldContextObject, FIntVector NewLocation);
1404
1406 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject"))
1407 static ENGINE_API FVector RebaseLocalOriginOntoZero(UObject* WorldContextObject, FVector WorldLocation);
1408
1410 UFUNCTION(BlueprintPure, Category = "Game", meta = (WorldContext = "WorldContextObject"))
1411 static ENGINE_API FVector RebaseZeroOriginOntoLocal(UObject* WorldContextObject, FVector WorldLocation);
1412
1422 UFUNCTION(BlueprintCallable, Category = "Foliage", meta = (WorldContext = "WorldContextObject", UnsafeDuringActorConstruction = "true"))
1423 static ENGINE_API int32 GrassOverlappingSphereCount(const UObject* WorldContextObject, const UStaticMesh* StaticMesh, FVector CenterPosition, float Radius);
1424
1432 UFUNCTION(BlueprintPure, Category = "Camera", meta = (Keywords = "unproject"))
1433 static ENGINE_API bool DeprojectScreenToWorld(APlayerController const* Player, const FVector2D& ScreenPosition, FVector& WorldPosition, FVector& WorldDirection);
1434
1442 UFUNCTION(BlueprintPure, Category = "Camera", meta = (Keywords = "unproject"))
1443 static ENGINE_API bool DeprojectSceneCaptureToWorld(ASceneCapture2D const* SceneCapture2D, const FVector2D& TargetUV, FVector& WorldPosition, FVector& WorldDirection);
1444
1452 UFUNCTION(BlueprintPure, Category = "Camera", meta = (Keywords = "unproject"))
1453 static ENGINE_API bool DeprojectSceneCaptureComponentToWorld(USceneCaptureComponent2D* SceneCaptureComponent2D, const FVector2D& TargetUV, FVector& WorldPosition, FVector& WorldDirection);
1454
1462 UFUNCTION(BlueprintPure, Category = "Camera")
1463 static ENGINE_API bool ProjectWorldToScreen(APlayerController const* Player, const FVector& WorldPosition, FVector2D& ScreenPosition, bool bPlayerViewportRelative = false);
1464
1473 UFUNCTION(BlueprintPure, Category = "Camera")
1474 static ENGINE_API FVector TransformWorldToFirstPerson(const FMinimalViewInfo& ViewInfo, const FVector& WorldPosition, bool bIgnoreFirstPersonScale);
1475
1483 UFUNCTION(BlueprintPure, Category = "Camera")
1484 static ENGINE_API void GetViewProjectionMatrix(FMinimalViewInfo DesiredView, FMatrix &ViewMatrix, FMatrix &ProjectionMatrix, FMatrix &ViewProjectionMatrix);
1485
1489 static ENGINE_API void CalculateViewProjectionMatricesFromViewTarget(AActor* InViewTarget, FMatrix& OutViewMatrix, FMatrix& OutProjectionMatrix, FMatrix& OutViewProjectionMatrix);
1490
1495
1496 //~ Utility functions for interacting with Options strings
1497
1498 //~=========================================================================
1499 //~ URL Parsing
1500
1501 static ENGINE_API bool GrabOption( FString& Options, FString& ResultString );
1502
1509 UFUNCTION(BlueprintPure, Category="Game Options", meta=(BlueprintThreadSafe))
1510 static ENGINE_API void GetKeyValue( const FString& Pair, FString& Key, FString& Value );
1511
1518 UFUNCTION(BlueprintPure, Category="Game Options", meta=(BlueprintThreadSafe))
1519 static ENGINE_API FString ParseOption( FString Options, const FString& Key );
1520
1527 UFUNCTION(BlueprintPure, Category="Game Options", meta=(BlueprintThreadSafe))
1528 static ENGINE_API bool HasOption( FString Options, const FString& InKey );
1529
1536 UFUNCTION(BlueprintPure, Category="Game Options", meta=(BlueprintThreadSafe))
1537 static ENGINE_API int32 GetIntOption( const FString& Options, const FString& Key, int32 DefaultValue);
1538
1539 //~=========================================================================
1540 //~ Launch Options Parsing
1541
1546 UFUNCTION(BlueprintPure, Category = "Utilities")
1547 static ENGINE_API bool HasLaunchOption(const FString& OptionToCheck);
1548
1556 UFUNCTION(BlueprintCallable, Category = "Accessibility")
1557 static ENGINE_API void AnnounceAccessibleString(const FString& AnnouncementString);
1558};
1559
#define NULL
Definition oodle2base.h:134
ESpawnActorScaleMethod
Definition Actor.h:85
@ Normal
Definition AndroidInputInterface.h:116
int Volume
Definition AndroidPlatformMisc.cpp:380
PlayerIndex
Definition AppleControllerInterface.h:24
void CancelAsyncLoading()
Definition AsyncPackageLoader.cpp:716
EPhysicalSurface
Definition ChaosEngineInterface.h:21
@ ForceInit
Definition CoreMiscDefines.h:155
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_DELEGATE_ThreeParams(DelegateName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:66
EMouseCaptureMode
Definition EngineBaseTypes.h:42
EObjectTypeQuery
Definition EngineTypes.h:1160
ESpawnActorCollisionHandlingMethod
Definition EngineTypes.h:4170
ECollisionChannel
Definition EngineTypes.h:1088
return true
Definition ExternalRpcRegistry.cpp:601
#define FVector
Definition IOSSystemIncludes.h:8
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
const bool bTraceComplex
Definition PhysicsInterfaceUtils.h:19
EPSCPoolMethod
Definition WorldPSCPool.h:16
UEBinkAudioDecodeInterface * Interface
Definition binka_ue_decode_test.cpp:24
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Actor.h:257
Definition Character.h:242
Definition Controller.h:41
Definition GameStateBase.h:33
Definition PlayerCameraManager.h:189
Definition PlayerController.h:261
TObjectPtr< UPlayer > Player
Definition PlayerController.h:270
Definition PlayerState.h:42
Definition SceneCapture2D.h:17
Definition MemoryReader.h:17
Definition NameTypes.h:617
Definition UnrealType.h:3087
Definition Foliage.Build.cs:6
Definition Array.h:670
Definition EnumAsByte.h:22
Definition SubclassOf.h:30
Definition BlueprintFunctionLibrary.h:16
Definition Blueprint.h:403
Definition Class.h:3793
Definition DialogueWave.h:84
Definition ForceFeedbackAttenuation.h:21
Definition ForceFeedbackEffect.h:119
Definition GameInstance.h:152
struct FWorldContext * WorldContext
Definition GameInstance.h:156
Definition GameplayStatics.h:52
Definition LevelStreaming.h:139
Definition MaterialInterface.h:296
Definition Object.h:95
Definition ParticleSystem.h:160
Definition PhysicalMaterial.h:104
Definition ReverbEffect.h:13
Definition SaveGame.h:24
Definition SoundAttenuation.h:444
Definition SoundBase.h:109
Definition SoundClass.h:209
Definition SoundConcurrency.h:217
Definition SoundMix.h:173
Definition StaticMesh.h:593
Definition World.h:918
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
Definition EngineTypes.h:164
Definition KismetSystemLibrary.h:37
Definition GameplayStaticsTypes.h:11
Type
Definition GameplayStaticsTypes.h:13
@ TraceFullPath
Definition GameplayStaticsTypes.h:15
@ false
Definition radaudio_common.h:23
Definition CollisionQueryParams.h:324
static ENGINE_API FCollisionResponseParams DefaultResponseParam
Definition CollisionQueryParams.h:341
Definition DialogueTypes.h:44
Definition HitResult.h:21
Definition LatentActionManager.h:19
Definition Color.h:48
Definition CameraTypes.h:37
Definition CoreMiscDefines.h:470
Definition GameplayStaticsTypes.h:23
Definition GameplayStaticsTypes.h:186
Definition OnlineReplStructs.h:26
Definition Optional.h:131
Definition SoftObjectPtr.h:174
static CORE_API const TRotator< double > ZeroRotator
Definition Rotator.h:57
static CORE_API const TVector< double > ZeroVector
Definition Vector.h:79
FSuggestProjectileVelocityParameters(const UObject *World, FVector StartLocation, FVector EndLocation, float Speed)
Definition GameplayStatics.h:572
Definition AudioComponent.h:147