UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
World.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"
11#include "UObject/Object.h"
12#include "Misc/Guid.h"
13#include "UObject/Class.h"
15#include "Engine/EngineTypes.h"
17#include "GameTime.h"
19#include "WorldCollision.h"
21#include "EngineDefines.h"
28#include "AudioDeviceHandle.h"
31#include "CollisionProfile.h"
32#include "RHIFeatureLevel.h"
36#include "PSOPrecacheFwd.h"
37#include "World.generated.h"
38
39#define UE_API ENGINE_API
40
41class ABrush;
42class ACameraActor;
43class AController;
44class AGameModeBase;
45class AGameStateBase;
46class APhysicsVolume;
50class AWorldSettings;
51class UWorldPartition;
53class Error;
56class FTimerManager;
60class UAISystemBase;
62class UCanvas;
63class UDemoNetDriver;
65class ULevel;
66class ULevelStreaming;
67class ULocalPlayer;
70class UModel;
72class UNetConnection;
73class UNetDriver;
74class UPrimitiveComponent;
75class UTexture2D;
77class FSceneView;
78struct FUniqueNetIdRepl;
82
83template<typename,typename> class TOctree2;
84
89template <typename ActorType> class TActorIterator;
95
97
105
108{
109public:
110
112 World(NULL)
113 {}
114
116 {
117 // GWorld is changed often on the game thread when in PIE, accessing on any other thread is going to be a race condition
118 // In general, the rendering thread should not dereference UObjects, unless there is a mechanism in place to make it safe
120 return World;
121 }
122
123 inline const UWorld* operator->() const
124 {
126 return World;
127 }
128
130 {
132 return *World;
133 }
134
135 inline const UWorld& operator*() const
136 {
138 return *World;
139 }
140
142 {
143 World = InWorld;
144 return *this;
145 }
146
148 {
149 World = InProxy.World;
150 return *this;
151 }
152
153 inline bool operator==(const UWorldProxy& Other) const
154 {
155 return World == Other.World;
156 }
157
158 inline operator UWorld*() const
159 {
161 return World;
162 }
163
165 {
167 return World;
168 }
169
170private:
171
172 UWorld* World;
173};
174
175// List of delegates for the world being registered to an audio device.
177{
178public:
179 // Called whenever a world is registered to an audio device. UWorlds are not guaranteed to be registered to the same
180 // audio device throughout their lifecycle, and there is no guarantee on the lifespan of both the UWorld and the Audio
181 // Device registered in this callback.
184
185 // Called whenever a world is unregistered from an audio device. UWorlds are not guaranteed to be registered to the same
186 // audio device throughout their lifecycle, and there is no guarantee on the lifespan of both the UWorld and the Audio
187 // Device registered in this callback.
190};
191
194{
195private:
197 FURL PendingTravelURL;
199 UObject* LoadedPackage;
201 UWorld* CurrentWorld;
203 UWorld* LoadedWorld;
205 bool bTransitionInProgress;
207 bool bSwitchedToDefaultMap;
209 bool bPauseAtMidpoint;
211 bool bNeedCancelCleanUp;
213 FName WorldContextHandle;
215 double SeamlessTravelStartTime = 0.0;
216
218 void CopyWorldData();
219
221 void SeamlessTravelLoadCallback(const FName& PackageName, UPackage* LevelPackage, EAsyncLoadingResult::Type Result);
222
223 void SetHandlerLoadedData(UObject* InLevelPackage, UWorld* InLoadedWorld);
224
226 bool StartLoadingMap(FString MapPackageToLoadFrom);
227
229 void StartLoadingDestination();
230
231public:
233 : PendingTravelURL(NoInit)
234 , LoadedPackage(NULL)
235 , CurrentWorld(NULL)
236 , LoadedWorld(NULL)
237 , bTransitionInProgress(false)
238 , bSwitchedToDefaultMap(false)
239 , bPauseAtMidpoint(false)
240 , bNeedCancelCleanUp(false)
241 {}
242
248
250 inline bool IsInTransition() const
251 {
252 return bTransitionInProgress;
253 }
255 inline bool HasSwitchedToDefaultMap() const
256 {
257 return IsInTransition() && bSwitchedToDefaultMap;
258 }
259
261 inline FString GetDestinationMapName() const
262 {
263 return (IsInTransition() ? PendingTravelURL.Map : TEXT(""));
264 }
265
267 inline const UWorld* GetLoadedWorld() const
268 {
269 return LoadedWorld;
270 }
271
273 void CancelTravel();
274
280
287};
288
289
291USTRUCT()
293{
295
296
297 UPROPERTY()
298 FVector CamPosition;
299
301 UPROPERTY()
302 FRotator CamRotation;
303
305 UPROPERTY()
306 float CamOrthoZoom;
307
309 UPROPERTY()
310 bool CamUpdated;
311
313 : CamPosition(FVector::ZeroVector)
314 , CamRotation(FRotator::ZeroRotator)
315 , CamOrthoZoom(DEFAULT_ORTHOZOOM)
316 , CamUpdated(false)
317 {
318 }
319
321 : CamPosition(InCamPosition)
322 , CamRotation(InCamRotation)
323 , CamOrthoZoom(InCamOrthoZoom)
324 , CamUpdated(false)
325 {
326 }
327
328 // Needed for backwards compatibility for VER_UE4_ADD_EDITOR_VIEWS, can be removed along with it
330 {
331 Ar << I.CamPosition;
332 Ar << I.CamRotation;
333 Ar << I.CamOrthoZoom;
334
335 if ( Ar.IsLoading() )
336 {
337 I.CamUpdated = true;
338
340 {
342 }
343 }
344
345 return Ar;
346 }
347};
348
352USTRUCT()
354{
356
357
358 class UWorld* Target;
359
367 virtual void ExecuteTick(float DeltaTime, enum ELevelTick TickType, ENamedThreads::Type CurrentThread, const FGraphEventRef& MyCompletionGraphEvent) override;
369 virtual FString DiagnosticMessage() override;
371 virtual FName DiagnosticContext(bool bDetailed) override;
372};
373
374template<>
382
386USTRUCT()
388{
390
391
392 class UWorld* Target;
393
401 virtual void ExecuteTick(float DeltaTime, enum ELevelTick TickType, ENamedThreads::Type CurrentThread, const FGraphEventRef& MyCompletionGraphEvent) override;
403 virtual FString DiagnosticMessage() override;
405 virtual FName DiagnosticContext(bool bDetailed) override;
406};
407
408template<>
416
417/* Struct of optional parameters passed to SpawnActor function(s). */
419{
421
422 /* A name to assign as the Name of the Actor being spawned. If no value is specified, the name of the spawned Actor will be automatically generated using the form [Class]_[Number]. */
424
425 /* An Actor to use as a template when spawning the new Actor. The spawned Actor will be initialized using the property values of the template Actor. If left NULL the class default object (CDO) will be used to initialize the spawned Actor. */
427
428 /* The Actor that spawned this Actor. (Can be left as NULL). */
430
431 /* The APawn that is responsible for damage done by the spawned Actor. (Can be left as NULL). */
433
434 /* The ULevel to spawn the Actor in, i.e. the Outer of the Actor. If left as NULL the Outer of the Owner is used. If the Owner is NULL the persistent level is used. */
436
437#if WITH_EDITOR
438 /* The UPackage to set the Actor in. If left as NULL the Package will not be set and the actor will be saved in the same package as the persistent level. */
440
443
446#endif
447
448 /* The parent component to set the Actor in. */
449 class UChildActorComponent* OverrideParentComponent;
450
453
455 ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot;
456
457private:
458
459 friend class UPackageMapClient;
460
461 friend class UNetActorFactory;
462
463 /* Is the actor remotely owned. This should only be set true by the package map when it is creating an actor on a client that was replicated from the server. */
464 uint8 bRemoteOwned:1;
465
466public:
467
468 bool IsRemoteOwned() const { return bRemoteOwned; }
469
470 /* Determines whether spawning will not fail if certain conditions are not met. If true, spawning will not fail because the class being spawned is `bStatic=true` or because the class of the template Actor is not the same as the class of the Actor being spawned. */
472
473 /* Determines whether the construction script will be run. If true, the construction script will not be run on the spawned Actor. Only applicable if the Actor is being spawned from a Blueprint. */
475
476 /* Determines whether or not the actor may be spawned when running a construction script. If true spawning will fail if a construction script is being run. */
478
479#if !WITH_EDITOR
480 /* Force the spawned actor to use a globally unique name (provided name should be none). */
482#else
483 /* Determines whether the begin play cycle will run on the spawned actor when in the editor. */
485
486 /* Determines whether or not the actor should be hidden from the Scene Outliner */
488
491#endif
492
493 /* Modes that SpawnActor can use the supplied name when it is not None. */
495 {
496 /* Fatal if unavailable, application will assert */
498
499 /* Report an error return null if unavailable */
501
502 /* Return null if unavailable */
504
505 /* If the supplied Name is already in use the generate an unused one using the supplied version as a base */
507 };
508
509 /* In which way should SpawnActor should treat the supplied Name if not none. */
511
512 /* Flags used to describe the spawned actor/object instance. */
514
515 /* Custom function allowing the caller to specific a function to execute post actor construction but before other systems see this actor spawn. */
517};
518
519/* World actors spawmning helper functions */
521{
534
542
547};
548
555
582
583#if WITH_EDITOR
585{
587 FName Name;
588
590 UObject* Outer = nullptr;
591
594};
595
596/* FAsyncPreRegisterDDCRequest - info about an async DDC request that we're going to wait on before registering components */
598{
599 /* DDC Key used for the request */
600 FString DDCKey;
601
602 /* Handle for Async DDC request. 0 if no longer invalid. */
604public:
607 : DDCKey(InKey)
609 {}
610
613
615 UE_API bool PollAsynchronousCompletion();
616
618 UE_API void WaitAsynchronousCompletion();
619
621 UE_API bool GetAsynchronousResults(TArray<uint8>& OutData);
622
624 const FString& GetKey() const { return DDCKey; }
625};
626#endif
627
632USTRUCT()
634{
636
638
641
644
647
649 ELevelCollectionType GetType() const { return CollectionType; }
650
652 void SetType(const ELevelCollectionType InType) { CollectionType = InType; }
653
655 AGameStateBase* GetGameState() const { return GameState; }
656
659
661 UNetDriver* GetNetDriver() const { return NetDriver; }
662
664 void SetNetDriver(UNetDriver* const InNetDriver) { NetDriver = InNetDriver; }
665
667 UDemoNetDriver* GetDemoNetDriver() const { return DemoNetDriver; }
668
671
673 const TSet<TObjectPtr<ULevel>>& GetLevels() const { return Levels; }
674
676 UE_API void AddLevel(ULevel* const Level);
677
679 UE_API void RemoveLevel(ULevel* const Level);
680
682 UE_API void SetPersistentLevel(ULevel* const Level);
683
685 ULevel* GetPersistentLevel() const { return PersistentLevel; }
686
688 bool IsVisible() const { return bIsVisible; }
689
691 void SetIsVisible(const bool bInIsVisible) { bIsVisible = bInIsVisible; }
692
693private:
695 ELevelCollectionType CollectionType;
696
701 bool bIsVisible;
702
707 UPROPERTY()
708 TObjectPtr<class AGameStateBase> GameState;
709
714 UPROPERTY()
715 TObjectPtr<class UNetDriver> NetDriver;
716
721 UPROPERTY()
722 TObjectPtr<class UDemoNetDriver> DemoNetDriver;
723
728 UPROPERTY()
729 TObjectPtr<class ULevel> PersistentLevel;
730
732 UPROPERTY()
733 TSet<TObjectPtr<ULevel>> Levels;
734};
735
736template<>
744
780
781USTRUCT()
783{
785
787 : StreamingLevelsBeingConsidered(0)
788 {}
789
790private:
791
793 UPROPERTY()
794 TArray<TObjectPtr<ULevelStreaming>> StreamingLevels;
795
796 enum class EProcessReason : uint8
797 {
798 Add,
799 Reevaluate
800 };
801
803 TSortedMap<TObjectPtr<ULevelStreaming>, EProcessReason> LevelsToProcess;
804
806 int32 StreamingLevelsBeingConsidered;
807
812 UE_API void Add_Internal(ULevelStreaming* StreamingLevel, bool bGuaranteedNotInContainer);
813
814public:
815
816 const TArray<TObjectPtr<ULevelStreaming>>& GetStreamingLevels() const { return StreamingLevels; }
817
819
820 UE_API void BeginConsideration();
821 UE_API void EndConsideration();
822 bool AreStreamingLevelsBeingConsidered() { return StreamingLevelsBeingConsidered > 0; }
823
825 void Add(ULevelStreaming* StreamingLevel) { Add_Internal(StreamingLevel, false); }
826
827 /* Remove an element from the container. */
828 UE_API bool Remove(ULevelStreaming* StreamingLevel);
829
830 /* Remove the element at a given index from the container. */
831 UE_API void RemoveAt(int32 Index);
832
833 /* Returns if an element is in the container. */
834 UE_API bool Contains(ULevelStreaming* StreamingLevel) const;
835
836 /* Resets the container to an empty state without freeing array memory. */
837 UE_API void Reset();
838
839 /* Instructs the container that state changed such that the position in the priority sorted array the level may no longer be correct. */
840 UE_API void Reevaluate(ULevelStreaming* StreamingLevel);
841};
842
850
855{
857
858private:
859 static void BroadcastWorldPartitionInitialized(UWorld* InWorld, UWorldPartition* InWorldPartition);
860 static void BroadcastWorldPartitionUninitialized(UWorld* InWorld, UWorldPartition* InWorldPartition);
861};
862
903
904
916UCLASS(MinimalAPI, customConstructor, config=Engine)
918{
920
921 UE_API ~UWorld();
922
923#if WITH_EDITORONLY_DATA
927
928 // Group actors currently "active"
931
933 UPROPERTY(VisibleAnywhere, Instanced, Category=Thumbnail)
935#endif // WITH_EDITORONLY_DATA
936
939 TObjectPtr<class ULevel> PersistentLevel;
940
944
946 UE_DEPRECATED(5.6, "Please use GetLineBatcher(UWorld::ELineBatcherType::World")
948 TObjectPtr<class ULineBatchComponent> LineBatcher_DEPRECATED;
949
951 UE_DEPRECATED(5.6, "Please use GetLineBatcher(UWorld::ELineBatcherType::WorldPersistent")
953 TObjectPtr<class ULineBatchComponent> PersistentLineBatcher_DEPRECATED;
954
956 UE_DEPRECATED(5.6, "Please use GetLineBatcher(UWorld::ELineBatcherType::Foreground")
958 TObjectPtr<class ULineBatchComponent> ForegroundLineBatcher_DEPRECATED;
959
963
966 TObjectPtr<class UPhysicsCollisionHandler> PhysicsCollisionHandler;
967
970 TObjectPtr<class UPhysicsQueryHandler> PhysicsQueryHandler;
971
974 TArray<TObjectPtr<UObject>> ExtraReferencedObjects;
975
982 TArray<TObjectPtr<UObject>> PerModuleDataObjects;
983
984private:
987 TArray<TObjectPtr<ULevelStreaming>> StreamingLevels;
988
990 UPROPERTY(Transient, DuplicateTransient)
991 FStreamingLevelsToConsider StreamingLevelsToConsider;
992
993 UPROPERTY(Transient, DuplicateTransient)
994 TObjectPtr<AServerStreamingLevelsVisibility> ServerStreamingLevelsVisibility;
995
996public:
998 {
999 World = 0,
1000 WorldPersistent,
1001 Foreground,
1002 ForegroundPersistent,
1003 // --- ---
1004 NUM,
1005 Invalid = NUM
1006 };
1007
1009 UE_API ULineBatchComponent* GetLineBatcher(ELineBatcherType Type) const;
1010
1012 UE_API void FlushLineBatchers(const TArrayView<const UWorld::ELineBatcherType>& TypesToFlush);
1013
1015 UE_API bool SupportsMakingVisibleTransactionRequests() const;
1016
1018 UE_API bool SupportsMakingInvisibleTransactionRequests() const;
1019
1021 UE_API const AServerStreamingLevelsVisibility* GetServerStreamingLevelsVisibility() const;
1022
1024 const TArray<ULevelStreaming*>& GetStreamingLevels() const { return StreamingLevels; }
1025
1026 uint16 GetNumStreamingLevelsBeingLoaded() const { return NumStreamingLevelsBeingLoaded; }
1027
1029 bool IsStreamingLevelBeingConsidered(ULevelStreaming* StreamingLevel) const { return StreamingLevelsToConsider.Contains(StreamingLevel); }
1030
1032 bool HasStreamingLevelsToConsider() const { return StreamingLevelsToConsider.GetStreamingLevels().Num() > 0; }
1033
1035 UE_DEPRECATED(5.6, "Use IsLevelMakingVisible instead.")
1036 ULevel* GetCurrentLevelPendingVisibility() const { return nullptr; }
1037
1039 UE_API bool IsLevelMakingVisible(const ULevel* InLevel) const;
1040
1042 UE_API bool HasAnyLevelMakingVisible() const;
1043
1045 UE_DEPRECATED(5.6, "Use IsLevelMakingInvisible instead.")
1046 ULevel* GetCurrentLevelPendingInvisibility() const { return nullptr; }
1047
1049 UE_API bool IsLevelMakingInvisible(const ULevel* InLevel) const;
1050
1052 UE_API bool HasAnyLevelMakingInvisible() const;
1053
1055 UE_API void AddStreamingLevel(ULevelStreaming* StreamingLevelToAdd);
1056
1059
1061 UE_API void AddUniqueStreamingLevel(ULevelStreaming* StreamingLevelToAdd);
1062
1064 UE_API void AddUniqueStreamingLevels(TArrayView<ULevelStreaming* const> StreamingLevelsToAdd);
1065
1067 UE_API void SetStreamingLevels(TArray<ULevelStreaming*>&& StreamingLevels);
1068
1070 UE_API void SetStreamingLevels(TArrayView<ULevelStreaming* const> StreamingLevels);
1071
1075 UE_API bool RemoveStreamingLevel(ULevelStreaming* StreamingLevelToRemove);
1076
1080 UE_API bool RemoveStreamingLevelAt(int32 IndexToRemove);
1081
1086
1088 UE_API void ClearStreamingLevels();
1089
1091 UE_API void UpdateStreamingLevelShouldBeConsidered(ULevelStreaming* StreamingLevelToConsider);
1092
1094 UE_API void UpdateStreamingLevelPriority(ULevelStreaming* StreamingLevel);
1095
1097 UE_API void PopulateStreamingLevelsToConsider();
1098
1100 bool GetIsInBlockTillLevelStreamingCompleted() const { return IsInBlockTillLevelStreamingCompleted > 0; }
1101
1103 int32 GetBlockTillLevelStreamingCompletedEpoch() const { return BlockTillLevelStreamingCompletedEpoch; }
1104
1106 UPROPERTY()
1107 FString StreamingLevelsPrefix;
1108
1109#if UE_SUPPORT_FOR_ACTOR_TICK_DISABLE
1120 UE_API void EnableActorTickAndUserCallbacks(bool bEnable);
1122#endif
1123
1132 UE_API void PushComponentGroupMove(const FScopedMovementUpdate* Scope);
1133
1141 UE_API void ProcessPendingGroupMoves(bool bProcessAllMoves = true);
1142
1143private:
1149 TArray<FDeferredComponentMoveData> DeferredComponentMoves;
1150
1153 TObjectPtr<class ULineBatchComponent> LineBatchers[(int32)ELineBatcherType::NUM];
1154
1156 UE_API void SetLevelPendingVisibilityState(ULevel* InLevel, ELevelPendingVisibilityState InState);
1157
1159 UE_API bool CanAddLoadedLevelToWorld(ULevel* Level) const;
1160
1162 void SpawnAndSetNoPawnPlayerController(UNetConnection* Connection, uint8 NetPlayerIndex, int32 LocalPlayerIdentifier);
1163
1165 mutable TOptional<bool> bSupportsMakingVisibleTransactionRequests;
1166
1168 mutable TOptional<bool> bSupportsMakingInvisibleTransactionRequests;
1169
1171 mutable FTransactionallySafeRWLock PendingVisibilityLock;
1172
1175 TArray<TObjectPtr<class ULevel>> MakingVisibleLevels;
1176
1179 TArray<TObjectPtr<class ULevel>> MakingInvisibleLevels;
1180
1182 UPROPERTY()
1183 TObjectPtr<class UDemoNetDriver> DemoNetDriver;
1184
1185#if UE_SUPPORT_FOR_ACTOR_TICK_DISABLE
1187#endif
1188
1189public:
1191 UDemoNetDriver* GetDemoNetDriver() const { return DemoNetDriver; }
1192
1195
1197 UPROPERTY()
1198 TObjectPtr<class AParticleEventManager> MyParticleEventManager;
1199
1200private:
1203 TObjectPtr<APhysicsVolume> DefaultPhysicsVolume;
1204
1205 // Flag for allowing physics state creation deferall during load
1206 bool bAllowDeferredPhysicsStateCreation;
1207
1208public:
1209
1211 inline ERHIFeatureLevel::Type GetFeatureLevel() const{ return FeatureLevel; }
1214
1217
1221 double LastRenderTime = 0.0;
1222
1224 UE_DEPRECATED(5.3, "FeatureLevel will be removed in the future from UWorld. Please use GetFeatureLevel or SetFeatureLevel instead")
1225 TEnumAsByte<ERHIFeatureLevel::Type> FeatureLevel;
1226
1229
1231 TEnumAsByte<EWorldType::Type> WorldType;
1232
1236 uint8 bWorldWasLoadedThisTick:1;
1237
1241 uint8 bTriggerPostLoadMap:1;
1242
1244 uint8 bInTick:1;
1245
1247 uint8 bIsBuilt:1;
1248
1250 uint8 bTickNewlySpawned:1;
1251
1256 uint8 bPostTickComponentUpdate:1;
1257
1259 uint8 bIsWorldInitialized:1;
1260
1262 uint8 bIsLevelStreamingFrozen:1;
1263
1265 uint8 bDoDelayedUpdateCullDistanceVolumes:1;
1266
1268 uint8 bIsRunningConstructionScript:1;
1269
1272 uint8 bShouldSimulatePhysics:1;
1273
1274#if !UE_BUILD_SHIPPING || WITH_EDITOR
1277#endif // !UE_BUILD_SHIPPING
1278
1279#if WITH_EDITOR
1283 uint8 bEnableTraceCollision:1;
1284
1286 uint8 bForceUseMovementComponentInNonGameWorld:1;
1287
1290#endif
1291
1294
1297
1300
1303
1306
1308 UE_DEPRECATED(5.4, "Public access to bBegunPlay is deprecated. Please update your code to use the public accessors GetBegunPlay() & SetBegunPlay().")
1309 uint8 bBegunPlay:1;
1310
1312 UE_API void SetBegunPlay(bool bHasBegunPlay);
1313
1315 UE_API bool GetBegunPlay() const;
1316
1319 FOnBeginPlay& GetOnBeginPlayEvent() { return OnBeginPlay; }
1320
1323
1326
1329
1332
1335
1341
1342 // Kismet debugging flags - they can be only editor only, but they're uint32, so it doesn't make much difference
1344
1347
1350
1351#if WITH_EDITOR
1354
1357
1360
1362 uint8 bPurgedScene : 1;
1363#endif
1364
1367 uint8 bAreConstraintsDirty:1;
1368
1369private:
1371 uint8 bRequiresHitProxies:1;
1372
1374 uint8 bShouldTick:1;
1375
1377 uint8 bStreamingDataDirty : 1;
1378
1380 uint8 bShouldForceUnloadStreamingLevels:1;
1381
1383 uint8 bShouldForceVisibleStreamingLevels:1;
1384
1386 uint8 bMaterialParameterCollectionInstanceNeedsDeferredUpdate : 1;
1387
1389 uint8 bHasEverBeenInitialized: 1;
1390
1392 bool bIsBeingCleanedUp;
1393
1395 uint32 IsInBlockTillLevelStreamingCompleted;
1396
1398 int32 BlockTillLevelStreamingCompletedEpoch;
1399
1402 TObjectPtr<class UNavigationSystemBase> NavigationSystem;
1403
1406 TObjectPtr<class AGameModeBase> AuthorityGameMode;
1407
1410 TObjectPtr<class AGameStateBase> GameState;
1411
1414 TObjectPtr<class UAISystemBase> AISystem;
1415
1418 TObjectPtr<class UAvoidanceManager> AvoidanceManager;
1419
1422 TArray<TObjectPtr<class ULevel>> Levels;
1423
1425 UPROPERTY(Transient, NonTransactional, Setter = None, Getter = None)
1426 TArray<FLevelCollection> LevelCollections;
1427
1429 int32 ActiveLevelCollectionIndex;
1430
1432 UE_API void ConditionallyCreateDefaultLevelCollections();
1433
1434 FOnBeginPlay OnBeginPlay;
1435public:
1436
1438 FAudioDeviceHandle AudioDeviceHandle;
1439
1440#if WITH_EDITOR
1443
1446#endif // WITH_EDITOR
1447
1449 UFUNCTION()
1450 UE_API void HandleTimelineScrubbed();
1451
1452private:
1453
1455 FDelegateHandle AudioDeviceDestroyedHandle;
1456
1457#if WITH_EDITORONLY_DATA
1460 TObjectPtr<class ULevel> CurrentLevel;
1461#endif
1462
1464 TObjectPtr<class UGameInstance> OwningGameInstance;
1465
1469
1475 TObjectPtr<UCanvas> CanvasForRenderingToTarget;
1476
1478 TObjectPtr<UCanvas> CanvasForDrawMaterialToRenderTarget;
1479
1480public:
1482 UE_API void SetNavigationSystem(UNavigationSystemBase* InNavigationSystem);
1483
1486
1487#if WITH_EDITORONLY_DATA
1489 UPROPERTY(NonTransactional)
1491#endif
1492
1493#if WITH_EDITORONLY_DATA
1498 UE_API bool SetCurrentLevel( class ULevel* InLevel );
1499#endif
1500
1502 UE_API class ULevel* GetCurrentLevel() const;
1503
1506
1507#if WITH_EDITOR
1510
1513#endif
1514
1516 UE_API void CreateFXSystem();
1517
1519 UE_API void InitializeSubsystems();
1520
1522 UE_API void PostInitializeSubsystems();
1523
1524#if WITH_EDITOR
1525
1527 UE_API void ChangeFeatureLevel(ERHIFeatureLevel::Type InFeatureLevel, bool bShowSlowProgressDialog = true, bool bForceUpdate = false);
1528
1530
1532
1534 UE_API void PurgeScene();
1535
1537 UE_API void RestoreScene();
1538
1540
1541#endif // WITH_EDITOR
1542
1549 void SetShouldTick(const bool bInShouldTick) { bShouldTick = bInShouldTick; }
1550
1552 bool ShouldTick() const { return bShouldTick; }
1553
1554private:
1557
1560
1562 TArray<TWeakObjectPtr<ACameraActor> > AutoCameraActorList;
1563
1565 TArray<TWeakObjectPtr<APhysicsVolume> > NonDefaultPhysicsVolumeList;
1566
1568 FPhysScene* PhysicsScene;
1569 // Note that this should be merged with PhysScene going forward but is needed for now.
1570
1571#if WITH_STATE_STREAM
1574#endif
1575
1576public:
1577
1580
1583
1585 UE_API UChaosEventRelay* GetChaosEventRelay();
1586
1590
1591
1592#if WITH_STATE_STREAM
1594 template<typename T> T& GetStateStream() { return *static_cast<T*>(InternalGetStateStream(T::Id)); }
1595
1598
1599#endif
1600
1601private:
1602 enum class EEndOfFrameUpdateLocation
1603 {
1604 Immediate,
1605 Async
1606 };
1607
1608 inline TArray<TObjectPtr<UActorComponent>>& GetComponentsThatNeedEndOfFrameUpdate(UActorComponent* Component)
1609 {
1610 return Component->IsReadyForEarlyEndOfFrameUpdate() ? ComponentsThatNeedEndOfFrameUpdate_AsyncTick : ComponentsThatNeedEndOfFrameUpdate;
1611 }
1612
1613 inline const TArray<TObjectPtr<UActorComponent>>& GetComponentsThatNeedEndOfFrameUpdate(UActorComponent* Component) const
1614 {
1615 return Component->IsReadyForEarlyEndOfFrameUpdate() ? ComponentsThatNeedEndOfFrameUpdate_AsyncTick : ComponentsThatNeedEndOfFrameUpdate;
1616 }
1617
1618 inline TSet<TObjectPtr<UActorComponent>>& GetComponentsThatNeedEndOfFrameSync(UActorComponent* Component)
1619 {
1620 return Component->IsReadyForEarlyEndOfFrameUpdate() ? ComponentsThatNeedPreEndOfFrameSync_AsyncTick : ComponentsThatNeedPreEndOfFrameSync;
1621 }
1622
1624 UPROPERTY(Transient, NonTransactional)
1625 TSet<TObjectPtr<UActorComponent>> ComponentsThatNeedPreEndOfFrameSync;
1626
1628 UPROPERTY(Transient, NonTransactional)
1629 TSet<TObjectPtr<UActorComponent>> ComponentsThatNeedPreEndOfFrameSync_AsyncTick;
1630
1632 UPROPERTY(Transient, NonTransactional)
1633 TArray<TObjectPtr<UActorComponent>> ComponentsThatNeedEndOfFrameUpdate;
1634
1636 UPROPERTY(Transient, NonTransactional)
1637 TArray<TObjectPtr<UActorComponent>> ComponentsThatNeedEndOfFrameUpdate_AsyncTick;
1638
1640 UPROPERTY(Transient, NonTransactional)
1641 TArray<TObjectPtr<UActorComponent>> ComponentsThatNeedEndOfFrameUpdate_OnGameThread;
1642
1644 UPROPERTY(Transient, NonTransactional)
1645 TArray<TObjectPtr<UActorComponent>> ComponentsThatNeedEndOfFrameMarkRenderStateDirty;
1646
1647 struct FEndOfFrameUpdateContext;
1648 TArray<FEndOfFrameUpdateContext*> EndOfFrameUpdateContexts;
1649 TArray<UE::Tasks::FTask> EndOfFrameUpdateTasks;
1650 UE::Tasks::FTask EndOfFrameUpdatePrerequisiteTask;
1651
1652 void SendAllEndOfFrameUpdatesInternal(EEndOfFrameUpdateLocation Location);
1653
1655 FWorldAsyncTraceState AsyncTraceState;
1656
1657#if !UE_BUILD_SHIPPING
1658 double AsyncDelegateHitchLoggingLastTimestamp = 0.0;
1659#endif
1660
1661#if WITH_EDITOR
1664#endif
1665
1670 mutable FOnActorSpawned OnActorSpawned;
1671
1676 mutable FOnActorSpawned OnActorPreSpawnInitialization;
1677
1682 mutable FOnActorDestroyed OnActorDestroyed;
1683
1688 mutable FOnPostRegisterAllActorComponents OnPostRegisterAllActorComponents;
1689
1694 mutable FOnPreUnregisterAllActorComponents OnPreUnregisterAllActorComponents;
1695
1700 mutable FOnActorRemovedFromWorld OnActorRemovedFromWorld;
1701
1703 UE_API void ResetAsyncTrace();
1704
1706 UE_API void WaitForAllAsyncTraceTasks();
1707
1709 UE_API void FinishAsyncTrace();
1710
1712 UE_API void RepairSingletonActorOfClass(TSubclassOf<AActor> ActorClass);
1713 template <class T> void RepairSingletonActorOfClass() { RepairSingletonActorOfClass(T::StaticClass()); }
1714
1716 UE_API void RepairWorldSettings();
1717
1719 UE_API void RepairSingletonActors();
1720
1722 UE_API void RepairStreamingLevels();
1723
1725 UE_API void RepairChaosActors();
1726
1727#if WITH_EDITOR
1730#endif
1731
1733 class FTimerManager* TimerManager;
1734
1736 struct FLatentActionManager LatentActionManager;
1737
1739 double BuildStreamingDataTimer;
1740
1741 using FOnNetTickEvent UE_DEPRECATED(5.5, "The FOnNetTickEvent typedef has been deprecated - use TMulticastDelegateRegistration<void(float)> instead.") = TMulticastDelegate<void(float)>;
1742 using FOnTickFlushEvent UE_DEPRECATED(5.5, "The FOnTickFlushEvent typedef has been deprecated - use TMulticastDelegateRegistration<void()> instead.") = TMulticastDelegate<void()>;
1743
1745 UE_DEPRECATED_FORGAME(5.5, "Public access to TickDispatchEvent has been deprecated - use OnTickDispatch() instead.")
1746 TMulticastDelegate<void(float)> TickDispatchEvent;
1747
1749 UE_DEPRECATED_FORGAME(5.5, "Public access to PostTickDispatchEvent has been deprecated - use OnPostTickDispatch() instead.")
1750 TMulticastDelegate<void()> PostTickDispatchEvent;
1751
1753 UE_DEPRECATED_FORGAME(5.5, "Public access to PreTickFlushEvent has been deprecated - use OnPreTickFlush() instead.")
1754 TMulticastDelegate<void(float)> PreTickFlushEvent;
1755
1757 UE_DEPRECATED_FORGAME(5.5, "Public access to TickFlushEvent has been deprecated - use OnTickFlush() instead.")
1758 TMulticastDelegate<void(float)> TickFlushEvent;
1759
1761 UE_DEPRECATED_FORGAME(5.5, "Public access to PostTickFlushEvent has been deprecated - use OnPostTickFlush() instead.")
1762 TMulticastDelegate<void()> PostTickFlushEvent;
1763
1765 UE_API void BroadcastTickDispatch(float DeltaTime);
1766
1768 UE_API void BroadcastPostTickDispatch();
1769
1771 UE_API void BroadcastPreTickFlush(float DeltaTime);
1772
1774 UE_API void BroadcastTickFlush(float DeltaTime);
1775
1777 UE_API void BroadcastPostTickFlush(float DeltaTime);
1778
1781
1783 FOnLevelsChangedEvent LevelsChangedEvent;
1784
1787
1789 FOnAllLevelsChangedEvent AllLevelsChangedEvent;
1790
1793
1794 FWorldPartitionInitializedEvent OnWorldPartitionInitializedEvent;
1795
1796 void BroadcastWorldPartitionInitialized(UWorldPartition* InWorldPartition)
1797 {
1798 OnWorldPartitionInitializedEvent.Broadcast(InWorldPartition);
1799 }
1800
1803
1804 FWorldPartitionUninitializedEvent OnWorldPartitionUninitializedEvent;
1805
1806 void BroadcastWorldPartitionUninitialized(UWorldPartition* InWorldPartition)
1807 {
1808 OnWorldPartitionUninitializedEvent.Broadcast(InWorldPartition);
1809 }
1810
1814 DECLARE_EVENT_ThreeParams(UWorld, FAddLevelToWorldExtensionEvent, ULevel* /*InLevel*/, const bool /*bWaitForCompletion*/, bool& /*bOutHasCompleted*/);
1815 FAddLevelToWorldExtensionEvent AddLevelToWorldExtensionEvent;
1816
1820 DECLARE_EVENT_ThreeParams(UWorld, FRemoveLevelFromWorldExtensionEvent, ULevel* /*InLevel*/, const bool /*bWaitForCompletion*/, bool& /*bOutHasCompleted*/);
1821 FRemoveLevelFromWorldExtensionEvent RemoveLevelFromWorldExtensionEvent;
1822
1823 friend FWorldPartitionEvents;
1824
1825#if WITH_EDITOR
1826
1829
1830#endif // WITH_EDITOR
1831
1832#if WITH_EDITORONLY_DATA
1835
1838
1841 TArray<TObjectPtr<class ULevel>> SelectedLevels;
1842
1845
1848#endif //WITH_EDITORONLY_DATA
1849
1850 FOnMovieSceneSequenceTick MovieSceneSequenceTick;
1851
1852public:
1855
1858
1863
1866
1869
1870 bool GetShouldForceUnloadStreamingLevels() const { return bShouldForceUnloadStreamingLevels; }
1871 UE_API void SetShouldForceUnloadStreamingLevels(bool bInShouldForceUnloadStreamingLevels);
1872
1873 bool GetShouldForceVisibleStreamingLevels() const { return bShouldForceVisibleStreamingLevels; }
1874 UE_API void SetShouldForceVisibleStreamingLevels(bool bInShouldForceVisibleStreamingLevels);
1875
1876#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
1879
1882
1884 {
1885 return (bDebugDrawAllTraceTags || ((DebugDrawTraceTag != NAME_None) && (DebugDrawTraceTag == UsedTraceTag))) && IsInGameThread();
1886 }
1887#endif
1888
1892
1894 UE_API void InsertPostProcessVolume(IInterface_PostProcessVolume* InVolume);
1895
1897 UE_API bool RemovePostProcessVolume(IInterface_PostProcessVolume* InVolume);
1898
1900 UE_API void AddPostProcessingSettings(FVector ViewLocation, FSceneView* SceneView);
1901
1904
1905private:
1907 TArray<double> PostProcessVolumeCachedSizes;
1908public:
1909
1911 // TODO: Make this be property UPROPERTY(Transient)
1913
1916
1919
1922
1925
1928
1931
1934
1937
1940
1943
1946
1949
1951 UPROPERTY()
1952 TObjectPtr<class UWorldComposition> WorldComposition;
1953
1954 UPROPERTY()
1955 TObjectPtr<class UContentBundleManager> ContentBundleManager;
1956
1958 EFlushLevelStreamingType FlushLevelStreamingType;
1959
1961 TEnumAsByte<ETravelType> NextTravelType;
1962
1963private:
1965 uint16 NumStreamingLevelsBeingLoaded; // Move this somewhere better
1966
1968
1969public:
1971 FString NextURL;
1972
1974 TArray<FName> PreparingLevelNames;
1975
1977 FName CommittedPersistentLevelName;
1978
1979#if !UE_BUILD_SHIPPING || WITH_EDITOR
1986
1988
1991
1994#endif
1995
1997 bool HasMarkedObjectsPendingKill() const { return bMarkedObjectsPendingKill; }
1998private:
1999 uint32 bMarkedObjectsPendingKill:1;
2000
2001#if WITH_EDITOR
2003#endif
2004
2005 uint32 CleanupWorldTag;
2006 static UE_API uint32 CleanupWorldGlobalTag;
2007
2008public:
2009#if WITH_EDITOR
2012#endif
2013
2014 //Experimental: In game performance tracking.
2016
2017 //Tracking for VFX cost for this world.
2018 mutable FParticlePerfStats* ParticlePerfStats = nullptr;
2019
2024
2025 // LINE TRACE
2026
2036 UE_API bool LineTraceTestByChannel(const FVector& Start,const FVector& End,ECollisionChannel TraceChannel, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2037
2038
2047 UE_API bool LineTraceTestByObjectType(const FVector& Start,const FVector& End,const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2048
2057 UE_API bool LineTraceTestByProfile(const FVector& Start, const FVector& End, FName ProfileName, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2058
2069 UE_API bool LineTraceSingleByChannel(struct FHitResult& OutHit,const FVector& Start,const FVector& End,ECollisionChannel TraceChannel,const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2070
2080 UE_API bool LineTraceSingleByObjectType(struct FHitResult& OutHit,const FVector& Start,const FVector& End,const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2081
2091 UE_API bool LineTraceSingleByProfile(struct FHitResult& OutHit, const FVector& Start, const FVector& End, FName ProfileName, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2092
2105 UE_API bool LineTraceMultiByChannel(TArray<struct FHitResult>& OutHits,const FVector& Start,const FVector& End,ECollisionChannel TraceChannel,const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2106
2107
2119 UE_API bool LineTraceMultiByObjectType(TArray<struct FHitResult>& OutHits,const FVector& Start,const FVector& End,const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2120
2121
2133 UE_API bool LineTraceMultiByProfile(TArray<struct FHitResult>& OutHits, const FVector& Start, const FVector& End, FName ProfileName, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2134
2145 UE_API bool SweepTestByChannel(const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2146
2156 UE_API bool SweepTestByObjectType(const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2157
2158
2168 UE_API bool SweepTestByProfile(const FVector& Start, const FVector& End, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params) const;
2169
2181 UE_API bool SweepSingleByChannel(struct FHitResult& OutHit, const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2182
2193 UE_API bool SweepSingleByObjectType(struct FHitResult& OutHit, const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2194
2205 UE_API bool SweepSingleByProfile(struct FHitResult& OutHit, const FVector& Start, const FVector& End, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2206
2220 UE_API bool SweepMultiByChannel(TArray<struct FHitResult>& OutHits, const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2221
2234 UE_API bool SweepMultiByObjectType(TArray<struct FHitResult>& OutHits, const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2235
2248 UE_API bool SweepMultiByProfile(TArray<FHitResult>& OutHits, const FVector& Start, const FVector& End, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2249
2259 UE_API bool OverlapBlockingTestByChannel(const FVector& Pos, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2260
2270 UE_API bool OverlapAnyTestByChannel(const FVector& Pos, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2271
2280 UE_API bool OverlapAnyTestByObjectType(const FVector& Pos, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2281
2290 UE_API bool OverlapBlockingTestByProfile(const FVector& Pos, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2291
2300 UE_API bool OverlapAnyTestByProfile(const FVector& Pos, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2301
2302
2313 UE_API bool OverlapMultiByChannel(TArray<struct FOverlapResult>& OutOverlaps, const FVector& Pos, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam) const;
2314
2315
2325 UE_API bool OverlapMultiByObjectType(TArray<struct FOverlapResult>& OutOverlaps, const FVector& Pos, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2326
2336 UE_API bool OverlapMultiByProfile(TArray<struct FOverlapResult>& OutOverlaps, const FVector& Pos, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam) const;
2337
2338 // COMPONENT SWEEP
2339
2351 UE_API bool ComponentSweepMulti(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FQuat& Rot, const FComponentQueryParams& Params) const;
2352 bool ComponentSweepMulti(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FRotator& Rot, const FComponentQueryParams& Params) const;
2353
2365 UE_API bool ComponentSweepMultiByChannel(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params) const;
2366 bool ComponentSweepMultiByChannel(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FRotator& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params) const;
2367
2368 // COMPONENT OVERLAP
2369
2382
2393 UE_API bool ComponentOverlapMultiByChannel(TArray<struct FOverlapResult>& OutOverlaps, const class UPrimitiveComponent* PrimComp, const FVector& Pos, const FQuat& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params = FComponentQueryParams::DefaultComponentQueryParams, const FCollisionObjectQueryParams& ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const;
2394 bool ComponentOverlapMultiByChannel(TArray<struct FOverlapResult>& OutOverlaps, const class UPrimitiveComponent* PrimComp, const FVector& Pos, const FRotator& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params = FComponentQueryParams::DefaultComponentQueryParams, const FCollisionObjectQueryParams& ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const;
2395
2396
2418
2439
2459 UE_API FTraceHandle AsyncLineTraceByProfile(EAsyncTraceType InTraceType, const FVector& Start, const FVector& End, FName ProfileName, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FTraceDelegate* InDelegate = nullptr, uint32 UserData = 0);
2460
2483 UE_API FTraceHandle AsyncSweepByChannel(EAsyncTraceType InTraceType, const FVector& Start, const FVector& End, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam, const FTraceDelegate* InDelegate = nullptr, uint32 UserData = 0);
2484
2506 UE_API FTraceHandle AsyncSweepByObjectType(EAsyncTraceType InTraceType, const FVector& Start, const FVector& End, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FTraceDelegate* InDelegate = nullptr, uint32 UserData = 0);
2507
2529 UE_API FTraceHandle AsyncSweepByProfile(EAsyncTraceType InTraceType, const FVector& Start, const FVector& End, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FTraceDelegate* InDelegate = nullptr, uint32 UserData = 0);
2530
2531 // overlap functions
2532
2553 UE_API FTraceHandle AsyncOverlapByChannel(const FVector& Pos, const FQuat& Rot, ECollisionChannel TraceChannel, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams& ResponseParam = FCollisionResponseParams::DefaultResponseParam, const FOverlapDelegate* InDelegate = nullptr, uint32 UserData = 0);
2554
2574 UE_API FTraceHandle AsyncOverlapByObjectType(const FVector& Pos, const FQuat& Rot, const FCollisionObjectQueryParams& ObjectQueryParams, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FOverlapDelegate* InDelegate = nullptr, uint32 UserData = 0);
2575
2595 UE_API FTraceHandle AsyncOverlapByProfile(const FVector& Pos, const FQuat& Rot, FName ProfileName, const FCollisionShape& CollisionShape, const FCollisionQueryParams& Params = FCollisionQueryParams::DefaultQueryParam, const FOverlapDelegate* InDelegate = nullptr, uint32 UserData = 0);
2596
2603 UE_API bool QueryTraceData(const FTraceHandle& Handle, FTraceDatum& OutData);
2604
2611 UE_API bool QueryOverlapData(const FTraceHandle& Handle, FOverlapDatum& OutData);
2621 UE_API bool IsTraceHandleValid(const FTraceHandle& Handle, bool bOverlapTrace);
2622
2623private:
2624 friend class FPhysicsAsyncQueryReporter;
2625 UE_API void AddTraceData(const FTraceHandle& Handle, const TArray<FHitResult>& Results);
2626 UE_API void AddOverlapData(const FTraceHandle& Handle, const TArray<FOverlapResult>& Results);
2627
2628 static UE_API void GetCollisionProfileChannelAndResponseParams(FName ProfileName, ECollisionChannel& CollisionChannel, FCollisionResponseParams& ResponseParams);
2629
2630public:
2631
2633 inline UNavigationSystemBase* GetNavigationSystem() { return NavigationSystem; }
2635 inline const UNavigationSystemBase* GetNavigationSystem() const { return NavigationSystem; }
2636
2640 UE_API UAISystemBase* CreateAISystem();
2641
2643 inline UAISystemBase* GetAISystem() { return AISystem; }
2645 inline const UAISystemBase* GetAISystem() const { return AISystem; }
2646
2648 inline class UAvoidanceManager* GetAvoidanceManager() { return AvoidanceManager; }
2650 inline const class UAvoidanceManager* GetAvoidanceManager() const { return AvoidanceManager; }
2651
2653 UE_API FConstControllerIterator GetControllerIterator() const;
2654
2656 UE_API int32 GetNumControllers() const;
2657
2659 UE_API FConstPlayerControllerIterator GetPlayerControllerIterator() const;
2660
2662 UE_API int32 GetNumPlayerControllers() const;
2663
2669 template< class T >
2671 {
2672 return Cast<T>(GetFirstPlayerController());
2673 }
2674
2676 UE_API APlayerController* GetFirstPlayerController() const;
2677
2678 /*
2679 * Get the first valid local player via the first player controller.
2680 *
2681 * @return Pointer to the first valid ULocalPlayer cast to the template type, or NULL if there is not one.
2682 *
2683 * May Return NULL if the cast fails.
2684 */
2685 template< class T >
2687 {
2688 return Cast<T>(GetFirstLocalPlayerFromController());
2689 }
2690
2691 /*
2692 * Get the first valid local player via the first player controller.
2693 *
2694 * @return Pointer to the first valid ULocalPlayer, or NULL if there is not one.
2695 */
2696 UE_API ULocalPlayer* GetFirstLocalPlayerFromController() const;
2697
2699 UE_API void RegisterAutoActivateCamera(ACameraActor* CameraActor, int32 PlayerIndex);
2700
2702 UE_API FConstCameraActorIterator GetAutoActivateCameraIterator() const;
2703
2705 UE_API UGameViewportClient* GetGameViewport() const;
2706
2707public:
2708
2713 UE_API ABrush* GetDefaultBrush() const;
2714
2716 UE_API bool AreActorsInitialized() const;
2717
2720
2723
2726
2729
2733
2735 UE_API bool HasBegunPlay() const;
2736
2742 double GetTimeSeconds() const;
2743
2749 double GetUnpausedTimeSeconds() const;
2750
2756 double GetRealTimeSeconds() const;
2757
2763 double GetAudioTimeSeconds() const;
2764
2770 float GetDeltaSeconds() const;
2771
2777 FGameTime GetTime() const;
2778
2780 double TimeSince(double Time) const;
2781
2783 UE_API void CreatePhysicsScene(const AWorldSettings* Settings = nullptr);
2784
2786 FPhysScene* GetPhysicsScene() const { return PhysicsScene; }
2787
2789 UE_API void SetPhysicsScene(FPhysScene* InScene);
2790
2796 APhysicsVolume* GetDefaultPhysicsVolume() const { return DefaultPhysicsVolume ? ToRawPtr(DefaultPhysicsVolume) : InternalGetDefaultPhysicsVolume(); }
2797
2799 bool HasDefaultPhysicsVolume() const { return DefaultPhysicsVolume != nullptr; }
2800
2802 UE_API void AddPhysicsVolume(APhysicsVolume* Volume);
2803
2805 UE_API void RemovePhysicsVolume(APhysicsVolume* Volume);
2806
2808 FConstPhysicsVolumeIterator GetNonDefaultPhysicsVolumeIterator() const;
2809
2811 int32 GetNonDefaultPhysicsVolumeCount() const;
2812
2813 UE_API void SetAllowDeferredPhysicsStateCreation(bool bAllow);
2814 UE_API bool GetAllowDeferredPhysicsStateCreation() const;
2815
2824 UE_API class ALevelScriptActor* GetLevelScriptActor( class ULevel* OwnerLevel=NULL ) const;
2825
2831 UFUNCTION(BlueprintCallable, Category="Utilities|World", meta=(DisplayName="GetWorldSettings", ScriptName="GetWorldSettings"))
2832 UE_API AWorldSettings* K2_GetWorldSettings();
2833 UE_API AWorldSettings* GetWorldSettings( bool bCheckStreamingPersistent = false, bool bChecked = true ) const;
2834
2840 UE_API AWorldDataLayers* GetWorldDataLayers() const;
2841 UE_API void SetWorldDataLayers(AWorldDataLayers* NewWorldDataLayers);
2842
2844 UE_API FString GetDebugDisplayName() const;
2850 UE_API UWorldPartition* GetWorldPartition() const;
2851
2857 UFUNCTION(BlueprintCallable, Category = "Utilities|WorldPartition")
2858 UE_API UDataLayerManager* GetDataLayerManager() const;
2859
2863 bool IsPartitionedWorld() const { return GetWorldPartition() != nullptr; }
2864
2869 {
2870 if (InWorld)
2871 {
2872 return InWorld->IsPartitionedWorld();
2873 }
2874
2875 return false;
2876 }
2877
2878 FWorldPartitionInitializedEvent& OnWorldPartitionInitialized() { return OnWorldPartitionInitializedEvent; }
2879 FWorldPartitionUninitializedEvent& OnWorldPartitionUninitialized() { return OnWorldPartitionUninitializedEvent; }
2880
2886 UE_API UModel* GetModel() const;
2887
2893 UE_API float GetGravityZ() const;
2894
2900 UE_API float GetDefaultGravityZ() const;
2901
2908 UE_API const FString GetMapName() const;
2909
2912 {
2913 return bRequiresHitProxies;
2914 }
2915
2921 UE_API void AddController( AController* Controller );
2922
2928 UE_API void RemoveController( AController* Controller );
2929
2935 UE_API void AddNetworkActor( AActor* Actor );
2936
2941 UE_API void RemoveNetworkActor( AActor* Actor ) const;
2942
2944 UE_API FDelegateHandle AddOnActorSpawnedHandler( const FOnActorSpawned::FDelegate& InHandler ) const;
2945
2947 UE_API void RemoveOnActorSpawnedHandler( FDelegateHandle InHandle ) const;
2948
2950 UE_API void OnActorFinishedSpawning(AActor* Actor);
2951
2953 UE_API FDelegateHandle AddOnActorPreSpawnInitialization(const FOnActorSpawned::FDelegate& InHandler) const;
2954
2956 UE_API void RemoveOnActorPreSpawnInitialization(FDelegateHandle InHandle) const;
2957
2959 UE_API FDelegateHandle AddOnActorDestroyedHandler(const FOnActorDestroyed::FDelegate& InHandler) const;
2960
2962 UE_DEPRECATED(5.5, "Use the typo corrected version RemoveOnActorDestroyedHandler")
2963 UE_API void RemoveOnActorDestroyededHandler(FDelegateHandle InHandle) const;
2964 UE_API void RemoveOnActorDestroyedHandler(FDelegateHandle InHandle) const;
2965
2967 UE_API FDelegateHandle AddOnPostRegisterAllActorComponentsHandler(const FOnPostRegisterAllActorComponents::FDelegate& InHandler) const;
2968
2970 UE_API void RemoveOnPostRegisterAllActorComponentsHandler(FDelegateHandle InHandle) const;
2971
2976 UE_API void NotifyPostRegisterAllActorComponents(AActor* Actor);
2977
2979 UE_API FDelegateHandle AddOnPreUnregisterAllActorComponentsHandler(const FOnPreUnregisterAllActorComponents::FDelegate& InHandler) const;
2980
2982 UE_API void RemoveOnPreUnregisterAllActorComponentsHandler(FDelegateHandle InHandle) const;
2983
2989 UE_API void NotifyPreUnregisterAllActorComponents(AActor* Actor);
2990
2992 UE_API FDelegateHandle AddOnActorRemovedFromWorldHandler(const FOnActorRemovedFromWorld::FDelegate& InHandler) const;
2993
2995 UE_API void RemoveOnActorRemovedFromWorldHandler(FDelegateHandle InHandle) const;
2996
3005 UE_API bool ContainsActor( AActor* Actor ) const;
3006
3012 UE_API bool AllowAudioPlayback() const;
3013
3015 UE_API FDelegateHandle AddMovieSceneSequenceTickHandler(const FOnMovieSceneSequenceTick::FDelegate& InHandler);
3017 UE_API void RemoveMovieSceneSequenceTickHandler(FDelegateHandle InHandle);
3019 UE_API bool IsMovieSceneSequenceTickHandlerBound() const;
3020
3021 //~ Begin UObject Interface
3023 UE_API virtual void BeginDestroy() override;
3024 UE_API virtual void FinishDestroy() override;
3025 UE_API virtual bool IsReadyForFinishDestroy() override;
3027#if WITH_EDITORONLY_DATA
3029#endif
3030 UE_API virtual void PreDuplicate(FObjectDuplicationParameters& DupParams) override;
3031 UE_API virtual void PreSaveRoot(FObjectPreSaveRootContext ObjectSaveContext) override;
3032 UE_API virtual void PostSaveRoot(FObjectPostSaveRootContext ObjectSaveContext) override;
3033 UE_API virtual UWorld* GetWorld() const override;
3034 UE_API virtual FPrimaryAssetId GetPrimaryAssetId() const override;
3035 static UE_API void AddReferencedObjects(UObject* InThis, FReferenceCollector& Collector);
3036#if WITH_EDITOR
3037 UE_API virtual EDataValidationResult IsDataValid(FDataValidationContext& Context) const override;
3038 UE_API virtual bool Rename(const TCHAR* NewName = NULL, UObject* NewOuter = NULL, ERenameFlags Flags = REN_None) override;
3039 UE_API virtual void GetAssetRegistryTags(FAssetRegistryTagsContext Context) const override;
3040 UE_DEPRECATED(5.4, "Implement the version that takes FAssetRegistryTagsContext instead.")
3041 UE_API virtual void GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const override;
3043 UE_API virtual void GetExtendedAssetRegistryTagsForSave(const ITargetPlatform* TargetPlatform, TArray<FAssetRegistryTag>& OutTags) const override;
3044protected:
3046public:
3047 UE_API virtual bool IsNameStableForNetworking() const override;
3048#endif
3049 UE_API virtual bool ResolveSubobject(const TCHAR* SubObjectPath, UObject*& OutObject, bool bLoadIfExists) override;
3050 UE_API virtual void PostDuplicate(bool bDuplicateForPIE) override;
3051 //~ End UObject Interface
3052
3056 UE_API void ClearWorldComponents();
3057
3064 UE_API void UpdateWorldComponents(bool bRerunConstructionScripts, bool bCurrentLevelOnly, FRegisterComponentContext* Context = nullptr);
3065
3072 UE_API bool UpdateCullDistanceVolumes(AActor* ActorToUpdate = nullptr, UPrimitiveComponent* ComponentToUpdate = nullptr);
3073
3079 UE_API void CleanupWorld(bool bSessionEnded = true, bool bCleanupResources = true, UWorld* NewWorld = nullptr);
3080
3086 UE_API void InvalidateModelGeometry( ULevel* InLevel );
3087
3094 UE_API void InvalidateModelSurface(bool bCurrentLevelOnly);
3095
3099 UE_API void CommitModelSurfaces();
3100
3102 UE_API void InvalidateAllSkyCaptures();
3103
3105 UE_API void UpdateAllSkyCaptures();
3106
3108 UE_API ULevel* GetActiveLightingScenario() const;
3109
3111 UE_API void PropagateLightingScenarioChange();
3112
3125
3126 UE_DEPRECATED(5.6, "Use version that requires passing the ExternalTimout, bConsiderTimeLimit now defaults to false to match common usage")
3127 void AddToWorld(ULevel* Level, const FTransform& LevelTransform, bool bConsiderTimeLimit, FNetLevelVisibilityTransactionId TransactionId, ULevelStreaming* OwningLevelStreaming = nullptr)
3128 {
3129 AddToWorld(Level, LevelTransform, bConsiderTimeLimit, TOptional<const UE::FTimeout>(), TransactionId, OwningLevelStreaming);
3130 }
3131
3142
3143 UE_DEPRECATED(5.6, "Use version that requires passing the optional ExternalTimout")
3145 {
3146 RemoveFromWorld(Level, bAllowIncrementalRemoval, TOptional<const UE::FTimeout>(), TransactionId, OwningLevelStreaming);
3147 }
3154
3156 UE_API void ReleasePhysicsScene();
3157public:
3166
3170 UE_API void TriggerStreamingDataRebuild();
3171
3175 UE_API void ConditionallyBuildStreamingData();
3176
3178 UE_API bool IsVisibilityRequestPending() const;
3179
3181 UE_API bool AreAlwaysLoadedLevelsLoaded() const;
3182
3184 UE_API void AsyncLoadAlwaysLoadedLevelsForSeamlessTravel();
3185
3191 UE_API bool AllowLevelLoadRequests() const;
3192
3194 UE_API void SetupParameterCollectionInstances();
3195
3197 UE_API void AddParameterCollectionInstance(class UMaterialParameterCollection* Collection, bool bUpdateScene);
3198
3200 UE_API UMaterialParameterCollectionInstance* GetParameterCollectionInstance(const UMaterialParameterCollection* Collection) const;
3201
3203 UE_API void UpdateParameterCollectionInstances(bool bUpdateInstanceUniformBuffers, bool bRecreateUniformBuffer);
3204
3205 /* clean up any material parameter collection instances which have had their collections destroyed */
3206 UE_API void OnPostGC();
3207
3208private:
3210
3212 UE_API bool HasAsyncLevelRequests();
3213
3215 UE_API void FlushAsyncLevelRequests();
3216
3217public:
3218
3220 UE_API UCanvas* GetCanvasForRenderingToTarget();
3221 UE_API UCanvas* GetCanvasForDrawMaterialToRenderTarget();
3222
3223 // Legacy for backwards compatibility
3225
3230#if WITH_EDITOR
3236 UE_DEPRECATED(5.2, "Call IsInitialized instead.")
3237 bool IsInitializedAndNeedsCleanup() const { return bIsWorldInitialized; }
3239 bool HasEverBeenInitialized() const { return bHasEverBeenInitialized; }
3240
3245 UE_API void ReInitWorld();
3246#endif
3247
3249 bool IsInitialized() const { return bIsWorldInitialized; }
3250
3254 UE_API void InitializeNewWorld(const InitializationValues IVS = InitializationValues(), bool bInSkipInitWorld = false);
3255
3259 static UE_API UWorld* CreateWorld( const EWorldType::Type InWorldType, bool bInformEngineOfWorld, FName WorldName = NAME_None, UPackage* InWorldPackage = NULL, bool bAddToRoot = true, ERHIFeatureLevel::Type InFeatureLevel = ERHIFeatureLevel::Num, const InitializationValues* InIVS = nullptr, bool bInSkipInitWorld = false);
3260
3264 UE_API void DestroyWorld( bool bInformEngineOfWorld, UWorld* NewWorld = nullptr );
3265
3267 bool IsBeingCleanedUp() const { return bIsBeingCleanedUp; }
3268
3270 bool IsCleanedUp() const { return CleanupWorldTag != 0; }
3271
3272#if WITH_EDITOR
3274 void ResetCleanedUpState() { CleanupWorldTag = 0; }
3275#endif
3276
3277
3281 UE_API void MarkObjectsPendingKill();
3282
3287 UE_API void CleanupActors();
3288
3289public:
3290
3292 UE_API TMulticastDelegateRegistration<void(float)>& OnTickDispatch();
3293 UE_API TMulticastDelegateRegistration<void()>& OnPostTickDispatch();
3294 UE_API TMulticastDelegateRegistration<void(float)>& OnPreTickFlush();
3295 UE_API TMulticastDelegateRegistration<void(float)>& OnTickFlush();
3296 UE_API TMulticastDelegateRegistration<void()>& OnPostTickFlush();
3297
3302 UE_API void Tick( ELevelTick TickType, float DeltaSeconds );
3303
3307 UE_API void SetupPhysicsTickFunctions(float DeltaSeconds);
3308
3314 UE_API void RunTickGroup(ETickingGroup Group, bool bBlockTillComplete);
3315
3316#if UE_WITH_PSO_PRECACHING
3321#endif
3322
3328 UE_API void MarkActorComponentForNeededEndOfFrameUpdate(UActorComponent* Component, bool bForceGameThread);
3329
3334 UE_API void ClearActorComponentEndOfFrameUpdate(UActorComponent* Component);
3335
3336#if WITH_EDITOR
3343#endif
3344
3348 UE_API void SetMaterialParameterCollectionInstanceNeedsUpdate();
3349
3353 UE_API bool HasEndOfFrameUpdates() const;
3354
3358 UE_API void SendAllEndOfFrameUpdates();
3359
3363 UE_API void StartAsyncSendAllEndOfFrameUpdates();
3364
3368 UE_API void FinishAsyncSendAllEndOfFrameUpdates();
3369
3373 UE_API void FlushDeferredParameterCollectionInstanceUpdates();
3374
3376 UE_API void TickNetClient( float DeltaSeconds );
3377
3384 UE_API void ProcessLevelStreamingVolumes(FVector* OverrideViewLocation=NULL);
3385
3386 /*
3387 * Updates world's level streaming state using active game players view and blocks until all sub - levels are loaded / visible / hidden
3388 * so further calls to UpdateLevelStreaming won't do any work unless state changes.
3389 */
3390 UE_API void BlockTillLevelStreamingCompleted();
3391
3396 UE_API void ModifyLevel(ULevel* Level) const;
3397
3402 UE_API void EnsureCollisionTreeIsBuilt();
3403
3406 {
3407 return AddLevelToWorldExtensionEvent;
3408 }
3409
3412 {
3413 return RemoveLevelFromWorldExtensionEvent;
3414 }
3415
3416#if WITH_EDITOR
3419
3423 UE_API void SelectLevel( ULevel* InLevel );
3424
3429
3433 UE_API bool IsLevelSelected( ULevel* InLevel ) const;
3434
3439
3444
3449
3454
3456 UE_API void ShrinkLevel();
3457
3459 UE_API FDelegateHandle AddOnFeatureLevelChangedHandler(const FOnFeatureLevelChanged::FDelegate& InHandler);
3460
3463#endif // WITH_EDITOR
3464
3468 UE_API FConstLevelIterator GetLevelIterator() const;
3469
3473 UE_API ULevel* GetLevel( int32 InLevelIndex ) const;
3474
3478 UE_API bool ContainsLevel( ULevel* InLevel ) const;
3479
3483 UE_API int32 GetNumLevels() const;
3484
3488 UE_API const TArray<class ULevel*>& GetLevels() const;
3489
3493 UE_API bool AddLevel( ULevel* InLevel );
3494
3498 UE_API bool RemoveLevel( ULevel* InLevel );
3499
3501 UE_API FLevelCollection& FindOrAddCollectionForLevelStreaming(const ULevelStreaming* Level);
3502
3504 UE_API FLevelCollection& FindOrAddCollectionByType(const ELevelCollectionType InType);
3505
3507 UE_API int32 FindOrAddCollectionByType_Index(const ELevelCollectionType InType);
3508
3510 UE_API FLevelCollection* FindCollectionByType(const ELevelCollectionType InType);
3511
3513 UE_API const FLevelCollection* FindCollectionByType(const ELevelCollectionType InType) const;
3514
3516 UE_API int32 FindCollectionIndexByType(const ELevelCollectionType InType) const;
3517
3522 UE_API const FLevelCollection* GetActiveLevelCollection() const;
3523
3528 int32 GetActiveLevelCollectionIndex() const { return ActiveLevelCollectionIndex; }
3529
3531 UE_API void SetActiveLevelCollection(int32 LevelCollectionIndex);
3532
3534 const TArray<FLevelCollection>& GetLevelCollections() const { return LevelCollections; }
3535
3542 UE_API void DuplicateRequestedLevels(const FName MapName);
3543
3545 UE_API bool Exec( UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar=*GLog );
3546
3547private:
3549 void ReleaseScene();
3550
3552 UE_API void CleanupWorldInternal(bool bSessionEnded, bool bCleanupResources, bool bWorldChanged);
3553
3555 UE_API bool HandleTraceTagCommand( const TCHAR* Cmd, FOutputDevice& Ar );
3556
3558 UE_API bool HandleFlushPersistentDebugLinesCommand( const TCHAR* Cmd, FOutputDevice& Ar );
3559
3561 UE_API bool HandleLogActorCountsCommand( const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld );
3562
3564 UE_API bool HandleDemoRecordCommand( const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld );
3565
3567 UE_API bool HandleDemoPlayCommand( const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld );
3568
3570 UE_API bool HandleDemoStopCommand( const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld );
3571
3573 UE_API bool HandleDemoScrubCommand(const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld);
3574
3576 UE_API bool HandleDemoPauseCommand(const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld);
3577
3579 UE_API bool HandleDemoSpeedCommand(const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld);
3580
3582 UE_API bool HandleDemoCheckpointCommand(const TCHAR* Cmd, FOutputDevice& Ar, UWorld* InWorld);
3583
3584public:
3585
3586 // Destroys the current demo net driver
3587 UE_API void DestroyDemoNetDriver();
3588
3589 // Remove internal references to pending demo net driver when starting a replay, but do not destroy it
3590 UE_API void ClearDemoNetDriver();
3591
3592 // Remove all internal references to this net driver, but do not destroy it. Called by the engine when destroying the driver.
3593 UE_API void ClearNetDriver(UNetDriver* Driver);
3594
3596 UE_API bool IsPlayingReplay() const;
3597
3599 UE_API bool IsRecordingReplay() const;
3600
3601 // Start listening for connections.
3602 UE_API bool Listen( FURL& InURL );
3603
3605 UE_API bool IsPaused() const;
3606
3608 UE_API bool IsCameraMoveable() const;
3609
3615 UE_API bool EditorDestroyActor( AActor* Actor, bool bShouldModifyLevel );
3616
3628 UE_API bool DestroyActor( AActor* Actor, bool bNetForce=false, bool bShouldModifyLevel=true );
3629
3637 UE_API void RemoveActor( AActor* Actor, bool bShouldModifyLevel ) const;
3638
3660
3671
3673 template< class T >
3678
3680 template< class T >
3682 {
3683 return CastChecked<T>(SpawnActor(T::StaticClass(), &Location, &Rotation, SpawnParameters),ECastCheckedType::NullAllowed);
3684 }
3685
3687 template< class T >
3692
3697 template< class T >
3706 template< class T >
3711
3713 template< class T >
3718
3723 template< class T >
3728
3734 template< class T >
3736 UClass* Class,
3737 FTransform const& Transform,
3738 AActor* Owner = nullptr,
3739 APawn* Instigator = nullptr,
3740 ESpawnActorCollisionHandlingMethod CollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::Undefined,
3741 ESpawnActorScaleMethod TransformScaleMethod = ESpawnActorScaleMethod::MultiplyWithRoot
3742 )
3743 {
3744 if( Owner )
3745 {
3746 check(this==Owner->GetWorld());
3747 }
3748 FActorSpawnParameters SpawnInfo;
3750 SpawnInfo.TransformScaleMethod = TransformScaleMethod;
3751 SpawnInfo.Owner = Owner;
3752 SpawnInfo.Instigator = Instigator;
3753 SpawnInfo.bDeferConstruction = true;
3754 return (Class != nullptr) ? Cast<T>(SpawnActor(Class, &Transform, SpawnInfo)) : nullptr;
3755 }
3756
3761 template< class T >
3763 {
3764 return Cast<T>(AuthorityGameMode);
3765 }
3766
3771 AGameModeBase* GetAuthGameMode() const { return AuthorityGameMode; }
3772
3774 template< class T >
3775 T* GetGameState() const
3776 {
3777 return Cast<T>(GameState);
3778 }
3779
3781 template<class T>
3783 {
3784 return CastChecked<T>(GameState);
3785 }
3786
3788 AGameStateBase* GetGameState() const { return GameState; }
3789
3791 UE_API void SetGameState(AGameStateBase* NewGameState);
3792
3794 UE_API void CopyGameState(AGameModeBase* FromGameMode, AGameStateBase* FromGameState);
3795
3799
3800
3802 UE_API ABrush* SpawnBrush();
3803
3816 UE_API APlayerController* SpawnPlayActor(class UPlayer* Player, ENetRole RemoteRole, const FURL& InURL, const FUniqueNetIdRepl& UniqueId, FString& Error, uint8 InNetPlayerIndex = 0, int32 InLocalPlayerIdentifier = 0);
3817
3823 UE_API bool FindTeleportSpot( const AActor* TestActor, FVector& PlaceLocation, FRotator PlaceRotation );
3824
3826 UE_API bool EncroachingBlockingGeometry( const AActor* TestActor, FVector TestLocation, FRotator TestRotation, FVector* ProposedAdjustment = NULL );
3827
3829 UE_API void StartPhysicsSim();
3830
3832 UE_API void FinishPhysicsSim();
3833
3835 UE_API bool SetGameMode(const FURL& InURL);
3836
3842 UE_API void InitializeActorsForPlay(const FURL& InURL, bool bResetTime = true, FRegisterComponentContext* Context = nullptr);
3843
3848 UE_API void BeginTearingDown();
3849
3855 UE_API void BeginPlay();
3856
3863 UE_API bool EndPlay(EEndPlayReason::Type EndPlayReason);
3864
3871 UE_API bool DestroySwappedPC(UNetConnection* Connection);
3872
3873 //~ Begin FNetworkNotify Interface
3874 UE_API virtual EAcceptConnection::Type NotifyAcceptingConnection() override;
3875 UE_API virtual void NotifyAcceptedConnection( class UNetConnection* Connection ) override;
3876 UE_API virtual bool NotifyAcceptingChannel( class UChannel* Channel ) override;
3877 UE_API virtual void NotifyControlMessage(UNetConnection* Connection, uint8 MessageType, class FInBunch& Bunch) override;
3878 //~ End FNetworkNotify Interface
3879
3883 UE_API bool PreLoginCheckError(UNetConnection* Connection, const FString& ErrorMsg);
3884
3888 UE_API void PreLoginComplete(const FString& ErrorMsg, TWeakObjectPtr<UNetConnection> WeakConnection);
3889
3893 UE_API void PreLoginCompleteSplit(const FString& ErrorMsg, TWeakObjectPtr<UNetConnection> WeakConnection, FUniqueNetIdRepl SplitRequestUniqueIdRepl, FString SplitRequestURL);
3894
3896 UE_API void WelcomePlayer(UNetConnection* Connection);
3897
3902 inline UNetDriver* GetNetDriver() const
3903 {
3904 return NetDriver;
3905 }
3906
3911 ENetMode GetNetMode() const;
3912
3918 bool IsNetMode(ENetMode Mode) const;
3919
3920private:
3921
3923 UE_API ENetMode InternalGetNetMode() const;
3924
3926 UE_API ENetMode AttemptDeriveFromURL() const;
3927
3928 UE_API APhysicsVolume* InternalGetDefaultPhysicsVolume() const;
3929
3931 UE_API void InternalUpdateStreamingState();
3932
3933#if WITH_STATE_STREAM
3936#endif
3937
3938#if WITH_EDITOR
3939public:
3941 {
3943
3944 // Disable audio playback on PIE dedicated server
3945 bAllowAudioPlayback = bAllowAudioPlayback && PlayInEditorNetMode != NM_DedicatedServer;
3946 }
3947
3948private:
3951#endif
3952
3953public:
3954
3960 {
3961 NetDriver = NewDriver;
3962 }
3963
3967 UE_API bool IsRecordingClientReplay() const;
3968
3972 UE_API bool IsPlayingClientReplay() const;
3973
3979 {
3980 StreamingVolumeUpdateDelay = InFrameDelay;
3981 }
3982
3987 UE_API void TransferBlueprintDebugReferences(UWorld* NewWorld);
3988
3994 UE_API void NotifyOfBlueprintDebuggingAssociation(class UBlueprint* Blueprint, UObject* DebugObject);
3995
3997 UE_API void BroadcastLevelsChanged();
3998
4000 FOnLevelsChangedEvent& OnLevelsChanged() { return LevelsChangedEvent; }
4001
4003 FOnAllLevelsChangedEvent& OnAllLevelsChanged() { return AllLevelsChangedEvent; }
4004
4006 UE_API int32 GetProgressDenominator() const;
4007
4009 UE_API int32 GetActorCount() const;
4010
4011public:
4012
4022 UE_API class AAudioVolume* GetAudioSettings( const FVector& ViewLocation, struct FReverbSettings* OutReverbSettings, struct FInteriorSettings* OutInteriorSettings ) const;
4023
4024 UE_API void SetAudioDevice(const FAudioDeviceHandle& InHandle);
4025
4029 UE_API FAudioDeviceHandle GetAudioDevice() const;
4030
4037 UE_API class FAudioDevice* GetAudioDeviceRaw() const;
4038
4040 UE_API FString GetLocalURL() const;
4041
4043 UE_API bool IsPlayInEditor() const;
4044
4046 UE_API bool IsPlayInPreview() const;
4047
4049 UE_API bool IsPlayInMobilePreview() const;
4050
4052 UE_DEPRECATED(5.7, "PlayInVulkanPreview is no longer supported, please use PlayInMobilePreview instead")
4053 bool IsPlayInVulkanPreview() const { return false; };
4054
4056 UE_API bool IsGameWorld() const;
4057
4059 UE_API bool IsEditorWorld() const;
4060
4062 UE_API bool IsPreviewWorld() const;
4063
4065 UE_API bool UsesGameHiddenFlags() const;
4066
4067 // Return the URL of this level, which may possibly
4068 // exist on a remote machine.
4069 UE_API FString GetAddressURL() const;
4070
4078 UE_API void LoadSecondaryLevels(bool bForce = false, TSet<FName>* PackageNamesToSkip = nullptr);
4079
4081 UE_API ULevelStreaming* GetLevelStreamingForPackageName(FName PackageName);
4082
4083#if WITH_EDITOR
4089
4095
4096private:
4098
4099public:
4100
4102
4104
4105#endif
4106
4115 UE_API bool ServerTravel(const FString& InURL, bool bAbsolute = false, bool bShouldSkipGameNotify = false);
4116
4127 UE_API void SeamlessTravel(const FString& InURL, bool bAbsolute = false);
4128
4130 UE_API bool IsInSeamlessTravel() const;
4131
4138 UE_API void SetSeamlessTravelMidpointPause(bool bNowPaused);
4139
4141 UE_API int32 GetDetailMode() const;
4142
4148 UE_API void PrepareMapChange(const TArray<FName>& LevelNames);
4149
4151 UE_API bool IsPreparingMapChange() const;
4152
4154 UE_API bool IsMapChangeReady() const;
4155
4157 UE_API void CancelPendingMapChange();
4158
4164 UE_API void CommitMapChange();
4165
4170 UE_API void SetMapNeedsLightingFullyRebuilt(int32 InNumLightingUnbuiltObjects, int32 InNumUnbuiltReflectionCaptures);
4171
4173 UE_API FTimerManager& GetTimerManager() const;
4174
4182 UE_API FLatentActionManager& GetLatentActionManager();
4183
4188 {
4189 return SubsystemCollection.GetSubsystem<UWorldSubsystem>(SubsystemClass);
4190 }
4191
4195 template <typename TSubsystemClass>
4197 {
4198 return SubsystemCollection.GetSubsystem<TSubsystemClass>(TSubsystemClass::StaticClass());
4199 }
4200
4204 template <typename TSubsystemClass>
4209
4214 template <typename TSubsystemClass>
4216 {
4217 if (World)
4218 {
4219 return World->GetSubsystem<TSubsystemClass>();
4220 }
4221 return nullptr;
4222 }
4223
4227 template <typename TSubsystemClass>
4228 bool HasSubsystem() const
4229 {
4230 return GetSubsystem<TSubsystemClass>() != nullptr;
4231 }
4232
4237 template <typename TSubsystemClass>
4238 static inline bool HasSubsystem(const UWorld* World)
4239 {
4240 return GetSubsystem<TSubsystemClass>(World) != nullptr;
4241 }
4242
4246 template <typename TSubsystemClass>
4248 {
4249 return SubsystemCollection.GetSubsystemArrayCopy<TSubsystemClass>(TSubsystemClass::StaticClass());
4250 }
4251
4255 template <typename TSubsystemClass>
4256 void ForEachSubsystem(TFunctionRef<void(TSubsystemClass*)> Operation) const
4257 {
4258 static_assert(TIsDerivedFrom<TSubsystemClass, UWorldSubsystem>::IsDerived, "TSubsystemClass must be derived from UWorldSubsystem");
4259 return SubsystemCollection.ForEachSubsystem([Operation=MoveTemp(Operation)](UWorldSubsystem* Subsystem){
4260 Operation(CastChecked<TSubsystemClass>(Subsystem));
4261 }, TSubsystemClass::StaticClass());
4262 }
4263
4266 {
4267 OwningGameInstance = NewGI;
4268 }
4271 {
4272 return OwningGameInstance;
4273 }
4274
4276 template<class T>
4278 {
4279 return Cast<T>(OwningGameInstance);
4280 }
4281
4283 template<class T>
4285 {
4286 return CastChecked<T>(OwningGameInstance);
4287 }
4288
4290 UE_API bool IsNavigationRebuilt() const;
4291
4293 UE_API void RequestNewWorldOrigin(FIntVector InNewOriginLocation);
4294
4296 UE_API bool SetNewWorldOrigin(FIntVector InNewOriginLocation);
4297
4299 UE_API void NavigateTo(FIntVector InLocation);
4300
4302 UE_API void UpdateConstraintActors();
4303
4305 UE_API void GetLightMapsAndShadowMaps(ULevel* Level, TArray<UTexture2D*>& OutLightMapsAndShadowMaps, bool bForceLazyLoad = true);
4306
4307public:
4309 UE_API void RenameToPIEWorld(int32 PIEInstanceID);
4310
4312 UE_API bool RemapCompiledScriptActor(FString& Str) const;
4313
4315 UE_API bool IsInstanced() const;
4316
4322 UE_API bool GetSoftObjectPathMapping(FString& OutSourceWorldPath, FString& OutRemappedWorldPath) const;
4323
4325 static UE_API FString ConvertToPIEPackageName(const FString& PackageName, int32 PIEInstanceID);
4326
4328 static UE_API FString StripPIEPrefixFromPackageName(const FString& PackageName, const FString& Prefix);
4329
4331 static UE_API FString BuildPIEPackagePrefix(int32 PIEInstanceID);
4332
4334 static UE_API UWorld* GetDuplicatedWorldForPIE(UWorld* InWorld, UPackage* InPIEackage, int32 PIEInstanceID);
4335
4337 static UE_API UWorld* DuplicateWorldForPIE(const FString& PackageName, UWorld* OwningWorld);
4338
4340 static UE_API FString RemovePIEPrefix(const FString &Source, int32* OutPIEInstanceID = nullptr);
4341
4343 static UE_API UWorld* FindWorldInPackage(UPackage* Package);
4344
4346 static UE_API bool IsWorldOrWorldExternalPackage(UPackage* Package);
4347
4349 static UE_API UWorld* FollowWorldRedirectorInPackage(UPackage* Package, UObjectRedirector** OptionalOutRedirector = nullptr);
4350
4351 inline FWorldPSCPool& GetPSCPool() { return PSCPool; }
4352
4353 private:
4354
4355 UPROPERTY()
4356 FWorldPSCPool PSCPool;
4357
4358 //PSC Pooling END
4359 FObjectSubsystemCollection<UWorldSubsystem> SubsystemCollection;
4360};
4361
4364
4367{
4368public:
4370 DECLARE_MULTICAST_DELEGATE_ThreeParams(FWorldCleanupEvent, UWorld* /*World*/, bool /*bSessionEnded*/, bool /*bCleanupResources*/);
4372
4381 typedef TMap<UObject*, UObject*> FReplacementMap; // Typedef needed so the macro below can properly digest comma in template parameters.
4382 DECLARE_MULTICAST_DELEGATE_FourParams(FWorldPostDuplicateEvent, UWorld* /*World*/, bool /*bDuplicateForPIE*/, FReplacementMap& /*ReplacementMap*/, TArray<UObject*>& /*ObjectsToFixReferences*/);
4383
4384#if WITH_EDITOR
4385 DECLARE_MULTICAST_DELEGATE_FiveParams(FWorldPreRenameEvent, UWorld* /*World*/, const TCHAR* /*InName*/, UObject* /*NewOuter*/, ERenameFlags /*Flags*/, bool& /*bShouldFailRename*/);
4388#endif // WITH_EDITOR
4389
4390 // Delegate type for level change events
4392
4393 // delegate for generating world asset registry tags so project/game scope can add additional tags for filtering levels in their UI, etc
4396
4399
4402
4403 // Delegate called before actors are ticked for each world. Delta seconds is already dilated and clamped.
4406
4409
4412
4413 // Callback for world creation
4415
4416 // Callback for world initialization (pre)
4418
4419 // Callback for world initialization (post)
4421
4422#if WITH_EDITOR
4423 // Callback for world rename event (pre)
4425
4426 // Callback for world rename event (post)
4428
4430
4431 // PIE has started
4434
4435 // PIE is ready
4438
4439 // PIE map is created
4442
4443 // PIE map is created
4446
4447 // PIE has ended
4449 static UE_API FOnWorldPIEEnded OnPIEEnded;
4450
4451 // Callback to add references when Serialize is called during SavePackage
4454#endif // WITH_EDITOR
4455
4456 // Post duplication event.
4458
4459 // Callback for world cleanup start
4461
4462 // Callback for world cleanup end
4464
4465 // Callback for world destruction (only called for initialized worlds)
4467
4468 // Sent when a ULevel is added to the world via UWorld::AddToWorld
4470
4471 // Sent before a ULevel is removed from the world via UWorld::RemoveFromWorld or
4472 // LoadMap (a NULL object means the LoadMap case, because all levels will be
4473 // removed from the world without a RemoveFromWorld call for each)
4475
4476 // Sent when a ULevel is removed from the world via UWorld::RemoveFromWorld or
4477 // LoadMap (a NULL object means the LoadMap case, because all levels will be
4478 // removed from the world without a RemoveFromWorld call for each)
4480
4482
4485
4488
4489 // Called after offset was applied to a level
4492
4493 // Called after transform is applied to level
4496
4497 // called by UWorld::GetAssetRegistryTags()
4499 UE_DEPRECATED(5.4, "Subscribe to GetAssetTagsWithContext instead")
4501
4502#if WITH_EDITOR
4503 // Delegate called when levelscript actions need refreshing
4505
4506 // Called when changes in the levels require blueprint actions to be refreshed.
4508#endif
4509
4510 // Global Callback after actors have been initialized (on any world)
4511 static UE_API UWorld::FOnWorldInitializedActors OnWorldInitializedActors;
4512
4513 // Global Callback when an initialized world begins to tear down before cleanup
4515
4518
4521
4524
4527
4530
4533
4534private:
4535 FWorldDelegates() {}
4536};
4537
4540{
4541private:
4542 static void Started(UWorld* World)
4543 {
4544 ++World->NumStreamingLevelsBeingLoaded;
4545 }
4546
4547 static void Finished(UWorld* World)
4548 {
4549 if (ensure(World->NumStreamingLevelsBeingLoaded > 0))
4550 {
4551 --World->NumStreamingLevelsBeingLoaded;
4552 }
4553 }
4554
4555 friend ULevelStreaming;
4556};
4557
4559// UWorld inlines:
4560
4561inline double UWorld::GetTimeSeconds() const
4562{
4563 return TimeSeconds;
4564}
4565
4567{
4568 return UnpausedTimeSeconds;
4569}
4570
4571inline double UWorld::GetRealTimeSeconds() const
4572{
4574 return RealTimeSeconds;
4575}
4576
4577inline double UWorld::GetAudioTimeSeconds() const
4578{
4579 return AudioTimeSeconds;
4580}
4581
4582inline float UWorld::GetDeltaSeconds() const
4583{
4584 return DeltaTimeSeconds;
4585}
4586
4593
4594inline double UWorld::TimeSince(double Time) const
4595{
4596 return GetTimeSeconds() - Time;
4597}
4598
4600{
4601 auto Result = NonDefaultPhysicsVolumeList.CreateConstIterator();
4602 return (const FConstPhysicsVolumeIterator&)Result;
4603}
4604
4606{
4607 return NonDefaultPhysicsVolumeList.Num();
4608}
4609
4610inline bool UWorld::ComponentOverlapMulti(TArray<struct FOverlapResult>& OutOverlaps, const class UPrimitiveComponent* PrimComp, const FVector& Pos, const FRotator& Rot, const FComponentQueryParams& Params, const FCollisionObjectQueryParams& ObjectQueryParams) const
4611{
4612 // Pass through to FQuat version.
4613 return ComponentOverlapMulti(OutOverlaps, PrimComp, Pos, Rot.Quaternion(), Params, ObjectQueryParams);
4614}
4615
4616inline bool UWorld::ComponentOverlapMultiByChannel(TArray<struct FOverlapResult>& OutOverlaps, const class UPrimitiveComponent* PrimComp, const FVector& Pos, const FRotator& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params /* = FComponentQueryParams::DefaultComponentQueryParams */, const FCollisionObjectQueryParams& ObjectQueryParams/* =FCollisionObjectQueryParams::DefaultObjectQueryParam */) const
4617{
4618 // Pass through to FQuat version.
4619 return ComponentOverlapMultiByChannel(OutOverlaps, PrimComp, Pos, Rot.Quaternion(), TraceChannel, Params, ObjectQueryParams);
4620}
4621
4622inline bool UWorld::ComponentSweepMulti(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FRotator& Rot, const FComponentQueryParams& Params) const
4623{
4624 // Pass through to FQuat version.
4625 return ComponentSweepMulti(OutHits, PrimComp, Start, End, Rot.Quaternion(), Params);
4626}
4627
4628inline bool UWorld::ComponentSweepMultiByChannel(TArray<struct FHitResult>& OutHits, class UPrimitiveComponent* PrimComp, const FVector& Start, const FVector& End, const FRotator& Rot, ECollisionChannel TraceChannel, const FComponentQueryParams& Params) const
4629{
4630 // Pass through to FQuat version.
4631 return ComponentSweepMultiByChannel(OutHits, PrimComp, Start, End, Rot.Quaternion(), TraceChannel, Params);
4632}
4633
4635{
4636 // IsRunningDedicatedServer() is a compile-time check in optimized non-editor builds.
4638 {
4639 return NM_DedicatedServer;
4640 }
4641
4642 return InternalGetNetMode();
4643}
4644
4645inline bool UWorld::IsNetMode(ENetMode Mode) const
4646{
4647#if UE_EDITOR
4648 // Editor builds are special because of PIE, which can run a dedicated server without the app running with -server.
4649 return GetNetMode() == Mode;
4650#else
4651 // IsRunningDedicatedServer() is a compile-time check in optimized non-editor builds.
4652 if (Mode == NM_DedicatedServer)
4653 {
4654 return IsRunningDedicatedServer();
4655 }
4656 else
4657 {
4658 return !IsRunningDedicatedServer() && (InternalGetNetMode() == Mode);
4659 }
4660#endif
4661}
4662
4663UE_DEPRECATED(5.0, "Please use LexToString(EWorldType::Type Type) instead")
4664FString ENGINE_API ToString(EWorldType::Type Type);
4665FString ENGINE_API ToString(ENetMode NetMode);
4666
4667#undef UE_API
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define NULL
Definition oodle2base.h:134
ESpawnActorScaleMethod
Definition Actor.h:85
int Volume
Definition AndroidPlatformMisc.cpp:380
PlayerIndex
Definition AppleControllerInterface.h:24
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
#define GLog
Definition CoreGlobals.h:95
#define UE_DEPRECATED_FORGAME
Definition CoreMiscDefines.h:377
@ NoInit
Definition CoreMiscDefines.h:158
@ INDEX_NONE
Definition CoreMiscDefines.h:150
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
bool IsRunningDedicatedServer()
Definition CoreMisc.h:152
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
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_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:58
#define DECLARE_EVENT_ThreeParams(OwningType, EventName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:69
#define DECLARE_MULTICAST_DELEGATE_FiveParams(DelegateName, Param1Type, Param2Type, Param3Type, Param4Type, Param5Type)
Definition DelegateCombinations.h:85
#define DECLARE_EVENT(OwningType, EventName)
Definition DelegateCombinations.h:32
#define DECLARE_EVENT_OneParam(OwningType, EventName, Param1Type)
Definition DelegateCombinations.h:51
#define DECLARE_MULTICAST_DELEGATE_ThreeParams(DelegateName, Param1Type, Param2Type, Param3Type)
Definition DelegateCombinations.h:67
#define DECLARE_MULTICAST_DELEGATE_OneParam(DelegateName, Param1Type)
Definition DelegateCombinations.h:49
T * ToRawPtr(const TObjectPtr< T > &Ptr)
Definition ObjectPtr.h:1000
ENetMode
Definition EngineBaseTypes.h:937
@ NM_DedicatedServer
Definition EngineBaseTypes.h:942
ETickingGroup
Definition EngineBaseTypes.h:84
ELevelTick
Definition EngineBaseTypes.h:70
ETravelType
Definition EngineBaseTypes.h:726
#define MAX_ORTHOZOOM
Definition EngineDefines.h:63
#define DEFAULT_ORTHOZOOM
Definition EngineDefines.h:64
#define MIN_ORTHOZOOM
Definition EngineDefines.h:62
ETeleportType
Definition EngineTypes.h:2401
ENetRole
Definition EngineTypes.h:3346
ELevelCollectionType
Definition EngineTypes.h:4240
EFlushLevelStreamingType
Definition EngineTypes.h:1295
ESpawnActorCollisionHandlingMethod
Definition EngineTypes.h:4170
ECollisionChannel
Definition EngineTypes.h:1088
return true
Definition ExternalRpcRegistry.cpp:601
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
ELevelPendingVisibilityState
Definition Level.h:401
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
UE::Math::TTransform< double > FTransform
Definition MathFwd.h:53
T TNotNull
Definition NotNull.h:307
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
uint32 ERenameFlags
Definition ObjectMacros.h:2302
#define REN_None
Definition ObjectMacros.h:2305
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
EObjectFlags
Definition ObjectMacros.h:552
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
#define UE_API
Definition SColorGradingComponentViewer.h:12
CORE_API bool IsInGameThread()
Definition ThreadingBase.cpp:185
CORE_API bool IsInActualRenderingThread()
Definition ThreadingBase.cpp:258
EDataValidationResult
Definition UObjectGlobals.h:4225
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
EAsyncTraceType
Definition WorldCollision.h:156
TArray< TWeakObjectPtr< APhysicsVolume > >::TConstIterator FConstPhysicsVolumeIterator
Definition World.h:94
ENGINE_API class UWorldProxy GWorld
Definition World.cpp:749
TArray< ULevel * >::TConstIterator FConstLevelIterator
Definition World.h:93
#define UE_API
Definition World.h:39
TArray< TWeakObjectPtr< ACameraActor > >::TConstIterator FConstCameraActorIterator
Definition World.h:92
TArray< TWeakObjectPtr< APlayerController > >::TConstIterator FConstPlayerControllerIterator
Definition World.h:91
TArray< TWeakObjectPtr< AController > >::TConstIterator FConstControllerIterator
Definition World.h:90
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Actor.h:257
Definition AudioVolume.h:153
Definition Controller.h:41
Definition GameStateBase.h:33
Definition ParticleEventManager.h:15
Definition PhysicsVolume.h:17
Definition PlayerController.h:261
Definition ServerStreamingLevelsVisibility.h:17
Definition WorldDataLayers.h:85
Definition Engine.Build.cs:7
Definition Archive.h:1208
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
Definition AssetRegistryTagsContext.h:98
Definition AudioDeviceHandle.h:28
Definition World.h:177
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnWorldRegisteredToAudioDevice, const UWorld *, Audio::FDeviceId)
static UE_API FOnWorldUnregisteredWithAudioDevice OnWorldUnregisteredWithAudioDevice
Definition World.h:189
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnWorldUnregisteredWithAudioDevice, const UWorld *, Audio::FDeviceId)
static UE_API FOnWorldRegisteredToAudioDevice OnWorldRegisteredToAudioDevice
Definition World.h:183
Definition AudioDevice.h:417
Definition PawnIterator.h:42
Definition DataValidation.h:40
Definition IDelegateInstance.h:14
Definition FXSystem.h:131
Definition DataBunch.h:127
Definition NameTypes.h:617
Definition NetworkDelegates.h:56
Definition UObjectGlobals.h:1292
static COREUOBJECT_API FObjectInitializer & Get()
Definition UObjectGlobals.cpp:5001
Definition ObjectSaveContext.h:554
Definition ObjectSaveContext.h:535
Definition UnrealType.h:3087
Definition SubsystemCollection.h:180
Definition OutputDevice.h:133
Definition PhysScene_Chaos.h:116
Definition UObjectGlobals.h:2492
Definition ActorComponent.h:47
Definition SceneInterface.h:106
Definition SceneView.h:1425
UE_API ~FScopedLevelCollectionContextSwitch()
Definition World.cpp:719
Definition ScopedMovementUpdate.h:56
EOverlapState
Definition ScopedMovementUpdate.h:71
Definition World.h:194
void CancelTravel()
Definition World.cpp:8260
bool IsInTransition() const
Definition World.h:250
bool HasSwitchedToDefaultMap() const
Definition World.h:255
const UWorld * GetLoadedWorld() const
Definition World.h:267
void SetPauseAtMidpoint(bool bNowPaused)
Definition World.cpp:8303
bool StartTravel(UWorld *InCurrentWorld, const FURL &InURL)
Definition World.cpp:8143
FSeamlessTravelHandler()
Definition World.h:232
FString GetDestinationMapName() const
Definition World.h:261
ENGINE_API UWorld * Tick()
Definition World.cpp:8483
Definition TimerManager.h:133
Definition World.h:4367
static UE_API FOnSeamlessTravelStart OnSeamlessTravelStart
Definition World.h:4517
DECLARE_MULTICAST_DELEGATE_FourParams(FLevelOffsetEvent, ULevel *, UWorld *, const FVector &, bool)
DECLARE_TS_MULTICAST_DELEGATE_OneParam(FWorldEvent, UWorld *)
DECLARE_MULTICAST_DELEGATE_TwoParams(FLevelTransformEvent, ULevel *, const FTransform &)
static UE_API FGameInstanceWorldChangedEvent OnGameInstanceWorldChanged
Definition World.h:4532
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnCopyWorldData, UWorld *, UWorld *)
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnSeamlessTravelStart, UWorld *, const FString &)
DECLARE_MULTICAST_DELEGATE_TwoParams(FLevelComponentsEvent, UWorld *, ULevel *)
static UE_API FLevelOffsetEvent PostApplyLevelOffset
Definition World.h:4491
static UE_API FOnLevelChanged LevelAddedToWorld
Definition World.h:4469
static UE_API FOnNetDriverCreated OnNetDriverCreated
Definition World.h:4523
static UE_API FWorldPostDuplicateEvent OnPostDuplicate
Definition World.h:4457
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnWorldTickStart, UWorld *, ELevelTick, float)
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnWorldPostActorTick, UWorld *, ELevelTick, float)
static UE_API FWorldEvent OnPostWorldCreation
Definition World.h:4414
DECLARE_MULTICAST_DELEGATE_OneParam(FOnWorldPreSendAllEndOfFrameUpdates, UWorld *)
static UE_API FLevelComponentsEvent LevelComponentsCleared
Definition World.h:4484
DECLARE_MULTICAST_DELEGATE_TwoParams(FWorldGetAssetTagsWithContext, const UWorld *, FAssetRegistryTagsContext)
static UE_API FWorldCleanupEvent OnPostWorldCleanup
Definition World.h:4463
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnWorldPreActorTick, UWorld *, ELevelTick, float)
static UE_API FOnWorldPreActorTick OnWorldPreActorTick
Definition World.h:4405
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnNetDriverCreated, UWorld *, UNetDriver *)
DECLARE_MULTICAST_DELEGATE_OneParam(FOnSeamlessTravelTransition, UWorld *)
DECLARE_MULTICAST_DELEGATE_OneParam(FGameInstanceEvent, UGameInstance *)
DECLARE_MULTICAST_DELEGATE_TwoParams(FWorldGetAssetTags, const UWorld *, TArray< UObject::FAssetRegistryTag > &)
DECLARE_MULTICAST_DELEGATE_FourParams(FWorldPostDuplicateEvent, UWorld *, bool, FReplacementMap &, TArray< UObject * > &)
static UE_API FWorldInitializationEvent OnPreWorldInitialization
Definition World.h:4417
static UE_API FOnCopyWorldData OnCopyWorldData
Definition World.h:4526
DECLARE_MULTICAST_DELEGATE_ThreeParams(FGameInstanceWorldChangedEvent, UGameInstance *, UWorld *, UWorld *)
static UE_API FGameInstanceEvent OnStartGameInstance
Definition World.h:4529
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnWorldTickEnd, UWorld *, ELevelTick, float)
static UE_API FOnWorldTickStart OnWorldTickStart
Definition World.h:4398
static UE_API FOnLevelChanged LevelRemovedFromWorld
Definition World.h:4479
static UE_API FOnWorldPostActorTick OnWorldPostActorTick
Definition World.h:4408
static UE_API FOnSeamlessTravelTransition OnSeamlessTravelTransition
Definition World.h:4520
static UE_API FOnLevelChanged PreLevelRemovedFromWorld
Definition World.h:4474
DECLARE_MULTICAST_DELEGATE_TwoParams(FOnLevelChanged, ULevel *, UWorld *)
static UE_API FWorldCleanupEvent OnWorldCleanup
Definition World.h:4460
static UE_API FLevelComponentsEvent LevelComponentsUpdated
Definition World.h:4487
static UE_API FLevelTransformEvent PostApplyLevelTransform
Definition World.h:4495
static UE_API FWorldEvent OnWorldBeginTearDown
Definition World.h:4514
DECLARE_MULTICAST_DELEGATE_TwoParams(FWorldInitializationEvent, UWorld *, const UWorld::InitializationValues)
static UE_API FWorldInitializationEvent OnPostWorldInitialization
Definition World.h:4420
static UE_API UWorld::FOnWorldInitializedActors OnWorldInitializedActors
Definition World.h:4511
static UE_API FOnWorldTickEnd OnWorldTickEnd
Definition World.h:4401
static UE_API FWorldEvent OnPreWorldFinishDestroy
Definition World.h:4466
DECLARE_MULTICAST_DELEGATE_ThreeParams(FWorldCleanupEvent, UWorld *, bool, bool)
static UE_API FWorldGetAssetTagsWithContext GetAssetTagsWithContext
Definition World.h:4498
TMap< UObject *, UObject * > FReplacementMap
Definition World.h:4381
static UE_API FOnWorldPreSendAllEndOfFrameUpdates OnWorldPreSendAllEndOfFrameUpdates
Definition World.h:4411
Definition InGamePerformanceTracker.h:179
Definition Interface_PostProcessVolume.h:39
Definition StateStreamManager.h:13
Definition EngineUtils.h:570
Definition ArrayView.h:139
Definition Array.h:670
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG TConstIterator CreateConstIterator() const
Definition Array.h:3365
Definition EnumAsByte.h:22
Definition AssetRegistryState.h:50
Definition AndroidPlatformMisc.h:14
Definition Array.h:64
Definition UnrealString.h.inl:34
Definition DelegateSignatureImpl.inl:725
Definition DelegateSignatureImpl.inl:1029
Definition GenericOctree.h:378
Definition SharedPointer.h:692
Definition SortedMap.h:20
Definition SubclassOf.h:30
Definition AISystemBase.h:15
Definition ActorComponent.h:152
Definition AvoidanceManager.h:91
Definition Blueprint.h:403
Definition Canvas.h:159
Definition Channel.h:63
Definition ChaosEventRelay.h:25
Definition Class.h:3793
Definition ContentBundleWorldSubsystem.h:26
Definition DataLayerManager.h:48
Definition DemoNetDriver.h:154
Definition CriticalSection.h:14
Definition GameInstance.h:152
Definition GameViewportClient.h:71
Definition LevelStreaming.h:139
Definition Level.h:423
Definition LineBatchComponent.h:128
Definition LocalPlayer.h:169
Definition MaterialParameterCollectionInstance.h:25
Definition MaterialParameterCollection.h:79
Definition Model.h:401
Definition NavigationSystemBase.h:245
Definition NetActorFactory.h:172
Definition NetConnection.h:284
Definition NetDriver.h:799
Definition ObjectRedirector.h:30
Definition Object.h:95
Definition PackageMapClient.h:465
Definition Package.h:216
Definition PhysicsFieldComponent.h:227
Definition Player.h:18
Definition Texture2D.h:26
Definition WorldComposition.h:73
Definition WorldPartition.h:142
Definition World.h:108
bool operator==(const UWorldProxy &Other) const
Definition World.h:153
UWorldProxy & operator=(const UWorldProxy &InProxy)
Definition World.h:147
const UWorld * operator->() const
Definition World.h:123
UWorldProxy()
Definition World.h:111
UWorld & operator*()
Definition World.h:129
const UWorld & operator*() const
Definition World.h:135
UWorld * GetReference()
Definition World.h:164
UWorld * operator->()
Definition World.h:115
UWorldProxy & operator=(UWorld *InWorld)
Definition World.h:141
Definition WorldSubsystem.h:16
Definition World.h:918
bool GetShouldForceUnloadStreamingLevels() const
Definition World.h:1870
APhysicsVolume * GetDefaultPhysicsVolume() const
Definition World.h:2796
double LastTimeUnbuiltLightingWasEncountered
Definition World.h:1915
FOnLevelsChangedEvent & OnLevelsChanged()
Definition World.h:4000
UGameInstance * GetGameInstance() const
Definition World.h:4270
FOnAllLevelsChangedEvent & OnAllLevelsChanged()
Definition World.h:4003
FWorldInGamePerformanceTrackers * PerfTrackers
Definition World.h:2015
ENetMode GetNetMode() const
Definition World.h:4634
static UE_API TMap< FName, EWorldType::Type > WorldTypePreLoadMap
Definition World.h:1505
bool RequiresHitProxies() const
Definition World.h:2911
PRAGMA_ENABLE_DEPRECATION_WARNINGS TArray< FVector > ViewLocationsRenderedLastFrame
Definition World.h:1216
class FFXSystemInterface * FXSystem
Definition World.h:1857
uint8 bKismetScriptError
Definition World.h:1340
uint8 bActorsInitialized
Definition World.h:1305
DECLARE_EVENT_OneParam(UWorld, FOnGameStateSetEvent, AGameStateBase *)
void SetDemoNetDriver(UDemoNetDriver *const InDemoNetDriver)
Definition World.h:1194
UDemoNetDriver * GetDemoNetDriver() const
Definition World.h:1191
double GetAudioTimeSeconds() const
Definition World.h:4577
static TSubsystemClass * GetSubsystem(const UWorld *World)
Definition World.h:4215
T * SpawnActorAbsolute(UClass *Class, FTransform const &Transform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3724
static bool HasSubsystem(const UWorld *World)
Definition World.h:4238
UNetDriver * GetNetDriver() const
Definition World.h:3902
FWorldPSCPool & GetPSCPool()
Definition World.h:4351
void SetShouldTick(const bool bInShouldTick)
Definition World.h:1549
bool IsNetMode(ENetMode Mode) const
Definition World.h:4645
TSharedPtr< FPhysScene_Chaos > DefaultPhysicsScene_Chaos
Definition World.h:1582
T * GetGameStateChecked() const
Definition World.h:3782
double GetUnpausedTimeSeconds() const
Definition World.h:4566
UE_API bool ComponentOverlapMulti(TArray< struct FOverlapResult > &OutOverlaps, const class UPrimitiveComponent *PrimComp, const FVector &Pos, const FQuat &Rot, const FComponentQueryParams &Params=FComponentQueryParams::DefaultComponentQueryParams, const FCollisionObjectQueryParams &ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const
Definition WorldCollision.cpp:356
int32 NumTextureStreamingDirtyResources
Definition World.h:1993
int32 GetNonDefaultPhysicsVolumeCount() const
Definition World.h:4605
class UAvoidanceManager * GetAvoidanceManager()
Definition World.h:2648
T * GetGameInstanceChecked() const
Definition World.h:4284
uint8 bAggressiveLOD
Definition World.h:1296
uint8 bPlayersOnlyPending
Definition World.h:1328
DECLARE_MULTICAST_DELEGATE(FOnWorldPreBeginPlay)
bool IsInitialized() const
Definition World.h:3249
DECLARE_MULTICAST_DELEGATE_OneParam(FOnWorldInitializedActors, const FActorsInitializedParams &)
float DeltaRealTimeSeconds
Definition World.h:1930
T * GetFirstPlayerController() const
Definition World.h:2670
T * SpawnActor(UClass *Class, FVector const &Location, FRotator const &Rotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3698
static bool IsPartitionedWorld(const UWorld *InWorld)
Definition World.h:2868
void ForEachSubsystem(TFunctionRef< void(TSubsystemClass *)> Operation) const
Definition World.h:4256
FPhysScene * GetPhysicsScene() const
Definition World.h:2786
uint8 bIsTearingDown
Definition World.h:1334
void SetFeatureLevel(ERHIFeatureLevel::Type InFeatureLevel)
Definition World.h:1212
const class UAvoidanceManager * GetAvoidanceManager() const
Definition World.h:2650
TArray< TSubsystemClass * > GetSubsystemArrayCopy() const
Definition World.h:4247
DECLARE_EVENT_TwoParams(UWorld, FOnBeginPostProcessSettings, FVector, FSceneView *)
bool bDebugDrawAllTraceTags
Definition World.h:1881
int32 NumTextureStreamingUnbuiltComponents
Definition World.h:1990
FWorldPartitionInitializedEvent & OnWorldPartitionInitialized()
Definition World.h:2878
int32 GetBlockTillLevelStreamingCompletedEpoch() const
Definition World.h:1103
bool HasSubsystem() const
Definition World.h:4228
FStartPhysicsTickFunction StartPhysicsTickFunction
Definition World.h:1860
static UE_API void AddReferencedObjects(UObject *InThis, FReferenceCollector &Collector)
Definition World.cpp:982
bool HasStreamingLevelsToConsider() const
Definition World.h:1032
uint8 bCreateRenderStateForHiddenComponentsWithCollsion
Definition World.h:1276
double PauseDelay
Definition World.h:1936
const TArray< FLevelCollection > & GetLevelCollections() const
Definition World.h:3534
FOnGameStateSetEvent GameStateSetEvent
Definition World.h:3798
ELineBatcherType
Definition World.h:998
UE_API bool ComponentOverlapMultiByChannel(TArray< struct FOverlapResult > &OutOverlaps, const class UPrimitiveComponent *PrimComp, const FVector &Pos, const FQuat &Rot, ECollisionChannel TraceChannel, const FComponentQueryParams &Params=FComponentQueryParams::DefaultComponentQueryParams, const FCollisionObjectQueryParams &ObjectQueryParams=FCollisionObjectQueryParams::DefaultObjectQueryParam) const
Definition WorldCollision.cpp:372
uint8 bIsDefaultLevel
Definition World.h:1299
FWorldPartitionUninitializedEvent & OnWorldPartitionUninitialized()
Definition World.h:2879
FVector OriginOffsetThisFrame
Definition World.h:1945
int32 StreamingVolumeUpdateDelay
Definition World.h:1868
uint8 bDropDetail
Definition World.h:1293
TNotNull< TSubsystemClass * > GetSubsystemChecked() const
Definition World.h:4205
TArray< FWorldCachedViewInfo > CachedViewInfoRenderedLastFrame
Definition World.h:1219
DECLARE_MULTICAST_DELEGATE(FOnWorldBeginPlay)
AGameModeBase * GetAuthGameMode() const
Definition World.h:3771
double AudioTimeSeconds
Definition World.h:1927
T * SpawnActor(UClass *Class, FTransform const &Transform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3707
void SetGameInstance(UGameInstance *NewGI)
Definition World.h:4265
T * SpawnActor(FVector const &Location, FRotator const &Rotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3681
uint8 bStartup
Definition World.h:1331
bool GetIsInBlockTillLevelStreamingCompleted() const
Definition World.h:1100
double GetRealTimeSeconds() const
Definition World.h:4571
float NextSwitchCountdown
Definition World.h:1948
AGameStateBase * GetGameState() const
Definition World.h:3788
UWorldSubsystem * GetSubsystemBase(TSubclassOf< UWorldSubsystem > SubsystemClass) const
Definition World.h:4187
float DeltaTimeSeconds
Definition World.h:1933
float GetDeltaSeconds() const
Definition World.h:4582
FName DebugDrawTraceTag
Definition World.h:1878
uint8 bPlayersOnly
Definition World.h:1325
bool HasMarkedObjectsPendingKill() const
Definition World.h:1997
double UnpausedTimeSeconds
Definition World.h:1921
TSharedPtr< FPhysScene_Chaos > PhysicsScene_Chaos
Definition World.h:1579
bool IsCleanedUp() const
Definition World.h:3270
double RealTimeSeconds
Definition World.h:1924
bool GetShouldForceVisibleStreamingLevels() const
Definition World.h:1873
UE_API bool ComponentSweepMultiByChannel(TArray< struct FHitResult > &OutHits, class UPrimitiveComponent *PrimComp, const FVector &Start, const FVector &End, const FQuat &Rot, ECollisionChannel TraceChannel, const FComponentQueryParams &Params) const
Definition WorldCollision.cpp:473
uint32 NumUnbuiltReflectionCaptures
Definition World.h:1987
uint16 GetNumStreamingLevelsBeingLoaded() const
Definition World.h:1026
const UAISystemBase * GetAISystem() const
Definition World.h:2645
int32 GetActiveLevelCollectionIndex() const
Definition World.h:3528
double TimeSince(double Time) const
Definition World.h:4594
FOnWorldBeginPlay OnWorldBeginPlay
Definition World.h:2725
uint8 bRequestedBlockOnAsyncLoading
Definition World.h:1302
T * GetFirstLocalPlayerFromController() const
Definition World.h:2686
uint8 bDebugPauseExecution
Definition World.h:1343
UAISystemBase * GetAISystem()
Definition World.h:2643
TSubsystemClass * GetSubsystem() const
Definition World.h:4196
T * GetAuthGameMode() const
Definition World.h:3762
T * SpawnActorDeferred(UClass *Class, FTransform const &Transform, AActor *Owner=nullptr, APawn *Instigator=nullptr, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride=ESpawnActorCollisionHandlingMethod::Undefined, ESpawnActorScaleMethod TransformScaleMethod=ESpawnActorScaleMethod::MultiplyWithRoot)
Definition World.h:3735
double GetTimeSeconds() const
Definition World.h:4561
T * SpawnActor(UClass *Class, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3688
bool ShouldTick() const
Definition World.h:1552
const TArray< ULevelStreaming * > & GetStreamingLevels() const
Definition World.h:1024
void DelayStreamingVolumeUpdates(int32 InFrameDelay)
Definition World.h:3978
TArray< class AAudioVolume * > AudioVolumes
Definition World.h:1912
class FSceneInterface * Scene
Definition World.h:1485
bool DebugDrawSceneQueries(const FName &UsedTraceTag) const
Definition World.h:1883
UNavigationSystemBase * GetNavigationSystem()
Definition World.h:2633
FEndPhysicsTickFunction EndPhysicsTickFunction
Definition World.h:1862
TArray< IInterface_PostProcessVolume * > PostProcessVolumes
Definition World.h:1903
T * GetGameInstance() const
Definition World.h:4277
UE_API bool ComponentSweepMulti(TArray< struct FHitResult > &OutHits, class UPrimitiveComponent *PrimComp, const FVector &Start, const FVector &End, const FQuat &Rot, const FComponentQueryParams &Params) const
Definition WorldCollision.cpp:460
FOnWorldInitializedActors OnActorsInitialized
Definition World.h:2722
T * SpawnActorAbsolute(FVector const &AbsoluteLocation, FRotator const &AbsoluteRotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3714
bool IsBeingCleanedUp() const
Definition World.h:3267
uint8 bIsCameraMoveableWhenPaused
Definition World.h:1346
FOnWorldPreBeginPlay OnWorldPreBeginPlay
Definition World.h:2732
FIntVector RequestedOriginLocation
Definition World.h:1942
FOnMatchStarting OnWorldMatchStarting
Definition World.h:2728
const UNavigationSystemBase * GetNavigationSystem() const
Definition World.h:2635
FIntVector OriginLocation
Definition World.h:1939
FOnBeginPostProcessSettings OnBeginPostProcessSettings
Definition World.h:1891
T * GetGameState() const
Definition World.h:3775
int32 PlayerNum
Definition World.h:1865
T * SpawnActor(const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
Definition World.h:3674
double TimeSeconds
Definition World.h:1918
DECLARE_MULTICAST_DELEGATE(FOnMatchStarting)
FAddLevelToWorldExtensionEvent & OnAddLevelToWorldExtension()
Definition World.h:3405
uint32 NumLightingUnbuiltObjects
Definition World.h:1985
FGameTime GetTime() const
Definition World.h:4587
bool IsStreamingLevelBeingConsidered(ULevelStreaming *StreamingLevel) const
Definition World.h:1029
uint8 bMatchStarted
Definition World.h:1322
void SetNetDriver(UNetDriver *NewDriver)
Definition World.h:3959
FRemoveLevelFromWorldExtensionEvent & OnRemoveLevelFromWorldExtension()
Definition World.h:3411
uint8 bAllowAudioPlayback
Definition World.h:1349
FConstPhysicsVolumeIterator GetNonDefaultPhysicsVolumeIterator() const
Definition World.h:4599
bool HasDefaultPhysicsVolume() const
Definition World.h:2799
FURL URL
Definition World.h:1854
uint32 FDeviceId
Definition AudioDefines.h:66
Type
Definition NetworkDelegates.h:21
Type
Definition UObjectGlobals.h:694
@ NullAllowed
Definition Object.h:62
Type
Definition EngineTypes.h:3431
Definition TaskGraph.cpp:63
Definition SceneComponent.h:24
Type
Definition RHIFeatureLevel.h:20
@ Num
Definition RHIFeatureLevel.h:54
Definition EngineTypes.h:1262
Type
Definition EngineTypes.h:1264
Definition WorldPartition.cpp:74
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition WorldCollision.h:250
Definition World.h:419
class ULevel * OverrideLevel
Definition World.h:435
ESpawnActorNameMode
Definition World.h:495
UE_API FActorSpawnParameters()
Definition World.cpp:575
AActor * Owner
Definition World.h:429
uint8 bForceGloballyUniqueName
Definition World.h:481
uint8 bAllowDuringConstructionScript
Definition World.h:477
ESpawnActorScaleMethod TransformScaleMethod
Definition World.h:455
uint8 bNoFail
Definition World.h:471
FName Name
Definition World.h:423
uint8 bDeferConstruction
Definition World.h:474
ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingOverride
Definition World.h:452
AActor * Template
Definition World.h:426
TFunction< void(AActor *)> CustomPreSpawnInitalization
Definition World.h:516
APawn * Instigator
Definition World.h:432
EObjectFlags ObjectFlags
Definition World.h:513
ESpawnActorNameMode NameMode
Definition World.h:510
class UChildActorComponent * OverrideParentComponent
Definition World.h:449
bool IsRemoteOwned() const
Definition World.h:468
Definition World.h:521
static UE_API bool IsGloballyUniqueName(FName Name)
Definition LevelActor.cpp:370
static UE_API FName MakeUniqueActorName(ULevel *Level, const UClass *Class, FName BaseName, bool bGloballyUnique)
Definition LevelActor.cpp:348
static UE_API FName GetBaseName(FName Name)
Definition LevelActor.cpp:398
Definition World.h:550
UWorld * World
Definition World.h:552
FActorsInitializedParams(UWorld *InWorld, bool InResetTime)
Definition World.h:551
bool ResetTime
Definition World.h:553
Definition CollisionQueryParams.h:430
static ENGINE_API FCollisionObjectQueryParams DefaultObjectQueryParam
Definition CollisionQueryParams.h:538
Definition CollisionQueryParams.h:43
static ENGINE_API FCollisionQueryParams DefaultQueryParam
Definition CollisionQueryParams.h:292
Definition CollisionQueryParams.h:324
static ENGINE_API FCollisionResponseParams DefaultResponseParam
Definition CollisionQueryParams.h:341
Definition CollisionShape.h:21
Definition CollisionQueryParams.h:297
static ENGINE_API FComponentQueryParams DefaultComponentQueryParams
Definition CollisionQueryParams.h:319
Definition World.h:878
int32 FinalOverlapCandidatesIndex
Definition World.h:901
FScopedMovementUpdate::TScopedOverlapInfoArray PendingOverlaps
Definition World.h:888
ETeleportType TeleportType
Definition World.h:898
FScopedMovementUpdate::EOverlapState OverlapState
Definition World.h:896
FDeferredComponentMoveData()=default
FScopedMovementUpdate::TScopedBlockingHitArray BlockingHits
Definition World.h:890
TWeakObjectPtr< USceneComponent > ComponentToMove
Definition World.h:884
FTransform InitialTransform
Definition World.h:886
bool bHasTransformMovedForGroupUpdate
Definition World.h:892
bool bHasMoved
Definition World.h:894
Definition NetworkDelegates.h:130
Definition World.h:388
Definition GameTime.h:10
static FGameTime CreateDilated(double InRealTimeSeconds, float InDeltaRealTimeSeconds, double InWorldTimeSeconds, float InDeltaWorldTimeSeconds)
Definition GameTime.h:29
Definition Guid.h:109
Definition HitResult.h:21
Definition AudioVolume.h:76
Definition World.h:634
ELevelCollectionType GetType() const
Definition World.h:649
UNetDriver * GetNetDriver() const
Definition World.h:661
void SetType(const ELevelCollectionType InType)
Definition World.h:652
void SetNetDriver(UNetDriver *const InNetDriver)
Definition World.h:664
void SetGameState(AGameStateBase *const InGameState)
Definition World.h:658
bool IsVisible() const
Definition World.h:688
ULevel * GetPersistentLevel() const
Definition World.h:685
const TSet< TObjectPtr< ULevel > > & GetLevels() const
Definition World.h:673
FLevelCollection(const FLevelCollection &)=delete
FLevelCollection & operator=(const FLevelCollection &)=delete
UDemoNetDriver * GetDemoNetDriver() const
Definition World.h:667
void SetDemoNetDriver(UDemoNetDriver *const InDemoNetDriver)
Definition World.h:670
AGameStateBase * GetGameState() const
Definition World.h:655
void SetIsVisible(const bool bInIsVisible)
Definition World.h:691
Definition World.h:293
bool CamUpdated
Definition World.h:310
FVector CamPosition
Definition World.h:298
friend FArchive & operator<<(FArchive &Ar, FLevelViewportInfo &I)
Definition World.h:329
float CamOrthoZoom
Definition World.h:306
FLevelViewportInfo(const FVector &InCamPosition, const FRotator &InCamRotation, float InCamOrthoZoom)
Definition World.h:320
FRotator CamRotation
Definition World.h:302
Definition UpdateLevelVisibilityLevelInfo.h:10
Definition UObjectGlobals.h:147
Definition WorldCollision.h:203
Definition ParticlePerfStats.h:171
Definition PrimaryAssetId.h:126
Definition ReverbSettings.h:49
Definition World.h:354
Definition World.h:783
void Add(ULevelStreaming *StreamingLevel)
Definition World.h:825
bool AreStreamingLevelsBeingConsidered()
Definition World.h:822
UE_API bool Contains(ULevelStreaming *StreamingLevel) const
Definition World.cpp:4655
const TArray< TObjectPtr< ULevelStreaming > > & GetStreamingLevels() const
Definition World.h:816
Definition EngineBaseTypes.h:173
Definition WorldCollision.h:171
Definition WorldCollision.h:29
Definition EngineBaseTypes.h:799
FString Map
Definition EngineBaseTypes.h:819
Definition OnlineReplStructs.h:26
Definition World.h:566
AsyncTraceData & GetBufferForFrame(int32 Frame)
Definition World.h:570
AsyncTraceData & GetBufferForPreviousFrame()
Definition World.h:574
UE_API FWorldAsyncTraceState()
Definition WorldCollisionAsync.cpp:519
int32 CurrentFrame
Definition World.h:580
AsyncTraceData & GetBufferForCurrentFrame()
Definition World.h:572
AsyncTraceData DataBuffer[2]
Definition World.h:577
Definition World.h:844
FMatrix ViewMatrix
Definition World.h:845
FMatrix ViewProjectionMatrix
Definition World.h:847
FMatrix ProjectionMatrix
Definition World.h:846
FMatrix ViewToWorld
Definition World.h:848
Definition WorldInitializationValues.h:9
Definition World.h:4540
Definition WorldPSCPool.h:109
Definition World.h:855
friend UWorldPartition
Definition World.h:856
Definition UnrealTypeTraits.h:40
Definition ObjectPtr.h:488
Definition Optional.h:131
Definition StructOpsTypeTraits.h:11
Definition StructOpsTypeTraits.h:46
Definition WeakObjectPtrTemplates.h:25
static CORE_API const TTransform< double > Identity
Definition TransformNonVectorized.h:58