engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | 静态 Public 属性 | 友元 | 所有成员列表
UWorld类 参考final

The World is the top level object representing a map or a sandbox in which Actors and Components will exist and be rendered. 更多...

#include <World.h>

+ 类 UWorld 继承关系图:

类

struct  InitializationValues
 Struct containing a collection of optional parameters for initialization of a World. 更多...
 

Public 成员函数

void AddController (AController *Controller)
 Inserts the passed in controller at the front of the linked list of controllers. 更多...
 
bool AddLevel (ULevel *InLevel)
 Add a level to the level list.
 
FDelegateHandle AddMovieSceneSequenceTickHandler (const FOnMovieSceneSequenceTick::FDelegate &InHandler)
 Adds a tick handler for sequences. 更多...
 
void AddNetworkActor (AActor *Actor)
 Adds the passed in actor to the special network actor list This list is used to specifically single out actors that are relevant for networking without having to scan the much large list 更多...
 
FDelegateHandle AddOnActorPreSpawnInitialization (const FOnActorSpawned::FDelegate &InHandler)
 Add a listener for OnActorPreSpawnInitialization events
 
FDelegateHandle AddOnActorSpawnedHandler (const FOnActorSpawned::FDelegate &InHandler)
 Add a listener for OnActorSpawned events
 
void AddParameterCollectionInstance (class UMaterialParameterCollection *Collection, bool bUpdateScene)
 Adds a new instance of the given collection, or overwrites an existing instance if there is one.
 
void AddPhysicsVolume (APhysicsVolume *Volume)
 Add a physics volume to the list of those in the world. 更多...
 
void AddPostProcessingSettings (FVector ViewLocation, FSceneView *SceneView)
 Called when a scene view for this world needs the worlds post process settings computed
 
void AddStreamingLevel (ULevelStreaming *StreamingLevelToAdd)
 Add a streaming level to the list of streamed levels to consider.
 
void AddStreamingLevels (TArrayView< ULevelStreaming *const > StreamingLevelsToAdd)
 Add multiple streaming levels to the list of streamed levels to consider. 更多...
 
void AddToWorld (ULevel *Level, const FTransform &LevelTransform=FTransform::Identity, bool bConsiderTimeLimit=true)
 Associates the passed in level with the world. 更多...
 
void AddUniqueStreamingLevel (ULevelStreaming *StreamingLevelToAdd)
 Add a streaming level to the list of streamed levels to consider. 更多...
 
void AddUniqueStreamingLevels (TArrayView< ULevelStreaming *const > StreamingLevelsToAdd)
 Add multiple streaming levels to the list of streamed levels to consider. 更多...
 
bool AllowAudioPlayback () const
 Returns whether audio playback is allowed for this scene. 更多...
 
bool AllowLevelLoadRequests ()
 Returns whether the level streaming code is allowed to issue load requests. 更多...
 
bool AreActorsInitialized () const
 Returns true if the actors have been initialized and are ready to start play
 
bool AreAlwaysLoadedLevelsLoaded () const
 Returns whether all the 'always loaded' levels are loaded.
 
FTraceHandle AsyncLineTraceByChannel (EAsyncTraceType InTraceType, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam, FTraceDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async. 更多...
 
FTraceHandle AsyncLineTraceByObjectType (EAsyncTraceType InTraceType, const FVector &Start, const FVector &End, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, FTraceDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async. 更多...
 
void AsyncLoadAlwaysLoadedLevelsForSeamlessTravel ()
 Requests async loading of any 'always loaded' level. 更多...
 
FTraceHandle AsyncOverlapByChannel (const FVector &Pos, const FQuat &Rot, ECollisionChannel TraceChannel, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam, FOverlapDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1) 更多...
 
FTraceHandle AsyncOverlapByObjectType (const FVector &Pos, const FQuat &Rot, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, FOverlapDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1) 更多...
 
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, FTraceDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1) 更多...
 
FTraceHandle AsyncSweepByObjectType (EAsyncTraceType InTraceType, const FVector &Start, const FVector &End, const FQuat &Rot, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, FTraceDelegate *InDelegate=NULL, uint32 UserData=0)
 Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1) 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
void BeginPlay ()
 Start gameplay. 更多...
 
void BeginTearingDown ()
 Mark the world as being torn down
 
void BroadcastLevelsChanged ()
 Broadcasts that the number of levels has changed.
 
void CancelPendingMapChange ()
 cancels pending map change ( 更多...
 
void CleanupActors ()
 Remove NULL entries from actor list. 更多...
 
void CleanupWorld (bool bSessionEnded=true, bool bCleanupResources=true, UWorld *NewWorld=nullptr)
 Cleans up components, streaming data and assorted other intermediate data. 更多...
 
void ClearActorComponentEndOfFrameUpdate (UActorComponent *Component)
 Clears the need for a component to have a end of frame update 更多...
 
void ClearStreamingLevels ()
 Reset the streaming levels array
 
void ClearWorldComponents ()
 Clears all level components and world components like e.g. 更多...
 
void CommitMapChange ()
 actually performs the map transition prepared by PrepareMapChange() it happens in the next tick to avoid GC issues if a map change is being prepared but isn't ready yet, the transition code will block until it is wait until IsMapChangeReady() returns true if this is undesired behavior
 
void CommitModelSurfaces ()
 Commits changes made to the surfaces of the UModels of all levels.
 
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
 Test the collision of the supplied component at the supplied location/rotation using object types, and determine the set of components that it overlaps 更多...
 
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
 Test the collision of the supplied component at the supplied location/rotation using a specific channel, and determine the set of components that it overlaps 更多...
 
bool ComponentSweepMulti (TArray< struct FHitResult > &OutHits, class UPrimitiveComponent *PrimComp, const FVector &Start, const FVector &End, const FQuat &Rot, const FComponentQueryParams &Params) const
 Sweep the geometry of the supplied component, and determine the set of components that it hits. 更多...
 
void ConditionallyBuildStreamingData ()
 Calls ULevel::BuildStreamingData(this,NULL,NULL) if it has been triggered within the last few seconds.
 
bool ContainsActor (AActor *Actor) const
 Returns whether the passed in actor is part of any of the loaded levels actors array. 更多...
 
bool ContainsLevel (ULevel *InLevel) const
 Does the level list contain the given level.
 
void CopyGameState (AGameModeBase *FromGameMode, AGameStateBase *FromGameState)
 Copies GameState properties from the GameMode.
 
UAISystemBase * CreateAISystem ()
 AISystem getter. 更多...
 
void CreateFXSystem ()
 Creates a new FX system for this world
 
void CreatePhysicsScene (const AWorldSettings *Settings=nullptr)
 Creates a new physics scene for this world.
 
 DECLARE_EVENT_TwoParams (UWorld, FOnBeginPostProcessSettings, FVector, FSceneView *)
 Called when the world computes how post process volumes contribute to the scene.
 
void DelayGarbageCollection ()
 Requests a one frame delay of Garbage Collection
 
void DelayStreamingVolumeUpdates (int32 InFrameDelay)
 Sets the number of frames to delay Streaming Volume updating, useful if you preload a bunch of levels but the camera hasn't caught up yet
 
bool DestroyActor (AActor *Actor, bool bNetForce=false, bool bShouldModifyLevel=true)
 Removes the actor from its level's actor list and generally cleans up the engine's internal state. 更多...
 
bool DestroySwappedPC (UNetConnection *Connection)
 Looks for a PlayerController that was being swapped by the given NetConnection and, if found, destroys it (because the swap is complete or the connection was closed) 更多...
 
void DestroyWorld (bool bInformEngineOfWorld, UWorld *NewWorld=nullptr)
 Destroy this World instance. 更多...
 
void DuplicateRequestedLevels (const FName MapName)
 Creates a new level collection of type DynamicDuplicatedLevels by duplicating the levels in DynamicSourceLevels. 更多...
 
bool EditorDestroyActor (AActor *Actor, bool bShouldModifyLevel)
 Wrapper for DestroyActor() that should be called in the editor. 更多...
 
bool EncroachingBlockingGeometry (const AActor *TestActor, FVector TestLocation, FRotator TestRotation, FVector *ProposedAdjustment=NULL)
 @Return true if Actor would encroach at TestLocation on something that blocks it. 更多...
 
void EnsureCollisionTreeIsBuilt ()
 Ensures that the collision detection tree is fully built. 更多...
 
bool Exec (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar=*GLog)
 Handle Exec/Console Commands related to the World
 
FLevelCollection * FindCollectionByType (const ELevelCollectionType InType)
 Returns the FLevelCollection for the given InType, or null if a collection of that type hasn't been created yet.
 
const FLevelCollection * FindCollectionByType (const ELevelCollectionType InType) const
 Returns the FLevelCollection for the given InType, or null if a collection of that type hasn't been created yet.
 
int32 FindCollectionIndexByType (const ELevelCollectionType InType) const
 Returns the index of the FLevelCollection with the given InType, or INDEX_NONE if a collection of that type hasn't been created yet.
 
FLevelCollection & FindOrAddCollectionByType (const ELevelCollectionType InType)
 Returns the FLevelCollection for the given InType. 更多...
 
int32 FindOrAddCollectionByType_Index (const ELevelCollectionType InType)
 Returns the index of the first FLevelCollection of the given InType. 更多...
 
bool FindTeleportSpot (const AActor *TestActor, FVector &PlaceLocation, FRotator PlaceRotation)
 Try to find an acceptable non-colliding location to place TestActor as close to possible to PlaceLocation. 更多...
 
virtual void FinishDestroy () override
 Called to finish destroying the object. 更多...
 
void FinishPhysicsSim ()
 Waits for the physics scene to be done processing
 
void FlushDeferredParameterCollectionInstanceUpdates ()
 Flush any pending parameter collection updates to the render thrad.
 
void FlushLevelStreaming (EFlushLevelStreamingType FlushType=EFlushLevelStreamingType::Full)
 Flushes level streaming in blocking fashion and returns when all levels are loaded/ visible/ hidden so further calls to UpdateLevelStreaming won't do any work unless state changes. 更多...
 
void ForceGarbageCollection (bool bFullPurge=false)
 Updates the timer between garbage collection such that at the next opportunity garbage collection will be run.
 
const FLevelCollection * GetActiveLevelCollection () const
 Returns the level collection which currently has its context set on this world. 更多...
 
int32 GetActiveLevelCollectionIndex () const
 Returns the index of the level collection which currently has its context set on this world. 更多...
 
ULevel * GetActiveLightingScenario () const
 Returns the active lighting scenario for this world or NULL if none.
 
int32 GetActorCount ()
 Returns the actor count.
 
FORCEINLINE UAISystemBase * GetAISystem ()
 AISystem getter
 
FORCEINLINE const UAISystemBase * GetAISystem () const
 AISystem const getter
 
FAudioDeviceHandle GetAudioDevice ()
 Get the audio device used by this world.
 
class FAudioDevice * GetAudioDeviceRaw ()
 Returns the audio device associated with this world. 更多...
 
class AAudioVolume * GetAudioSettings (const FVector &ViewLocation, struct FReverbSettings *OutReverbSettings, struct FInteriorSettings *OutInteriorSettings)
 Finds the audio settings to use for a given view location, taking into account the world's default settings and the audio volumes in the world. 更多...
 
float GetAudioTimeSeconds () const
 Returns time in seconds since world was brought up for play, IS stopped when game pauses, NOT dilated/clamped 更多...
 
template<class T >
T * GetAuthGameMode () const
 Returns the current Game Mode instance cast to the template type. 更多...
 
AGameModeBase * GetAuthGameMode () const
 Returns the current Game Mode instance, which is always valid during gameplay on the server. 更多...
 
FConstCameraActorIterator GetAutoActivateCameraIterator () const
 Get an iterator for the list of CameraActors that auto-activate for PlayerControllers.
 
FORCEINLINE class UAvoidanceManager * GetAvoidanceManager ()
 Avoidance manager getter
 
FORCEINLINE const class UAvoidanceManager * GetAvoidanceManager () const
 Avoidance manager getter
 
UCanvas * GetCanvasForRenderingToTarget ()
 Gets the canvas object for rendering to a render target. 更多...
 
FConstControllerIterator GetControllerIterator () const
 Returns an iterator for the controller list.
 
class ULevel * GetCurrentLevel () const
 Get the CurrentLevel for this world.
 
ULevel * GetCurrentLevelPendingInvisibility () const
 Returns the level, if any, in the process of being made invisible
 
ULevel * GetCurrentLevelPendingVisibility () const
 Returns the level, if any, in the process of being made visible
 
ABrush * GetDefaultBrush () const
 Returns the default brush for the persistent level. 更多...
 
float GetDefaultGravityZ () const
 Returns the Z component of the default world gravity. 更多...
 
APhysicsVolume * GetDefaultPhysicsVolume () const
 Returns the default physics volume and creates it if necessary. 更多...
 
float GetDeltaSeconds () const
 Returns the frame delta time in seconds adjusted by e.g. 更多...
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS UDemoNetDriver * GetDemoNetDriver () const
 Gets the demo net driver for this world.
 
int32 GetDetailMode ()
 
template<class T >
T * GetFirstPlayerController () const
 
APlayerController * GetFirstPlayerController () const
 
UGameInstance * GetGameInstance () const
 Returns the owning game instance for this world
 
template<class T >
T * GetGameInstance () const
 Returns the OwningGameInstance cast to the template type.
 
template<class T >
T * GetGameInstanceChecked () const
 Returns the OwningGameInstance cast to the template type, asserting that it is of the correct type.
 
template<class T >
T * GetGameState () const
 Returns the current GameState instance cast to the template type.
 
AGameStateBase * GetGameState () const
 Returns the current GameState instance.
 
UGameViewportClient * GetGameViewport () const
 Returns a reference to the game viewport displaying this world if one exists.
 
float GetGravityZ () const
 Returns the Z component of the current world gravity. 更多...
 
FLatentActionManager & GetLatentActionManager ()
 Returns LatentActionManager instance, preferring the one allocated by the game instance if a game instance is associated with this. 更多...
 
ULevel * GetLevel (int32 InLevelIndex) const
 Return the level with the given index.
 
const TArray< FLevelCollection > & GetLevelCollections () const
 Returns a read-only reference to the list of level collections in this world.
 
FConstLevelIterator GetLevelIterator () const
 Returns an iterator for the level list.
 
const TArray< class ULevel * > & GetLevels () const
 Return the list of levels in this world.
 
class ALevelScriptActor * GetLevelScriptActor (class ULevel *OwnerLevel=NULL) const
 Returns the current (or specified) level's level scripting actor 更多...
 
ULevelStreaming * GetLevelStreamingForPackageName (FName PackageName)
 Utility for returning the ULevelStreaming object for a particular sub-level, specified by package name
 
void GetLightMapsAndShadowMaps (ULevel *Level, TArray< UTexture2D * > &OutLightMapsAndShadowMaps)
 Gets all LightMaps and ShadowMaps associated with this world. 更多...
 
virtual FString GetLocalURL () const
 Return the URL of this level on the local machine.
 
const FString GetMapName () const
 Returns the name of the current map, taking into account using a dummy persistent world and loading levels into it via PrepareMapChange. 更多...
 
void GetMatineeActors (TArray< AMatineeActor * > &OutMatineeActors)
 Gets all matinee actors for the current level
 
UModel * GetModel () const
 Returns the current levels BSP model. 更多...
 
FORCEINLINE UNavigationSystemBase * GetNavigationSystem ()
 NavigationSystem getter
 
FORCEINLINE const UNavigationSystemBase * GetNavigationSystem () const
 NavigationSystem const getter
 
FORCEINLINE_DEBUGGABLE UNetDriver * GetNetDriver () const
 Used to get a net driver object. 更多...
 
ENetMode GetNetMode () const
 Returns the net mode this world is running under. 更多...
 
int32 GetNonDefaultPhysicsVolumeCount () const
 Get the count of all PhysicsVolumes in the world that are not a DefaultPhysicsVolume.
 
FConstPhysicsVolumeIterator GetNonDefaultPhysicsVolumeIterator () const
 Get an iterator for all PhysicsVolumes in the world that are not a DefaultPhysicsVolume.
 
int32 GetNumControllers () const
 
int32 GetNumLevels () const
 Return the number of levels in this world.
 
int32 GetNumPawns () const
 
int32 GetNumPlayerControllers () const
 
UMaterialParameterCollectionInstance * GetParameterCollectionInstance (const UMaterialParameterCollection *Collection)
 Gets this world's instance for a given collection.
 
FConstPawnIterator GetPawnIterator () const
 
FPhysScene * GetPhysicsScene () const
 Returns a pointer to the physics scene for this world.
 
FConstPlayerControllerIterator GetPlayerControllerIterator () const
 
virtual FPrimaryAssetId GetPrimaryAssetId () const override
 Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多...
 
int32 GetProgressDenominator ()
 Returns the actor count.
 
float GetRealTimeSeconds () const
 Returns time in seconds since world was brought up for play, does NOT stop when game pauses, NOT dilated/clamped 更多...
 
const TArray< ULevelStreaming * > & GetStreamingLevels () const
 Return a const version of the streaming levels array
 
template<typename TSubsystemClass >
TSubsystemClass * GetSubsystem () const
 Get a Subsystem of specified type
 
template<typename TSubsystemClass >
const TArray< TSubsystemClass * > & GetSubsystemArray () const
 Get all Subsystem of specified type, this is only necessary for interfaces that can have multiple implementations instanced at a time. 更多...
 
UWorldSubsystem * GetSubsystemBase (TSubclassOf< UWorldSubsystem > SubsystemClass) const
 Get a Subsystem of specified type
 
float GetTimeBetweenGarbageCollectionPasses () const
 Returns the current desired time between garbage collection passes (not the time remaining)
 
FTimerManager & GetTimerManager () const
 Returns TimerManager instance for this world.
 
float GetTimeSeconds () const
 Returns time in seconds since world was brought up for play, IS stopped when game pauses, IS dilated/clamped 更多...
 
float GetUnpausedTimeSeconds () const
 Returns time in seconds since world was brought up for play, IS NOT stopped when game pauses, IS dilated/clamped 更多...
 
void HandleTimelineScrubbed ()
 Called from DemoNetDriver when playing back a replay and the timeline is successfully scrubbed
 
bool HasBegunPlay () const
 Returns true if gameplay has already started, false otherwise.
 
bool HasDefaultPhysicsVolume () const
 Returns true if a DefaultPhysicsVolume has been created.
 
bool HasEndOfFrameUpdates () const
 Returns true if we have any updates that have been deferred to the end of the current frame.
 
bool HasMarkedObjectsPendingKill () const
 Indicates that the world has marked contained objects as pending kill
 
void InitializeActorsForPlay (const FURL &InURL, bool bResetTime=true, FRegisterComponentContext *Context=nullptr)
 Initializes all actors and prepares them to start gameplay 更多...
 
void InitializeNewWorld (const InitializationValues IVS=InitializationValues())
 Initializes a newly created world.
 
void InitializeSubsystems ()
 Initialize all world subsystems
 
void InitWorld (const InitializationValues IVS=InitializationValues())
 Initializes the world, associates the persistent level and sets the proper zones.
 
void InsertPostProcessVolume (IInterface_PostProcessVolume *InVolume)
 Inserts a post process volume into the world in priority order
 
void InvalidateModelGeometry (ULevel *InLevel)
 Invalidates the cached data used to render the levels' UModel. 更多...
 
void InvalidateModelSurface (bool bCurrentLevelOnly)
 Discards the cached data used to render the levels' UModel. 更多...
 
bool IsCameraMoveable () const
 
bool IsClient () const
 
bool IsEditorWorld () const
 Returns true if this world is any kind of editor world (including editor preview worlds)
 
bool IsGameWorld () const
 Returns true if this world is any kind of game world (including PIE worlds)
 
bool IsInSeamlessTravel ()
 
bool IsMapChangeReady ()
 
bool IsNavigationRebuilt () const
 Retrieves information whether all navigation with this world has been rebuilt
 
bool IsNetMode (ENetMode Mode) const
 Test whether net mode is the given mode. 更多...
 
bool IsPaused () const
 
bool IsPlayInEditor () const
 Returns whether script is executing within the editor.
 
bool IsPlayingClientReplay () const
 Returns true if the demo net driver exists and is playing a client recorded replay.
 
bool IsPlayingReplay () const
 Returns true if we are currently playing a replay
 
bool IsPlayInMobilePreview () const
 Returns whether script is executing within a mobile preview window
 
bool IsPlayInPreview () const
 Returns whether script is executing within a preview window
 
bool IsPlayInVulkanPreview () const
 Returns whether script is executing within a vulkan preview window
 
bool IsPreparingMapChange ()
 
bool IsPreviewWorld () const
 Returns true if this world is a preview game world (editor or game)
 
bool IsRecordingClientReplay () const
 Returns true if the game net driver exists and is a client and the demo net driver exists and is a server.
 
bool IsRecordingReplay () const
 Returns true if we are currently recording a replay
 
bool IsServer () const
 
bool IsTraceHandleValid (const FTraceHandle &Handle, bool bOverlapTrace)
 See if TraceHandle is still valid or not 更多...
 
bool IsVisibilityRequestPending () const
 
AWorldSettings * K2_GetWorldSettings ()
 Returns the AWorldSettings actor associated with this world. 更多...
 
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
 Trace a ray against the world using a specific channel and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
bool LineTraceMultiByObjectType (TArray< struct FHitResult > &OutHits, const FVector &Start, const FVector &End, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using object types and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
bool LineTraceMultiByProfile (TArray< struct FHitResult > &OutHits, const FVector &Start, const FVector &End, FName ProfileName, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using a specific profile and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
bool LineTraceSingleByChannel (struct FHitResult &OutHit, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam) const
 Trace a ray against the world using a specific channel and return the first blocking hit 更多...
 
bool LineTraceSingleByObjectType (struct FHitResult &OutHit, const FVector &Start, const FVector &End, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using object types and return the first blocking hit 更多...
 
bool LineTraceSingleByProfile (struct FHitResult &OutHit, const FVector &Start, const FVector &End, FName ProfileName, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using a specific profile and return the first blocking hit 更多...
 
bool LineTraceTestByChannel (const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam) const
 Trace a ray against the world using a specific channel and return if a blocking hit is found. 更多...
 
bool LineTraceTestByObjectType (const FVector &Start, const FVector &End, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using object types and return if a blocking hit is found. 更多...
 
bool LineTraceTestByProfile (const FVector &Start, const FVector &End, FName ProfileName, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Trace a ray against the world using a specific profile and return if a blocking hit is found. 更多...
 
void LoadSecondaryLevels (bool bForce=false, TSet< FName > *FilenamesToSkip=NULL)
 Called after GWorld has been set. 更多...
 
void MarkActorComponentForNeededEndOfFrameUpdate (UActorComponent *Component, bool bForceGameThread)
 Mark a component as needing an end of frame update 更多...
 
void MarkObjectsPendingKill ()
 Marks this world and all objects within as pending kill
 
void ModifyLevel (ULevel *Level) const
 Transacts the specified level – the correct way to modify a level as opposed to calling Level->Modify.
 
void NavigateTo (FIntVector InLocation)
 Sets world origin at specified position and stream-in all relevant levels
 
virtual void NotifyAcceptedConnection (class UNetConnection *Connection) override
 Notification that a new connection has been created/established as a result of a remote request, previously approved by NotifyAcceptingConnection 更多...
 
virtual bool NotifyAcceptingChannel (class UChannel *Channel) override
 Notification that a new channel is being created/opened as a result of a remote request (Actor creation, etc) 更多...
 
virtual EAcceptConnection::Type NotifyAcceptingConnection () override
 Notification that an incoming connection is pending, giving the interface a chance to reject the request 更多...
 
virtual void NotifyControlMessage (UNetConnection *Connection, uint8 MessageType, class FInBunch &Bunch) override
 Handler for messages sent through a remote connection's control channel not required to handle the message, but if it reads any data from Bunch, it MUST read the ENTIRE data stream for that message (i.e. 更多...
 
void NotifyOfBlueprintDebuggingAssociation (class UBlueprint *Blueprint, UObject *DebugObject)
 Notifies the world of a blueprint debugging reference 更多...
 
FOnBeginTearingDownEvent & OnBeginTearingDown ()
 Returns the BeginTearingDownEvent member.
 
FOnLevelsChangedEvent & OnLevelsChanged ()
 Returns the LevelsChangedEvent member.
 
FOnNetTickEvent & OnTickDispatch ()
 Network Tick events
 
bool OverlapAnyTestByChannel (const FVector &Pos, const FQuat &Rot, ECollisionChannel TraceChannel, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam) const
 Test the collision of a shape at the supplied location using a specific channel, and return if any blocking or overlapping shape is found 更多...
 
bool OverlapAnyTestByObjectType (const FVector &Pos, const FQuat &Rot, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Test the collision of a shape at the supplied location using object types, and return if any overlap is found 更多...
 
bool OverlapAnyTestByProfile (const FVector &Pos, const FQuat &Rot, FName ProfileName, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Test the collision of a shape at the supplied location using a specific profile, and return if any blocking or overlap is found 更多...
 
bool OverlapBlockingTestByChannel (const FVector &Pos, const FQuat &Rot, ECollisionChannel TraceChannel, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam) const
 Test the collision of a shape at the supplied location using a specific channel, and return if any blocking overlap is found 更多...
 
bool OverlapBlockingTestByProfile (const FVector &Pos, const FQuat &Rot, FName ProfileName, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Test the collision of a shape at the supplied location using a specific profile, and return if any blocking overlap is found 更多...
 
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
 Test the collision of a shape at the supplied location using a specific channel, and determine the set of components that it overlaps 更多...
 
bool OverlapMultiByObjectType (TArray< struct FOverlapResult > &OutOverlaps, const FVector &Pos, const FQuat &Rot, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Test the collision of a shape at the supplied location using object types, and determine the set of components that it overlaps 更多...
 
bool OverlapMultiByProfile (TArray< struct FOverlapResult > &OutOverlaps, const FVector &Pos, const FQuat &Rot, FName ProfileName, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Test the collision of a shape at the supplied location using a specific profile, and determine the set of components that it overlaps 更多...
 
bool ParallelLineTraceSingleByChannel (struct FHitResult &OutHit, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam, const FCollisionResponseParams &ResponseParam=FCollisionResponseParams::DefaultResponseParam) const
 Trace a ray against the world without blocking the physics scene using a specific channel and return the first blocking hit 更多...
 
void PerformGarbageCollectionAndCleanupActors ()
 Interface to allow WorldSettings to request immediate garbage collection
 
void PopulateStreamingLevelsToConsider ()
 Examine all streaming levels and determine which ones should be considered.
 
virtual void PostDuplicate (bool bDuplicateForPIE) override
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostSaveRoot (bool bCleanupIsRequired) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams) override
 Called before duplication. 更多...
 
void PrepareMapChange (const TArray< FName > &LevelNames)
 asynchronously loads the given levels in preparation for a streaming map transition. 更多...
 
virtual bool PreSaveRoot (const TCHAR *Filename) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
void ProcessLevelStreamingVolumes (FVector *OverrideViewLocation=NULL)
 Issues level streaming load/unload requests based on whether local players are inside/outside level streaming volumes. 更多...
 
void PropagateLightingScenarioChange ()
 Propagates a change to the active lighting scenario.
 
bool QueryOverlapData (const FTraceHandle &Handle, FOverlapDatum &OutData)
 Query function return true if already done and returning valid result - can be hit or no hit return false if either expired or not yet evaluated or invalid Use IsTraceHandleValid to find out if valid and to be evaluated
 
bool QueryTraceData (const FTraceHandle &Handle, FTraceDatum &OutData)
 Query function return true if already done and returning valid result - can be hit or no hit return false if either expired or not yet evaluated or invalid Use IsTraceHandleValid to find out if valid and to be evaluated
 
void RegisterAutoActivateCamera (ACameraActor *CameraActor, int32 PlayerIndex)
 Register a CameraActor that auto-activates for a PlayerController.
 
void ReleasePhysicsScene ()
 Releases PhysicsScene manually
 
bool RemapCompiledScriptActor (FString &Str) const
 Given a level script actor, modify the string such that it points to the correct instance of the object. 更多...
 
void RemoveActor (AActor *Actor, bool bShouldModifyLevel) const
 Removes the passed in actor from the actor lists. 更多...
 
void RemoveController (AController *Controller)
 Removes the passed in controller from the linked list of controllers. 更多...
 
void RemoveFromWorld (ULevel *Level, bool bAllowIncrementalRemoval=false)
 Dissociates the passed in level from the world. 更多...
 
bool RemoveLevel (ULevel *InLevel)
 Remove a level from the level list.
 
void RemoveMovieSceneSequenceTickHandler (FDelegateHandle InHandle)
 Removes a tick handler for sequences
 
void RemoveNetworkActor (AActor *Actor) const
 Removes the passed in actor to from special network actor list 更多...
 
void RemoveOnActorPreSpawnInitialization (FDelegateHandle InHandle)
 Remove a listener for OnActorPreSpawnInitialization events
 
void RemoveOnActorSpawnedHandler (FDelegateHandle InHandle)
 Remove a listener for OnActorSpawned events
 
void RemovePawn (APawn *Pawn) const
 Removes the passed in pawn from the linked list of pawns. 更多...
 
void RemovePhysicsVolume (APhysicsVolume *Volume)
 Removes a physics volume from the list of those in the world.
 
void RemovePostProcessVolume (IInterface_PostProcessVolume *InVolume)
 Removes a post process volume from the world
 
bool RemoveStreamingLevel (ULevelStreaming *StreamingLevelToRemove)
 Remove a streaming level to the list of streamed levels to consider. 更多...
 
bool RemoveStreamingLevelAt (int32 IndexToRemove)
 Remove a streaming level to the list of streamed levels to consider. 更多...
 
int32 RemoveStreamingLevels (TArrayView< ULevelStreaming *const > StreamingLevelsToRemove)
 Remove multiple streaming levels to the list of streamed levels to consider. 更多...
 
void RenameToPIEWorld (int32 PIEInstanceID)
 Rename this world such that it has the prefix on names for the given PIE Instance ID
 
void RequestNewWorldOrigin (FIntVector InNewOriginLocation)
 Request to translate world origin to specified position on next tick
 
bool RequiresHitProxies () const
 Accessor for bRequiresHitProxies.
 
void RunTickGroup (ETickingGroup Group, bool bBlockTillComplete)
 Run a tick group, ticking all actors and components 更多...
 
void SeamlessTravel (const FString &InURL, bool bAbsolute=false, FGuid MapPackageGuid=FGuid())
 seamlessly travels to the given URL by first loading the entry level in the background, switching to it, and then loading the specified level. 更多...
 
void SendAllEndOfFrameUpdates ()
 Send all render updates to the rendering thread.
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
virtual bool ServerTravel (const FString &InURL, bool bAbsolute=false, bool bShouldSkipGameNotify=false)
 Jumps the server to new level. 更多...
 
void SetActiveLevelCollection (int32 LevelCollectionIndex)
 Sets the level collection and its context on this world. 更多...
 
void SetDemoNetDriver (UDemoNetDriver *const InDemoNetDriver)
 Sets the demo net driver for this world.
 
void SetGameInstance (UGameInstance *NewGI)
 Sets the owning game instance for this world
 
bool SetGameMode (const FURL &InURL)
 Spawns GameMode for the level.
 
void SetGameState (AGameStateBase *NewGameState)
 Sets the current GameState instance on this world and the game state's level collection.
 
void SetMapNeedsLightingFullyRebuilt (int32 InNumLightingUnbuiltObjects, int32 InNumUnbuiltReflectionCaptures)
 Sets NumLightingUnbuiltObjects to the specified value. 更多...
 
void SetMaterialParameterCollectionInstanceNeedsUpdate ()
 Used to indicate a UMaterialParameterCollectionInstance needs a deferred update
 
void SetNavigationSystem (UNavigationSystemBase *InNavigationSystem)
 Set the pointer to the Navigation System instance.
 
void SetNetDriver (UNetDriver *NewDriver)
 Sets the net driver to use for this world 更多...
 
bool SetNewWorldOrigin (FIntVector InNewOriginLocation)
 Translate world origin to specified position

 
void SetPhysicsScene (FPhysScene *InScene)
 Set the physics scene to use by this world
 
void SetSeamlessTravelMidpointPause (bool bNowPaused)
 this function allows pausing the seamless travel in the middle, right before it starts loading the destination (i.e. 更多...
 
void SetShouldTick (const bool bInShouldTick)
 Sets whether or not this world is ticked by the engine, but use it at your own risk! This could have unintended consequences if used carelessly. 更多...
 
void SetStreamingLevels (TArray< ULevelStreaming * > &&StreamingLevels)
 Replace the streaming levels array
 
void SetStreamingLevels (TArrayView< ULevelStreaming *const > StreamingLevels)
 Replace the streaming levels array
 
void SetTimeUntilNextGarbageCollection (float MinTimeUntilNextPass)
 Updates the timer (as a one-off) that is used to trigger garbage collection; this should only be used for things like performance tests, using it recklessly can dramatically increase memory usage and cost of the eventual GC. 更多...
 
void SetupParameterCollectionInstances ()
 Creates instances for each parameter collection in memory. 更多...
 
void SetupPhysicsTickFunctions (float DeltaSeconds)
 Set up the physics tick function if they aren't already
 
bool ShouldTick () const
 Returns whether or not this world is currently ticking. 更多...
 
template<class T >
T * SpawnActor (const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActor that allows you to specify a class type via the template type
 
template<class T >
T * SpawnActor (FVector const &Location, FRotator const &Rotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActor that allows you to specify location and rotation in addition to class type via the template type
 
template<class T >
T * SpawnActor (UClass *Class, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActor that allows you to specify the class type via parameter while the return type is a parent class of that type
 
template<class T >
T * SpawnActor (UClass *Class, FTransform const &Transform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActor that allows you to specify whole Transform class type via parameter while the return type is a parent class of that type
 
AActor * SpawnActor (UClass *Class, FTransform const *Transform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Spawn Actors with given transform and SpawnParameters 更多...
 
template<class T >
T * SpawnActor (UClass *Class, FVector const &Location, FRotator const &Rotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActor that allows you to specify the rotation and location in addition class type via parameter while the return type is a parent class of that type
 
AActor * SpawnActor (UClass *InClass, FVector const *Location=NULL, FRotator const *Rotation=NULL, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Spawn Actors with given transform and SpawnParameters 更多...
 
template<class T >
T * SpawnActorAbsolute (FVector const &AbsoluteLocation, FRotator const &AbsoluteRotation, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActorAbsolute that allows you to specify absolute location and rotation in addition to class type via the template type
 
AActor * SpawnActorAbsolute (UClass *Class, FTransform const &AbsoluteTransform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Spawn Actors with given absolute transform (override root component transform) and SpawnParameters 更多...
 
template<class T >
T * SpawnActorAbsolute (UClass *Class, FTransform const &Transform, const FActorSpawnParameters &SpawnParameters=FActorSpawnParameters())
 Templated version of SpawnActorAbsolute that allows you to specify whole absolute Transform class type via parameter while the return type is a parent class of that type
 
template<class T >
T * SpawnActorDeferred (UClass *Class, FTransform const &Transform, AActor *Owner=nullptr, APawn *Instigator=nullptr, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride=ESpawnActorCollisionHandlingMethod::Undefined)
 Spawns given class and returns class T pointer, forcibly sets world transform (note this allows scale as well). 更多...
 
ABrush * SpawnBrush ()
 Spawns a Brush Actor in the World
 
APlayerController * SpawnPlayActor (class UPlayer *Player, ENetRole RemoteRole, const FURL &InURL, const TSharedPtr< const FUniqueNetId > &UniqueId, FString &Error, uint8 InNetPlayerIndex=0)
 Spawns a PlayerController and binds it to the passed in Player with the specified RemoteRole and options 更多...
 
void StartPhysicsSim ()
 Begin physics simulation
 
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
 Sweep a shape against the world and return all initial overlaps using a specific channel (including blocking) if requested, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
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
 Sweep a shape against the world and return all initial overlaps using object types (including blocking) if requested, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
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
 Sweep a shape against the world and return all initial overlaps using a specific profile, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that 更多...
 
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
 Sweep a shape against the world and return the first blocking hit using a specific channel 更多...
 
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
 Sweep a shape against the world and return the first blocking hit using object types 更多...
 
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
 Sweep a shape against the world and return the first blocking hit using a specific profile 更多...
 
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
 Sweep a shape against the world using a specific channel and return if a blocking hit is found. 更多...
 
bool SweepTestByObjectType (const FVector &Start, const FVector &End, const FQuat &Rot, const FCollisionObjectQueryParams &ObjectQueryParams, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params=FCollisionQueryParams::DefaultQueryParam) const
 Sweep a shape against the world using object types and return if a blocking hit is found. 更多...
 
bool SweepTestByProfile (const FVector &Start, const FVector &End, const FQuat &Rot, FName ProfileName, const FCollisionShape &CollisionShape, const FCollisionQueryParams &Params) const
 Sweep a shape against the world using a specific profile and return if a blocking hit is found. 更多...
 
void Tick (ELevelTick TickType, float DeltaSeconds)
 Update the level after a variable amount of time, DeltaSeconds, has passed. 更多...
 
void TickNetClient (float DeltaSeconds)
 Do per frame tick behaviors related to the network driver
 
float TimeSince (float Time) const
 Helper for getting the time since a certain time.
 
void TransferBlueprintDebugReferences (UWorld *NewWorld)
 Transfers the set of Kismet / Blueprint objects being debugged to the new world that are not already present, and updates blueprints accordingly 更多...
 
void TriggerStreamingDataRebuild ()
 Triggers a call to ULevel::BuildStreamingData(this,NULL,NULL) within a few seconds.
 
void UpdateAllSkyCaptures ()
 Purges all sky capture cached derived data and forces a re-render of captured scene data.
 
virtual void UpdateConstraintActors ()
 Updates all physics constraint actor joint locations. 更多...
 
bool UpdateCullDistanceVolumes (AActor *ActorToUpdate=nullptr, UPrimitiveComponent *ComponentToUpdate=nullptr)
 Updates cull distance volumes for a specified component or a specified actor or all actors 更多...
 
void UpdateLevelStreaming ()
 Updates sub-levels (load/unload/show/hide) using streaming levels current state
 
void UpdateParameterCollectionInstances (bool bUpdateInstanceUniformBuffers, bool bRecreateUniformBuffer)
 Updates this world's scene with the list of instances, and optionally updates each instance's uniform buffer.
 
void UpdateStreamingLevelPriority (ULevelStreaming *StreamingLevel)
 Inform the world that the streaming level has had its priority change and may need to be resorted if under consideration.
 
void UpdateStreamingLevelShouldBeConsidered (ULevelStreaming *StreamingLevelToConsider)
 Inform the world that a streaming level has had a potentially state changing modification made to it so that it needs to be in the StreamingLevelsToConsider list.
 
void UpdateWorldComponents (bool bRerunConstructionScripts, bool bCurrentLevelOnly, FRegisterComponentContext *Context=nullptr)
 Updates world components like e.g. 更多...
 
bool UsesGameHiddenFlags () const
 Returns true if this world should look at game hidden flags instead of editor hidden flags for the purposes of rendering
 
 UWorld (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 UWorld default constructor
 
void WelcomePlayer (UNetConnection *Connection)
 Welcome a new player joining this server.
 
- Public 成员函数 继承自 UObject
void AbortInsideMemberFunction () const
 Abort with a member function call at the top of the callstack, helping to ensure that most platforms will stuff this object's memory into the resulting minidump.
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 Returns whether native properties are identical to the one of the passed in component. 更多...
 
virtual void BeginDestroy ()
 Called before destroying the object. 更多...
 
virtual void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 Given OtherObject (which will be the same type as 'this'), recursively find any matching sub-objects from 'this' that also exist within OtherObject, and add the mappings to ObjectMapping. 更多...
 
void CallAddReferencedObjects (FReferenceCollector &Collector)
 Helper function to call AddReferencedObjects for this object's class. 更多...
 
void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 Internal VM method for executing a function
 
bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 Handle calling a function by name when executed from the console or a command line
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 Call the actor's function remotely 更多...
 
bool CheckDefaultSubobjects (bool bForceCheck=false) const
 Checks default sub-object assumptions. 更多...
 
void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 Uses the TArchiveObjectReferenceCollector to build a list of all components referenced by this object which have this object as the outer 更多...
 
bool ConditionalBeginDestroy ()
 Called before destroying the object. 更多...
 
bool ConditionalFinishDestroy ()
 Called when an object is actually destroyed, memory should never be accessed again
 
void ConditionalPostLoad ()
 PostLoad if needed.
 
void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 Instances subobjects and components for objects being loaded from disk, if necessary. 更多...
 
 DECLARE_FUNCTION (execBreakpoint)
 Breakpoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (execInstrumentation)
 Instrumentation event for profiling; only observed in the builds with blueprint instrumentation
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 Pops a code offset from the execution flow stack and starts execution there. 更多...
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 Pops a code offset from the execution flow stack and starts execution there, if a condition is not true. 更多...
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 Push a code offset onto the execution flow stack for future execution. 更多...
 
 DECLARE_FUNCTION (execReturnNothing)
 failsafe for functions that return a value - returns the zero value for a property and logs that control reached the end of a non-void function
 
 DECLARE_FUNCTION (execTracepoint)
 Tracepoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (ProcessInternal)
 Internal function call processing. 更多...
 
void DestroyNonNativeProperties ()
 Destroy properties that won't be destroyed by the native destructor
 
void ExecuteUbergraph (int32 EntryPoint)
 Execute the ubergraph from a specific entry point
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 Exports the property values for the specified object as text to the output device. 更多...
 
UFunction * FindFunction (FName InName) const
 Returns a UFunction with the specified name, wrapper for UClass::FindFunctionByName()
 
UFunction * FindFunctionChecked (FName InName) const
 Version of FindFunction() that will assert if the function was not found
 
virtual void FinishDestroy ()
 Called to finish destroying the object. 更多...
 
UObject * GetArchetype () const
 Return the template this object is based on. 更多...
 
void GetArchetypeInstances (TArray< UObject * > &Instances)
 Builds a list of objects which have this object in their archetype chain. 更多...
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
virtual const TCHAR * GetConfigOverridePlatform () const
 Returns the override config hierarchy platform (if NDAd platforms need defaults to not be in Base*.ini but still want editor to load them)
 
FString GetDefaultConfigFilename () const
 Get the default config filename for the specified UObject
 
virtual FString GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
FString GetDetailedInfo () const
 This will return detail info about this specific object. 更多...
 
virtual FName GetExporterName (void)
 Returns the name of the exporter factory used to export this object Used when multiple factories have the same extension
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack)
 Return the space this function should be called. 更多...
 
FString GetGlobalUserConfigFilename () const
 Get the global user override config filename for the specified UObject
 
virtual void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 Returns properties that are replicated for the lifetime of the actor channel
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 Callback for retrieving a textual representation of natively serialized properties. 更多...
 
virtual int32 GetNetPushIdDynamic () const
 Should only ever be used by internal systems.
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 Called during cooking. 更多...
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 Called during cooking. 更多...
 
virtual FPrimaryAssetId GetPrimaryAssetId () const
 Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多...
 
FString GetProjectUserConfigFilename () const
 Get the project user override config filename for the specified UObject
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the simple version which just returns the total number of bytes used by this object. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多...
 
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite ()
 Save information for StaticAllocateObject in the case of overwriting an existing object. 更多...
 
virtual UScriptStruct * GetSparseClassDataStruct () const
 Return the UStruct corresponding to the sidecar data structure that stores data that is constant for all instances of this class.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 Returns a list of sub-objects that have stable names for networking
 
template<class T >
FORCEINLINE bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
template<class T >
bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 Exports the property values for the specified object as text to the output device. 更多...
 
void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper for calling UClass::InstanceSubobjectTemplates() for this object.
 
virtual bool IsAsset () const
 Returns true if this object is considered an asset.
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 Determine if this object has SomeObject in its archetype chain.
 
virtual bool IsDestructionThreadSafe () const
 Called during garbage collection to determine if an object can have its destructor called on a worker thread. 更多...
 
virtual bool IsEditorOnly () const
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
virtual bool IsFullNameStableForNetworking () const
 IsFullNameStableForNetworking means an object can be referred to its full path name over the network
 
bool IsInBlueprint () const
 Returns whether this object is contained in or part of a blueprint object
 
virtual bool IsLocalizedResource () const
 Returns true if this object is considered a localized resource.
 
virtual bool IsNameStableForNetworking () const
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsPostLoadThreadSafe () const
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual bool IsReadyForAsyncPostLoad () const
 Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). 更多...
 
virtual bool IsReadyForFinishDestroy ()
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsSafeForRootSet () const
 Returns true if this object is safe to add to the root set.
 
bool IsSelected () const
 Test the selection state of a UObject 更多...
 
virtual bool IsSupportedForNetworking () const
 IsSupportedForNetworking means an object can be referenced over the network
 
void LoadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Imports property values from an .ini file. 更多...
 
virtual void MarkAsEditorOnlySubobject ()
 Called during subobject creation to mark this component as editor only, which causes it to get stripped in packaged builds
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 Note that the object will be modified. 更多...
 
virtual bool NeedsLoadForClient () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForEditorGame () const
 Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多...
 
virtual bool NeedsLoadForServer () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 Called during saving to determine the load flags to save with the object. 更多...
 
void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 Outputs a string to an arbitrary output device, describing the list of objects which are holding references to this one. 更多...
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 Allows PerObjectConfig classes, to override the ini section name used for the PerObjectConfig object. 更多...
 
void ParseParms (const TCHAR *Parms)
 Import an object from a file.
 
virtual void PostCDOContruct ()
 Called after the C++ constructor has run on the CDO for a class. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostEditImport ()
 Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization
 
virtual void PostInitProperties ()
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 This is called when property is modified by InterpPropertyTracks 更多...
 
virtual void PostLoad ()
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetReceive ()
 Called right after receiving a bunch
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 Called from ReloadConfig after the object has reloaded its configuration data.
 
virtual void PostRename (UObject *OldOuter, const FName OldName)
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRepNotifies ()
 Called right after calling all OnRep notifies (called even when there are no notifies)
 
virtual void PostSaveRoot (bool bCleanupIsRequired)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PreDestroyFromReplication ()
 Called right before being marked for destruction due to network replication
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 Called before duplication. 更多...
 
virtual void PreNetReceive ()
 Called right before receiving a bunch
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform)
 Presave function. 更多...
 
virtual bool PreSaveRoot (const TCHAR *Filename)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 This function handles a console exec sent to the object; it is virtual so 'nexus' objects like a player controller can reroute the command to several different objects.
 
virtual void ProcessEvent (UFunction *Function, void *Parms)
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
virtual UClass * RegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 Called on the target when a class is loaded with ClassGeneratedBy is loaded. 更多...
 
void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper function for InitProperties() which handles safely tearing down this object before re-initializing it from the specified source object. 更多...
 
void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Wrapper method for LoadConfig that is used when reloading the config data for objects at runtime which have already loaded their config data at least once. 更多...
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 Rename this object to a unique name, or change its outer. 更多...
 
void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 Called by OutputReferencers() to get the internal list of referencers to write
 
void SaveConfig (uint64 Flags=CPF_Config, const TCHAR *Filename=NULL, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 Save configuration out to ini files 更多...
 
virtual void Serialize (FArchive &Ar)
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SerializeScriptProperties (FArchive &Ar) const
 Serializes the script property data located at Data. 更多...
 
void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 Serializes the script property data located at Data. 更多...
 
void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true)
 Changes the linker and linker index to the passed in one. 更多...
 
virtual void ShutdownAfterError ()
 After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources.
 
void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 advances Stack's code past the parameters to the given Function and if the function has a return value, copies the zero value for that property to the memory for the return value 更多...
 
virtual void TagSubobjects (EObjectFlags NewFlags)
 Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多...
 
void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 Saves just the section(s) for this class into the default ini file for the class (with just the changes from base)
 
void UpdateGlobalUserConfigFile ()
 Saves just the section(s) for this class into the global user ini file for the class (with just the changes from base)
 
void UpdateProjectUserConfigFile ()
 Saves just the section(s) for this class into the project user ini file for the class (with just the changes from base)
 
void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 Saves just the property into the global user ini file for the class (with just the changes from base)
 
- Public 成员函数 继承自 UObjectBaseUtility
void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 Adds this objects to a GC cluster that already exists 更多...
 
FORCEINLINE void AddToRoot ()
 Add an object to the root set. 更多...
 
FORCEINLINE void AppendName (FString &ResultString) const
 Optimized version of GetName that appends to an existing string
 
FORCEINLINE bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Atomically clears passed in internal flags. 更多...
 
virtual bool CanBeClusterRoot () const
 Called after load to determine if the object can be a cluster root 更多...
 
virtual bool CanBeInCluster () const
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE void ClearFlags (EObjectFlags NewFlags)
 Clears subset of flags for a specific object
 
FORCEINLINE void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE void ClearPendingKill ()
 Unmarks this object as PendingKill.
 
virtual void CreateCluster ()
 Called after PostLoad to create UObject cluster
 
void DetachExternalPackage ()
 Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
 
const UClass * FindNearestCommonBaseClass (const UClass *TestClass) const
 Finds the most-derived class which is a parent of both TestClass and this object's class. 更多...
 
FORCEINLINE EObjectMark GetAllMarks () const
 Returns all of the object marks on a specific object 更多...
 
FString GetFullGroupName (bool bStartWithOuter) const
 Walks up the chain of packages until it reaches the top level, which it ignores. 更多...
 
void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Version of GetFullName() that eliminates unnecessary copies.
 
FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'. 更多...
 
void * GetInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to this object safely converted to a pointer of the specified interface class. 更多...
 
FORCEINLINE EInternalObjectFlags GetInternalFlags () const
 Gets internal flags. 更多...
 
class FLinkerLoad * GetLinker () const
 Returns the linker for this object. 更多...
 
int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 Returns the custom version of the linker for this object corresponding to the given custom version key. 更多...
 
int32 GetLinkerIndex () const
 Returns this object's LinkerIndex. 更多...
 
int32 GetLinkerLicenseeUE4Version () const
 Returns the licensee version of the linker for this object. 更多...
 
int32 GetLinkerUE4Version () const
 Returns the UE4 version of the linker for this object. 更多...
 
FORCEINLINE EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 Returns object flags that are both in the mask and set on the object. 更多...
 
FORCEINLINE FString GetName () const
 Returns the name of this object (with no path information) 更多...
 
FORCEINLINE void GetName (FString &ResultString) const
 Optimized version of GetName that overwrites an existing string
 
void * GetNativeInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to the I* native interface object that this object implements. 更多...
 
const void * GetNativeInterfaceAddress (UClass *InterfaceClass) const
 Returns a pointer to the const I* native interface object that this object implements. 更多...
 
UPackage * GetOutermost () const
 Legacy function, has the same behavior as GetPackage use GetPackage instead. 更多...
 
UObject * GetOutermostObject () const
 Walks up the list of outers until it finds the top-level one that isn't a package. 更多...
 
UPackage * GetPackage () const
 Walks up the list of outers until it finds a package directly associated with the object. 更多...
 
void GetPathName (const UObject *StopOuter, FString &ResultString) const
 Versions of GetPathName() that eliminates unnecessary copies and allocations.
 
FString GetPathName (const UObject *StopOuter=NULL) const
 Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name' 更多...
 
FORCEINLINE TStatId GetStatID (bool bForDeferredUse=false) const
 Returns the stat ID of the object, used for profiling. 更多...
 
template<typename T >
T * GetTypedOuter () const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
UObject * GetTypedOuter (UClass *Target) const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
FORCEINLINE bool HasAllFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether all of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAllMarks (EObjectMark Marks) const
 Tests an object for having ALL of a set of marks 更多...
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in internal flags are set. 更多...
 
FORCEINLINE bool HasAnyMarks (EObjectMark Marks) const
 Tests an object for having ANY of a set of marks 更多...
 
template<class T >
bool IsA () const
 Returns true if this object is of the template type.
 
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 Returns true if this object is of the specified type.
 
bool IsDefaultSubobject () const
 Returns whether this component was instanced from a component/subobject template, or if it is a component/subobject template. 更多...
 
bool IsIn (const UObject *SomeOuter) const
 Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. 更多...
 
bool IsIn (const UPackage *SomePackage) const
 Overload to determine if an object is in the specified package which can now be different than its outer chain. 更多...
 
bool IsInA (const UClass *SomeBaseClass) const
 Find out if this object is inside (has an outer) that is of the specified class 更多...
 
bool IsInOuter (const UObject *SomeOuter) const
 Returns true if the object is contained in the specified outer.
 
bool IsInPackage (const UPackage *SomePackage) const
 Returns true if the object is contained in the specified package.
 
FORCEINLINE bool IsNative () const
 Checks if the object is native.
 
FORCEINLINE bool IsPendingKill () const
 Checks the PendingKill flag to see if it is dead but memory still valid
 
FORCEINLINE bool IsPendingKillOrUnreachable () const
 Checks if the object is pending kill or unreachable.
 
FORCEINLINE bool IsRooted () const
 Returns true if this object is explicitly rooted 更多...
 
bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 Determines whether this object is a template object 更多...
 
FORCEINLINE bool IsUnreachable () const
 Checks if the object is unreachable.
 
FORCEINLINE void Mark (EObjectMark Marks) const
 Adds marks to an object 更多...
 
bool MarkPackageDirty () const
 Finds the outermost package and marks it dirty. 更多...
 
FORCEINLINE void MarkPendingKill ()
 Marks this object as RF_PendingKill.
 
virtual void OnClusterMarkedAsPendingKill ()
 Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it.
 
FORCEINLINE bool operator< (const UObjectBaseUtility &Other) const
 Overloaded < operator. 更多...
 
void ReattachExternalPackage ()
 Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call
 
FORCEINLINE void RemoveFromRoot ()
 Remove an object from the root set.
 
bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 Checks whether this object's top-most package has any of the specified flags 更多...
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 Modifies object flags for a specific object
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE bool ThisThreadAtomicallyClearedRFUnreachable ()
 Atomically clear the unreachable flag 更多...
 
FORCEINLINE void UnMark (EObjectMark Marks) const
 Removes marks from and object 更多...
 
- Public 成员函数 继承自 UObjectBase
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 Atomically clears the specified flags. 更多...
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 Atomically adds the specified flags. 更多...
 
FORCEINLINE UClass * GetClass () const
 Returns the UClass that defines the fields of this object
 
UPackage * GetExternalPackage () const
 Returns the external UPackage associated with this object, if any
 
UPackage * GetExternalPackageInternal () const
 Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting.
 
FORCEINLINE EObjectFlags GetFlags () const
 Retrieve the object flags directly 更多...
 
FORCEINLINE FName GetFName () const
 Returns the logical name of this object
 
FORCEINLINE UObject * GetOuter () const
 Returns the UObject this object resides in
 
FORCEINLINE uint32 GetUniqueID () const
 Returns the unique ID of the object...these are reused so it is only unique while the object is alive. 更多...
 
bool IsValidLowLevel () const
 Checks to see if the object appears to be valid 更多...
 
bool IsValidLowLevelFast (bool bRecursive=true) const
 Faster version of IsValidLowLevel. 更多...
 
void SetExternalPackage (UPackage *InPackage)
 Associate an external package directly to this object.
 
 UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName)
 Constructor used by StaticAllocateObject 更多...
 
virtual ~UObjectBase ()
 Final destructor, removes the object from the object array, and indirectly, from any annotations
 
virtual void NotifyAcceptedConnection (class UNetConnection *Connection)
 Notification that a new connection has been created/established as a result of a remote request, previously approved by NotifyAcceptingConnection 更多...
 
virtual bool NotifyAcceptingChannel (class UChannel *Channel)
 Notification that a new channel is being created/opened as a result of a remote request (Actor creation, etc) 更多...
 
virtual EAcceptConnection::Type NotifyAcceptingConnection ()
 Notification that an incoming connection is pending, giving the interface a chance to reject the request 更多...
 
virtual void NotifyControlMessage (UNetConnection *Connection, uint8 MessageType, class FInBunch &Bunch)
 Handler for messages sent through a remote connection's control channel not required to handle the message, but if it reads any data from Bunch, it MUST read the ENTIRE data stream for that message (i.e. 更多...
 

静态 Public 成员函数

static FString BuildPIEPackagePrefix (int32 PIEInstanceID)
 Return the prefix for PIE packages given a PIE Instance ID
 
static FString ConvertToPIEPackageName (const FString &PackageName, int32 PIEInstanceID)
 Given a PackageName and a PIE Instance ID return the name of that Package when being run as a PIE world
 
static UWorld * CreateWorld (const EWorldType::Type InWorldType, bool bInformEngineOfWorld, FName WorldName=NAME_None, UPackage *InWorldPackage=NULL, bool bAddToRoot=true, ERHIFeatureLevel::Type InFeatureLevel=ERHIFeatureLevel::Num)
 Static function that creates a new UWorld and returns a pointer to it
 
static UWorld * DuplicateWorldForPIE (const FString &PackageName, UWorld *OwningWorld)
 Given a loaded editor UWorld, duplicate it for play in editor purposes with OwningWorld as the world with the persistent level.
 
static UWorld * FindWorldInPackage (UPackage *Package)
 Given a package, locate the UWorld contained within if one exists
 
static UWorld * FollowWorldRedirectorInPackage (UPackage *Package, UObjectRedirector **OptionalOutRedirector=nullptr)
 If the specified package contains a redirector to a UWorld, that UWorld is returned. 更多...
 
static UWorld * GetDuplicatedWorldForPIE (UWorld *InWorld, UPackage *InPIEackage, int32 PIEInstanceID)
 Duplicate the editor world to create the PIE world.
 
template<typename TSubsystemClass >
static FORCEINLINE TSubsystemClass * GetSubsystem (const UWorld *World)
 Get a Subsystem of specified type from the provided GameInstance returns nullptr if the Subsystem cannot be found or the GameInstance is null
 
static FString RemovePIEPrefix (const FString &Source)
 Given a string, return that string with any PIE prefix removed
 
static FString StripPIEPrefixFromPackageName (const FString &PackageName, const FString &Prefix)
 Given a PackageName and a prefix type, get back to the original package name (i.e. 更多...
 
- 静态 Public 成员函数 继承自 UObject
static void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 Callback used to allow object register its direct object references that are not already covered by the token stream. 更多...
 
static bool CanCreateInCurrentContext (UObject *Template)
 Determines if you can create an object from the supplied template in the current context (editor, client only, dedicated server, game/listen) This calls NeedsLoadForClient & NeedsLoadForServer
 
static UObject * GetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 Return the template that an object with this class, outer and name would be 更多...
 
static const FName & SourceFileTagName ()
 Get the common tag name used for all asset source file import paths
 
static void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated client builds
 
static void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated server builds
 
- 静态 Public 成员函数 继承自 UObjectBase
static void EmitBaseReferences (UClass *RootClass)
 Emit GC tokens for UObjectBase, this might be UObject::StaticClass or Default__Class
 
static FString RemoveClassPrefix (const TCHAR *ClassName)
 Removes the class prefix from the given string
 

Public 属性

FAudioDeviceHandle AudioDeviceHandle
 Handle to the active audio device for this world.
 
float AudioTimeSeconds
 Time in seconds since level began play, but IS paused when the game is paused, and IS NOT dilated/clamped.
 
TArray< class AAudioVolume * > AudioVolumes
 Set of AudioVolumes sorted by

 
uint8 bActorsInitialized:1
 Whether actors have been initialized for play
 
uint8 bAggressiveLOD:1
 frame rate is well below DesiredFrameRate, so make LOD more aggressive
 
uint8 bAllowAudioPlayback:1
 Indicates this scene always allows audio playback.
 
uint8 bAreConstraintsDirty:1
 Keeps track whether actors moved via PostEditMove and therefore constraint syncup should be performed.
 
uint8 bBegunPlay:1
 Whether BeginPlay has been called on actors
 
uint8 bCreateRenderStateForHiddenComponentsWithCollsion:1
 If TRUE, 'hidden' components will still create render proxy, so can draw info (see USceneComponent::ShouldRender)
 
bool bDebugDrawAllTraceTags
 When set to true, all scene queries will be drawn
 
uint8 bDoDelayedUpdateCullDistanceVolumes:1
 True we want to execute a call to UpdateCulledTriggerVolumes during Tick
 
uint8 bDropDetail:1
 frame rate is below DesiredFrameRate, so drop high detail actors
 
uint8 bInTick:1
 Whether we are in the middle of ticking actors/components or not

 
uint8 bIsBuilt:1
 Whether we have already built the collision tree or not

 
uint8 bIsCameraMoveableWhenPaused:1
 When set, camera is potentially moveable even when paused
 
uint8 bIsDefaultLevel:1
 That map is default map or not
 
uint8 bIsLevelStreamingFrozen:1
 Is level streaming currently frozen?

 
uint8 bIsRunningConstructionScript:1
 If true this world is in the process of running the construction script for an actor
 
uint8 bIsTearingDown:1
 Is the world being torn down
 
uint8 bIsWorldInitialized:1
 Whether world object has been initialized via Init()

 
uint8 bKismetScriptError:1
 This is a bool that indicates that one or more blueprints in the level (blueprint instances, level script, etc) have compile errors that could not be automatically resolved.
 
uint8 bMatchStarted:1
 Whether the match has been started
 
uint8 bPlayersOnly:1
 When ticking the world, only update players.
 
uint8 bPlayersOnlyPending:1
 Indicates that at the end the frame bPlayersOnly will be set to true.
 
uint8 bPostTickComponentUpdate:1
 Indicates that during world ticking we are doing the final component update of dirty components (after PostAsyncWork and effect physics scene has run.
 
uint8 bRequestedBlockOnAsyncLoading:1
 Whether it was requested that the engine bring up a loading screen and block on async loading.
 
uint8 bShouldSimulatePhysics:1
 If true this world will tick physics to simulate. 更多...
 
uint8 bStartup:1
 Is the world in its actor initialization phase.
 
uint8 bTickNewlySpawned:1
 We are in the middle of actor ticking, so add tasks for newly spawned actors

 
uint8 bTriggerPostLoadMap:1
 Triggers a call to PostLoadMap() the next Tick, turns off loading movie if LoadMap() has been called.
 
uint8 bWorldWasLoadedThisTick:1
 set for one tick after completely loading and initializing a new world (regardless of whether it's LoadMap() or seamless travel)
 
FName CommittedPersistentLevelName
 Name of persistent level if we've loaded levels via CommitMapChange() that aren't normally in the StreamingLevels array (to inform newly joining clients)
 
FName DebugDrawTraceTag
 When non-'None', all line traces where the TraceTag match this will be drawn
 
float DeltaTimeSeconds
 Frame delta time in seconds adjusted by e.g. 更多...
 
class UDemoNetDriver * DemoNetDriver
 NetDriver for capturing network traffic to record demos
 
FEndPhysicsTickFunction EndPhysicsTickFunction
 Tick function for ending physics

 
TEnumAsByte< ERHIFeatureLevel::Type > FeatureLevel
 The current renderer feature level of this world
 
EFlushLevelStreamingType FlushLevelStreamingType
 Whether we flushing level streaming state
 
class FFXSystemInterface * FXSystem
 Interface to the FX system managing particles and related effects for this world. 更多...
 
FOnGameStateSetEvent GameStateSetEvent
 Called whenever the gamestate is set on the world.
 
double LastTimeUnbuiltLightingWasEncountered
 Time in FPlatformTime::Seconds unbuilt time was last encountered. 更多...
 
PRAGMA_ENABLE_DEPRECATION_WARNINGS class AParticleEventManager * MyParticleEventManager
 Particle event manager
 
float NextSwitchCountdown
 Amount of time to wait before traveling to next map, gives clients time to receive final RPCs 更多...
 
TEnumAsByte< ETravelType > NextTravelType
 The type of travel to perform next when doing a server travel
 
FString NextURL
 The URL to be used for the upcoming server travel
 
uint32 NumLightingUnbuiltObjects
 This is a int on the level which is set when a light that needs to have lighting rebuilt is moved. 更多...
 
int32 NumTextureStreamingDirtyResources
 Num of resources that have changed since the last texture streaming build. 更多...
 
int32 NumTextureStreamingUnbuiltComponents
 Num of components missing valid texture streaming data. 更多...
 
FIntVector OriginLocation
 Current location of this world origin
 
FVector OriginOffsetThisFrame
 World origin offset value. 更多...
 
float PauseDelay
 time at which to start pause
 
int32 PlayerNum
 Counter for allocating game- unique controller player numbers

 
TArray< IInterface_PostProcessVolume * > PostProcessVolumes
 An array of post processing volumes, sorted in ascending order of priority. 更多...
 
TArray< FName > PreparingLevelNames
 array of levels that were loaded into this map via PrepareMapChange() / CommitMapChange() (to inform newly joining clients)
 
float RealTimeSeconds
 Time in seconds since level began play, but IS NOT paused when the game is paused, and IS NOT dilated/clamped.
 
FIntVector RequestedOriginLocation
 Requested new world origin location
 
class FSceneInterface * Scene
 The interface to the scene manager for this world.
 
FStartPhysicsTickFunction StartPhysicsTickFunction
 Tick function for starting physics

 
FString StreamingLevelsPrefix
 Prefix we used to rename streaming levels, non empty in PIE and standalone preview
 
int32 StreamingVolumeUpdateDelay
 Number of frames to delay Streaming Volume updating, useful if you preload a bunch of levels but the camera hasn't caught up yet (INDEX_NONE for infinite)
 
TEnumAsByte< ETickingGroup > TickGroup
 The current ticking group

 
class FTickTaskLevel * TickTaskLevel
 Data structures for holding the tick functions that are associated with the world (line batcher, etc)
 
float TimeSeconds
 Time in seconds since level began play, but IS paused when the game is paused, and IS dilated/clamped.
 
float UnpausedTimeSeconds
 Time in seconds since level began play, but IS NOT paused when the game is paused, and IS dilated/clamped.
 
FURL URL
 The URL that was used when loading this World. 更多...
 
TArray< FVector > ViewLocationsRenderedLastFrame
 View locations rendered in the previous frame, if any.
 
class UWorldComposition * WorldComposition
 All levels information from which our world is composed
 
TEnumAsByte< EWorldType::Type > WorldType
 The type of world this is. 更多...
 

静态 Public 属性

static TMap< FName, EWorldType::Type > WorldTypePreLoadMap
 A static map that is populated before loading a world from a package. 更多...
 

友元

struct FWorldNotifyStreamingLevelLoading
 

额外继承的成员函数

- Protected 成员函数 继承自 UObject
bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 Checks it's ok to perform subobjects check at this time.
 
virtual bool CheckDefaultSubobjectsInternal () const
 Checks default sub-object assumptions. 更多...
 
virtual FString GetDetailedInfoInternal () const
 This function actually does the work for the GetDetailedInfo() and is virtual. 更多...
 
- Protected 成员函数 继承自 UObjectBase
virtual void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 Convert a boot-strap registered class into a real one, add to uobject array, etc 更多...
 
void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 Just change the FName and Outer and rehash into name hash tables. 更多...
 
void Register (const TCHAR *PackageName, const TCHAR *Name)
 Enqueue the registration for this object.
 
virtual void RegisterDependencies ()
 Force any base classes to be registered first
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 Set the object flags directly 更多...
 
 UObjectBase (EObjectFlags InFlags)
 Constructor used for bootstrapping 更多...
 
- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

The World is the top level object representing a map or a sandbox in which Actors and Components will exist and be rendered.


A World can be a single Persistent Level with an optional list of streaming levels that are loaded and unloaded via volumes and blueprint functions or it can be a collection of levels organized with a World Composition.

In a standalone game, generally only a single World exists except during seamless area transitions when both a destination and current world exists. In the editor many Worlds exist: The level being edited, each PIE instance, each editor tool which has an interactive rendered viewport, and many more.

示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

成员函数说明

◆ AddController()

void UWorld::AddController ( AController *  Controller)

Inserts the passed in controller at the front of the linked list of controllers.

参数
ControllerController to insert, use NULL to clear list

◆ AddMovieSceneSequenceTickHandler()

FDelegateHandle UWorld::AddMovieSceneSequenceTickHandler ( const FOnMovieSceneSequenceTick::FDelegate &  InHandler)

Adds a tick handler for sequences.

These handlers get ticked before pre-physics

◆ AddNetworkActor()

void UWorld::AddNetworkActor ( AActor *  Actor)

Adds the passed in actor to the special network actor list This list is used to specifically single out actors that are relevant for networking without having to scan the much large list

参数
ActorActor to add

◆ AddPhysicsVolume()

void UWorld::AddPhysicsVolume ( APhysicsVolume *  Volume)

Add a physics volume to the list of those in the world.

DefaultPhysicsVolume is not tracked. Used internally by APhysicsVolume.

◆ AddStreamingLevels()

void UWorld::AddStreamingLevels ( TArrayView< ULevelStreaming *const >  StreamingLevelsToAdd)

Add multiple streaming levels to the list of streamed levels to consider.


◆ AddToWorld()

void UWorld::AddToWorld ( ULevel *  Level,
const FTransform &  LevelTransform = FTransform::Identity,
bool  bConsiderTimeLimit = true 
)

Associates the passed in level with the world.

The work to make the level visible is spread across several frames and this function has to be called till it returns true for the level to be visible/ associated with the world and no longer be in a limbo state.

参数
LevelLevel object we should add
LevelTransformTransformation to apply to each actor in the level

◆ AddUniqueStreamingLevel()

void UWorld::AddUniqueStreamingLevel ( ULevelStreaming *  StreamingLevelToAdd)

Add a streaming level to the list of streamed levels to consider.

If this streaming level is in the array already then it won't be added again.

◆ AddUniqueStreamingLevels()

void UWorld::AddUniqueStreamingLevels ( TArrayView< ULevelStreaming *const >  StreamingLevelsToAdd)

Add multiple streaming levels to the list of streamed levels to consider.

If any of these streaming levels are in the array already then they won't be added again.

◆ AllowAudioPlayback()

bool UWorld::AllowAudioPlayback ( ) const

Returns whether audio playback is allowed for this scene.

返回
true if current world is GWorld, false otherwise

◆ AllowLevelLoadRequests()

bool UWorld::AllowLevelLoadRequests ( )

Returns whether the level streaming code is allowed to issue load requests.

返回
true if level load requests are allowed, false otherwise.

◆ AsyncLineTraceByChannel()

FTraceHandle UWorld::AsyncLineTraceByChannel ( EAsyncTraceType  InTraceType,
const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam,
FTraceDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async.

Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
InTraceTypeIndicates if you want multiple results, single result, or just yes/no (no hit information)
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ AsyncLineTraceByObjectType()

FTraceHandle UWorld::AsyncLineTraceByObjectType ( EAsyncTraceType  InTraceType,
const FVector &  Start,
const FVector &  End,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
FTraceDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async.

Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
InTraceTypeIndicates if you want multiple results, single hit result, or just yes/no (no hit information)
StartStart location of the ray
EndEnd location of the ray
ObjectQueryParamsList of object types it's looking for
ParamsAdditional parameters used for the trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ AsyncLoadAlwaysLoadedLevelsForSeamlessTravel()

void UWorld::AsyncLoadAlwaysLoadedLevelsForSeamlessTravel ( )

Requests async loading of any 'always loaded' level.

Used in seamless travel to prevent blocking in the first UpdateLevelStreaming.

◆ AsyncOverlapByChannel()

FTraceHandle UWorld::AsyncOverlapByChannel ( const FVector &  Pos,
const FQuat &  Rot,
ECollisionChannel  TraceChannel,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam,
FOverlapDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
PosLocation of center of shape to test against the world
bMultiTracetrue if you'd like to do multi trace, or false otherwise
TraceChannelThe 'channel' that this query is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ AsyncOverlapByObjectType()

FTraceHandle UWorld::AsyncOverlapByObjectType ( const FVector &  Pos,
const FQuat &  Rot,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
FOverlapDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
PosLocation of center of shape to test against the world
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ AsyncSweepByChannel()

FTraceHandle UWorld::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,
FTraceDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
InTraceTypeIndicates if you want multiple results, single hit result, or just yes/no (no hit information)
StartStart location of the shape
EndEnd location of the shape
TraceChannelThe 'channel' that this trace is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ AsyncSweepByObjectType()

FTraceHandle UWorld::AsyncSweepByObjectType ( EAsyncTraceType  InTraceType,
const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
FTraceDelegate *  InDelegate = NULL,
uint32  UserData = 0 
)

Interface for Async trace Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

参数
InTraceTypeIndicates if you want multiple results, single hit result, or just yes/no (no hit information)
StartStart location of the shape
EndEnd location of the shape
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
InDeleagteDelegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

参数
UserDataUserData

◆ BeginDestroy()

virtual void UWorld::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UObject .

◆ BeginPlay()

void UWorld::BeginPlay ( )

Start gameplay.

This will cause the game mode to transition to the correct state and call BeginPlay on all actors

◆ CancelPendingMapChange()

void UWorld::CancelPendingMapChange ( )

cancels pending map change (

注解
: we can't cancel pending async loads, so this won't immediately free the memory)

◆ CleanupActors()

void UWorld::CleanupActors ( )

Remove NULL entries from actor list.

Only does so for dynamic actors to avoid resorting. In theory static actors shouldn't be deleted during gameplay.

◆ CleanupWorld()

void UWorld::CleanupWorld ( bool  bSessionEnded = true,
bool  bCleanupResources = true,
UWorld *  NewWorld = nullptr 
)

Cleans up components, streaming data and assorted other intermediate data.

参数
bSessionEndedwhether to notify the viewport that the game session has ended.
NewWorldOptional new world that will be loaded after this world is cleaned up. Specify a new world to prevent it and it's sublevels from being GCed during map transitions.

◆ ClearActorComponentEndOfFrameUpdate()

void UWorld::ClearActorComponentEndOfFrameUpdate ( UActorComponent *  Component)

Clears the need for a component to have a end of frame update

参数
Component- Component to update at the end of the frame

◆ ClearWorldComponents()

void UWorld::ClearWorldComponents ( )

Clears all level components and world components like e.g.

line batcher.

◆ ComponentOverlapMulti()

bool UWorld::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

Test the collision of the supplied component at the supplied location/rotation using object types, and determine the set of components that it overlaps

注解
The overload taking rotation as an FQuat is slightly faster than the version using FRotator (which will be converted to an FQuat)..
参数
OutOverlapsArray of overlaps found between component in specified pose and the world
PrimCompComponent's geometry to test against the world. Transform of this component is ignored
PosLocation of PrimComp geometry for test against the world
RotRotation of PrimComp geometry for test against the world
ObjectQueryParamsList of object types it's looking for. When this enters, we do object query with component shape
返回
TRUE if any hit is found

◆ ComponentOverlapMultiByChannel()

bool UWorld::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

Test the collision of the supplied component at the supplied location/rotation using a specific channel, and determine the set of components that it overlaps

注解
The overload taking rotation as an FQuat is slightly faster than the version using FRotator (which will be converted to an FQuat)..
参数
OutOverlapsArray of overlaps found between component in specified pose and the world
PrimCompComponent's geometry to test against the world. Transform of this component is ignored
PosLocation of PrimComp geometry for test against the world
RotRotation of PrimComp geometry for test against the world
TraceChannelThe 'channel' that this query is in, used to determine which components to hit
返回
TRUE if OutOverlaps contains any blocking results

◆ ComponentSweepMulti()

bool UWorld::ComponentSweepMulti ( TArray< struct FHitResult > &  OutHits,
class UPrimitiveComponent *  PrimComp,
const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
const FComponentQueryParams &  Params 
) const

Sweep the geometry of the supplied component, and determine the set of components that it hits.

注解
The overload taking rotation as an FQuat is slightly faster than the version using FRotator (which will be converted to an FQuat)..
参数
OutHitsArray of hits found between ray and the world
PrimCompComponent's geometry to test against the world. Transform of this component is ignored
StartStart location of the trace
EndEnd location of the trace
RotRotation of PrimComp geometry for test against the world (rotation remains constant over sweep)
ParamsAdditional parameters used for the trace
返回
TRUE if OutHits contains any blocking hit entries

◆ ContainsActor()

bool UWorld::ContainsActor ( AActor *  Actor) const

Returns whether the passed in actor is part of any of the loaded levels actors array.

Warning: Will return true for pending kill actors!

参数
ActorActor to check whether it is contained by any level
返回
true if actor is contained by any of the loaded levels, false otherwise

◆ CreateAISystem()

UAISystemBase * UWorld::CreateAISystem ( )

AISystem getter.

if AISystem is missing it tries to create one and returns the result. @NOTE the result can be NULL, for example on client games or if no AI module or AISystem class have not been specified

参见
UAISystemBase::AISystemClassName and UAISystemBase::AISystemModuleName

◆ DestroyActor()

bool UWorld::DestroyActor ( AActor *  Actor,
bool  bNetForce = false,
bool  bShouldModifyLevel = true 
)

Removes the actor from its level's actor list and generally cleans up the engine's internal state.

What this function does not do, but is handled via garbage collection instead, is remove references to this actor from all other actors, and kill the actor's resources. This function is set up so that no problems occur even if the actor is being destroyed inside its recursion stack.

参数
ThisActorActor to remove.
bNetForce[opt] Ignored unless called during play. Default is false.
bShouldModifyLevel[opt] If true, Modify() the level before removing the actor. Default is true.
返回
true if destroyed or already marked for destruction, false if actor couldn't be destroyed.

◆ DestroySwappedPC()

bool UWorld::DestroySwappedPC ( UNetConnection *  Connection)

Looks for a PlayerController that was being swapped by the given NetConnection and, if found, destroys it (because the swap is complete or the connection was closed)

参数
Connection- the connection that performed the swap
返回
whether a PC waiting for a swap was found

◆ DestroyWorld()

void UWorld::DestroyWorld ( bool  bInformEngineOfWorld,
UWorld *  NewWorld = nullptr 
)

Destroy this World instance.

If destroying the world to load a different world, supply it here to prevent GC of the new world or it's sublevels.

◆ DuplicateRequestedLevels()

void UWorld::DuplicateRequestedLevels ( const FName  MapName)

Creates a new level collection of type DynamicDuplicatedLevels by duplicating the levels in DynamicSourceLevels.

Should only be called by engine.

参数
MapNameThe name of the soure map, used as a parameter to UEngine::Experimental_ShouldPreDuplicateMap

◆ EditorDestroyActor()

bool UWorld::EditorDestroyActor ( AActor *  Actor,
bool  bShouldModifyLevel 
)

Wrapper for DestroyActor() that should be called in the editor.

参数
bShouldModifyLevelIf true, Modify() the level before removing the actor.

◆ EncroachingBlockingGeometry()

bool UWorld::EncroachingBlockingGeometry ( const AActor *  TestActor,
FVector  TestLocation,
FRotator  TestRotation,
FVector *  ProposedAdjustment = NULL 
)

@Return true if Actor would encroach at TestLocation on something that blocks it.

Returns a ProposedAdjustment that might result in an unblocked TestLocation.

◆ EnsureCollisionTreeIsBuilt()

void UWorld::EnsureCollisionTreeIsBuilt ( )

Ensures that the collision detection tree is fully built.

This should be called after the full level reload to make sure the first traces are not abysmally slow.

◆ FindOrAddCollectionByType()

FLevelCollection & UWorld::FindOrAddCollectionByType ( const ELevelCollectionType  InType)

Returns the FLevelCollection for the given InType.

If one does not exist, it is created.

◆ FindOrAddCollectionByType_Index()

int32 UWorld::FindOrAddCollectionByType_Index ( const ELevelCollectionType  InType)

Returns the index of the first FLevelCollection of the given InType.

If one does not exist, it is created and its index returned.

◆ FindTeleportSpot()

bool UWorld::FindTeleportSpot ( const AActor *  TestActor,
FVector &  PlaceLocation,
FRotator  PlaceRotation 
)

Try to find an acceptable non-colliding location to place TestActor as close to possible to PlaceLocation.

Expects PlaceLocation to be a valid location inside the level. Returns true if a location without blocking collision is found, in which case PlaceLocation is overwritten with the new clear location. Returns false if no suitable location could be found, in which case PlaceLocation is unmodified.

◆ FinishDestroy()

virtual void UWorld::FinishDestroy ( )
overridevirtual

Called to finish destroying the object.

After UObject::FinishDestroy is called, the object's memory should no longer be accessed.

警告
Because properties are destroyed here, Super::FinishDestroy() should always be called at the end of your child class's FinishDestroy() method, rather than at the beginning.

重载 UObject .

◆ FlushLevelStreaming()

void UWorld::FlushLevelStreaming ( EFlushLevelStreamingType  FlushType = EFlushLevelStreamingType::Full)

Flushes level streaming in blocking fashion and returns when all levels are loaded/ visible/ hidden so further calls to UpdateLevelStreaming won't do any work unless state changes.

Basically blocks on all async operation like updating components.

参数
FlushTypeWhether to only flush level visibility operations (optional)

◆ FollowWorldRedirectorInPackage()

static UWorld * UWorld::FollowWorldRedirectorInPackage ( UPackage *  Package,
UObjectRedirector **  OptionalOutRedirector = nullptr 
)
static

If the specified package contains a redirector to a UWorld, that UWorld is returned.

Otherwise, nullptr is returned.

◆ GetActiveLevelCollection()

const FLevelCollection * UWorld::GetActiveLevelCollection ( ) const

Returns the level collection which currently has its context set on this world.

May be null. If non-null, this implies that execution is currently within the scope of an FScopedLevelCollectionContextSwitch for this world.

◆ GetActiveLevelCollectionIndex()

int32 UWorld::GetActiveLevelCollectionIndex ( ) const
inline

Returns the index of the level collection which currently has its context set on this world.

May be INDEX_NONE. If not INDEX_NONE, this implies that execution is currently within the scope of an FScopedLevelCollectionContextSwitch for this world.

◆ GetAudioDeviceRaw()

class FAudioDevice * UWorld::GetAudioDeviceRaw ( )

Returns the audio device associated with this world.

Lifecycle of the audio device is not guaranteed unless you used GetAudioDevice().

返回
Audio device to use with this world.

◆ GetAudioSettings()

class AAudioVolume * UWorld::GetAudioSettings ( const FVector &  ViewLocation,
struct FReverbSettings *  OutReverbSettings,
struct FInteriorSettings *  OutInteriorSettings 
)

Finds the audio settings to use for a given view location, taking into account the world's default settings and the audio volumes in the world.

参数
ViewLocationCurrent view location.
OutReverbSettings[out] Upon return, the reverb settings for a camera at ViewLocation.
OutInteriorSettings[out] Upon return, the interior settings for a camera at ViewLocation.
返回
If the settings came from an audio volume, the audio volume object is returned.

◆ GetAudioTimeSeconds()

FORCEINLINE_DEBUGGABLE float UWorld::GetAudioTimeSeconds ( ) const

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

返回
time in seconds since world was brought up for play

◆ GetAuthGameMode() [1/2]

template<class T >
T * UWorld::GetAuthGameMode ( ) const
inline

Returns the current Game Mode instance cast to the template type.

This can only return a valid pointer on the server and may be null if the cast fails. Will always return null on a client.

◆ GetAuthGameMode() [2/2]

AGameModeBase * UWorld::GetAuthGameMode ( ) const
inline

Returns the current Game Mode instance, which is always valid during gameplay on the server.

This will only return a valid pointer on the server. Will always return null on a client.

◆ GetCanvasForRenderingToTarget()

UCanvas * UWorld::GetCanvasForRenderingToTarget ( )

Gets the canvas object for rendering to a render target.

Will allocate one if needed.

◆ GetDefaultBrush()

ABrush * UWorld::GetDefaultBrush ( ) const

Returns the default brush for the persistent level.

This is usually the 'builder brush' for editor builds, undefined for non editor instances and may be NULL.

◆ GetDefaultGravityZ()

float UWorld::GetDefaultGravityZ ( ) const

Returns the Z component of the default world gravity.

返回
Z component of the default world gravity.

◆ GetDefaultPhysicsVolume()

APhysicsVolume * UWorld::GetDefaultPhysicsVolume ( ) const
inline

Returns the default physics volume and creates it if necessary.

返回
default physics volume

◆ GetDeltaSeconds()

FORCEINLINE_DEBUGGABLE float UWorld::GetDeltaSeconds ( ) const

Returns the frame delta time in seconds adjusted by e.g.

time dilation.

返回
frame delta time in seconds adjusted by e.g. time dilation

◆ GetDetailMode()

int32 UWorld::GetDetailMode ( )
返回
the current detail mode, like EDetailMode but can be outside of the range

◆ GetFirstPlayerController() [1/2]

template<class T >
T * UWorld::GetFirstPlayerController ( ) const
inline
返回
Returns the first player controller cast to the template type, or NULL if there is not one.

May return NULL if the cast fails.

◆ GetFirstPlayerController() [2/2]

APlayerController * UWorld::GetFirstPlayerController ( ) const
返回
Returns the first player controller, or NULL if there is not one.

◆ GetGravityZ()

float UWorld::GetGravityZ ( ) const

Returns the Z component of the current world gravity.

返回
Z component of current world gravity.

◆ GetLatentActionManager()

FLatentActionManager & UWorld::GetLatentActionManager ( )
inline

Returns LatentActionManager instance, preferring the one allocated by the game instance if a game instance is associated with this.

This pattern is a little bit of a kludge to allow UWorld clients (for instance, preview world in the Blueprint Editor to not worry about replacing features from GameInstance. Alternatively we could mandate that they implement a game instance for their scene.

◆ GetLevelScriptActor()

class ALevelScriptActor * UWorld::GetLevelScriptActor ( class ULevel *  OwnerLevel = NULL) const

Returns the current (or specified) level's level scripting actor

参数
OwnerLevelthe level to get the level scripting actor for. Must correspond to one of the levels in GWorld's Levels array; Thus, only applicable when editing a multi-level map. Defaults to the level currently being edited.
返回
A pointer to the level scripting actor, if any, for the specified level, or NULL if no level scripting actor is available

◆ GetLightMapsAndShadowMaps()

void UWorld::GetLightMapsAndShadowMaps ( ULevel *  Level,
TArray< UTexture2D * > &  OutLightMapsAndShadowMaps 
)

Gets all LightMaps and ShadowMaps associated with this world.

Specify the level or leave null for persistent

◆ GetMapName()

const FString UWorld::GetMapName ( ) const

Returns the name of the current map, taking into account using a dummy persistent world and loading levels into it via PrepareMapChange.

返回
name of the current map

◆ GetModel()

UModel * UWorld::GetModel ( ) const

Returns the current levels BSP model.

返回
BSP UModel

◆ GetNetDriver()

FORCEINLINE_DEBUGGABLE UNetDriver * UWorld::GetNetDriver ( ) const
inline

Used to get a net driver object.

返回
a pointer to the net driver or NULL if no driver is available.

◆ GetNetMode()

FORCEINLINE_DEBUGGABLE ENetMode UWorld::GetNetMode ( ) const

Returns the net mode this world is running under.

参见
IsNetMode()

◆ GetNumControllers()

int32 UWorld::GetNumControllers ( ) const
返回
Returns the number of Controllers.

◆ GetNumPawns()

int32 UWorld::GetNumPawns ( ) const
返回
Returns the number of Pawns.

◆ GetNumPlayerControllers()

int32 UWorld::GetNumPlayerControllers ( ) const
返回
Returns the number of Player Controllers.

◆ GetPawnIterator()

FConstPawnIterator UWorld::GetPawnIterator ( ) const
返回
Returns an iterator for the pawn list.

◆ GetPlayerControllerIterator()

FConstPlayerControllerIterator UWorld::GetPlayerControllerIterator ( ) const
返回
Returns an iterator for the player controller list.

◆ GetPrimaryAssetId()

virtual FPrimaryAssetId UWorld::GetPrimaryAssetId ( ) const
overridevirtual

Returns an Type:Name pair representing the PrimaryAssetId for this object.

Assets that need to be globally referenced at runtime should return a valid Identifier. If this is valid, the object can be referenced by identifier using the AssetManager

重载 UObject .

◆ GetRealTimeSeconds()

FORCEINLINE_DEBUGGABLE float UWorld::GetRealTimeSeconds ( ) const

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

返回
time in seconds since world was brought up for play

◆ GetSubsystemArray()

template<typename TSubsystemClass >
const TArray< TSubsystemClass * > & UWorld::GetSubsystemArray ( ) const
inline

Get all Subsystem of specified type, this is only necessary for interfaces that can have multiple implementations instanced at a time.

Do not hold onto this Array reference unless you are sure the lifetime is less than that of UGameInstance

◆ GetTimeSeconds()

FORCEINLINE_DEBUGGABLE float UWorld::GetTimeSeconds ( ) const

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

返回
time in seconds since world was brought up for play

◆ GetUnpausedTimeSeconds()

FORCEINLINE_DEBUGGABLE float UWorld::GetUnpausedTimeSeconds ( ) const

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

返回
time in seconds since world was brought up for play

◆ InitializeActorsForPlay()

void UWorld::InitializeActorsForPlay ( const FURL &  InURL,
bool  bResetTime = true,
FRegisterComponentContext *  Context = nullptr 
)

Initializes all actors and prepares them to start gameplay

参数
InURLcommandline URL
bResetTime(optional) whether the WorldSettings's TimeSeconds should be reset to zero

◆ InvalidateModelGeometry()

void UWorld::InvalidateModelGeometry ( ULevel *  InLevel)

Invalidates the cached data used to render the levels' UModel.

参数
InLevelLevel to invalidate. If this is NULL it will affect ALL levels

◆ InvalidateModelSurface()

void UWorld::InvalidateModelSurface ( bool  bCurrentLevelOnly)

Discards the cached data used to render the levels' UModel.

Assumes that the faces and vertex positions haven't changed, only the applied materials.

参数
bCurrentLevelOnlyIf true, affect only the current level.

◆ IsCameraMoveable()

bool UWorld::IsCameraMoveable ( ) const
返回
true if the camera is in a moveable state (taking pausedness into account)

◆ IsClient()

bool UWorld::IsClient ( ) const
返回
true if this level is a client

◆ IsInSeamlessTravel()

bool UWorld::IsInSeamlessTravel ( )
返回
whether we're currently in a seamless transition

◆ IsMapChangeReady()

bool UWorld::IsMapChangeReady ( )
返回
true if there is a map change being prepared, returns whether that change is ready to be committed, otherwise false

◆ IsNetMode()

FORCEINLINE_DEBUGGABLE bool UWorld::IsNetMode ( ENetMode  Mode) const

Test whether net mode is the given mode.

In optimized non-editor builds this can be more efficient than GetNetMode() because it can check the static build flags without considering PIE.

◆ IsPaused()

bool UWorld::IsPaused ( ) const
返回
true if the world is in the paused state

◆ IsPreparingMapChange()

bool UWorld::IsPreparingMapChange ( )
返回
true if there's a map change currently in progress

◆ IsServer()

bool UWorld::IsServer ( ) const
返回
true if this level is a server

◆ IsTraceHandleValid()

bool UWorld::IsTraceHandleValid ( const FTraceHandle &  Handle,
bool  bOverlapTrace 
)

See if TraceHandle is still valid or not

参数
HandleTraceHandle that was returned when request Trace
bOverlapTracetrue if this is overlap test Handle, not trace test handle

return true if it will be evaluated OR it has valid result return false if it already has expired Or not valid

◆ IsVisibilityRequestPending()

bool UWorld::IsVisibilityRequestPending ( ) const
返回
whether there is at least one level with a pending visibility request

◆ K2_GetWorldSettings()

AWorldSettings * UWorld::K2_GetWorldSettings ( )

Returns the AWorldSettings actor associated with this world.

返回
AWorldSettings actor associated with this world

◆ LineTraceMultiByChannel()

bool UWorld::LineTraceMultiByChannel ( TArray< struct FHitResult > &  OutHits,
const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Trace a ray against the world using a specific channel and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if OutHits contains any blocking hit entries

◆ LineTraceMultiByObjectType()

bool UWorld::LineTraceMultiByObjectType ( TArray< struct FHitResult > &  OutHits,
const FVector &  Start,
const FVector &  End,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using object types and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the ray
EndEnd location of the ray
ObjectQueryParamsList of object types it's looking for
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ LineTraceMultiByProfile()

bool UWorld::LineTraceMultiByProfile ( TArray< struct FHitResult > &  OutHits,
const FVector &  Start,
const FVector &  End,
FName  ProfileName,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using a specific profile and return overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the ray
EndEnd location of the ray
ProfileNameThe 'profile' used to determine which components to hit
ParamsAdditional parameters used for the trace
返回
TRUE if OutHits contains any blocking hit entries

◆ LineTraceSingleByChannel()

bool UWorld::LineTraceSingleByChannel ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Trace a ray against the world using a specific channel and return the first blocking hit

参数
OutHitFirst blocking hit found
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if a blocking hit is found

◆ LineTraceSingleByObjectType()

bool UWorld::LineTraceSingleByObjectType ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using object types and return the first blocking hit

参数
OutHitFirst blocking hit found
StartStart location of the ray
EndEnd location of the ray
ObjectQueryParamsList of object types it's looking for
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ LineTraceSingleByProfile()

bool UWorld::LineTraceSingleByProfile ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
FName  ProfileName,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using a specific profile and return the first blocking hit

参数
OutHitFirst blocking hit found
StartStart location of the ray
EndEnd location of the ray
ProfileNameThe 'profile' used to determine which components to hit
ParamsAdditional parameters used for the trace
返回
TRUE if a blocking hit is found

◆ LineTraceTestByChannel()

bool UWorld::LineTraceTestByChannel ( const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Trace a ray against the world using a specific channel and return if a blocking hit is found.

参数
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if a blocking hit is found

◆ LineTraceTestByObjectType()

bool UWorld::LineTraceTestByObjectType ( const FVector &  Start,
const FVector &  End,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using object types and return if a blocking hit is found.

参数
StartStart location of the ray
EndEnd location of the ray
ObjectQueryParamsList of object types it's looking for
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ LineTraceTestByProfile()

bool UWorld::LineTraceTestByProfile ( const FVector &  Start,
const FVector &  End,
FName  ProfileName,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Trace a ray against the world using a specific profile and return if a blocking hit is found.

参数
StartStart location of the ray
EndEnd location of the ray
ProfileNameThe 'profile' used to determine which components to hit
ParamsAdditional parameters used for the trace
返回
TRUE if a blocking hit is found

◆ LoadSecondaryLevels()

void UWorld::LoadSecondaryLevels ( bool  bForce = false,
TSet< FName > *  FilenamesToSkip = NULL 
)

Called after GWorld has been set.

Used to load, but not associate, all levels in the world in the Editor and at least create linkers in the game. Should only be called against GWorld::PersistentLevel's WorldSettings.

参数
bForceIf true, load the levels even is a commandlet

◆ MarkActorComponentForNeededEndOfFrameUpdate()

void UWorld::MarkActorComponentForNeededEndOfFrameUpdate ( UActorComponent *  Component,
bool  bForceGameThread 
)

Mark a component as needing an end of frame update

参数
Component- Component to update at the end of the frame
bForceGameThread- if true, force this to happen on the game thread

◆ NotifyAcceptedConnection()

virtual void UWorld::NotifyAcceptedConnection ( class UNetConnection *  Connection)
overridevirtual

Notification that a new connection has been created/established as a result of a remote request, previously approved by NotifyAcceptingConnection

参数
Connectionnewly created connection

重载 FNetworkNotify .

◆ NotifyAcceptingChannel()

virtual bool UWorld::NotifyAcceptingChannel ( class UChannel *  Channel)
overridevirtual

Notification that a new channel is being created/opened as a result of a remote request (Actor creation, etc)

参数
Channelnewly created channel
返回
true if the channel should be opened, false if it should be rejected (destroying the channel)

重载 FNetworkNotify .

◆ NotifyAcceptingConnection()

virtual EAcceptConnection::Type UWorld::NotifyAcceptingConnection ( )
overridevirtual

Notification that an incoming connection is pending, giving the interface a chance to reject the request

返回
EAcceptConnection indicating willingness to accept the connection at this time

重载 FNetworkNotify .

◆ NotifyControlMessage()

virtual void UWorld::NotifyControlMessage ( UNetConnection *  Connection,
uint8  MessageType,
class FInBunch &  Bunch 
)
overridevirtual

Handler for messages sent through a remote connection's control channel not required to handle the message, but if it reads any data from Bunch, it MUST read the ENTIRE data stream for that message (i.e.

use FNetControlMessage<TYPE>::Receive())

重载 FNetworkNotify .

◆ NotifyOfBlueprintDebuggingAssociation()

void UWorld::NotifyOfBlueprintDebuggingAssociation ( class UBlueprint *  Blueprint,
UObject *  DebugObject 
)

Notifies the world of a blueprint debugging reference

参数
BlueprintThe blueprint the reference is for
DebugObjectThe associated debugging object (may be NULL)

◆ OverlapAnyTestByChannel()

bool UWorld::OverlapAnyTestByChannel ( const FVector &  Pos,
const FQuat &  Rot,
ECollisionChannel  TraceChannel,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Test the collision of a shape at the supplied location using a specific channel, and return if any blocking or overlapping shape is found

参数
PosLocation of center of box to test against the world
TraceChannelThe 'channel' that this query is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule, Convex
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if any blocking or overlapping results are found

◆ OverlapAnyTestByObjectType()

bool UWorld::OverlapAnyTestByObjectType ( const FVector &  Pos,
const FQuat &  Rot,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Test the collision of a shape at the supplied location using object types, and return if any overlap is found

参数
PosLocation of center of box to test against the world
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule, Convex
ParamsAdditional parameters used for the trace
返回
TRUE if any blocking results are found

◆ OverlapAnyTestByProfile()

bool UWorld::OverlapAnyTestByProfile ( const FVector &  Pos,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Test the collision of a shape at the supplied location using a specific profile, and return if any blocking or overlap is found

参数
PosLocation of center of box to test against the world
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any blocking or overlapping results are found

◆ OverlapBlockingTestByChannel()

bool UWorld::OverlapBlockingTestByChannel ( const FVector &  Pos,
const FQuat &  Rot,
ECollisionChannel  TraceChannel,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Test the collision of a shape at the supplied location using a specific channel, and return if any blocking overlap is found

参数
PosLocation of center of box to test against the world
TraceChannelThe 'channel' that this query is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule, Convex
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if any blocking results are found

◆ OverlapBlockingTestByProfile()

bool UWorld::OverlapBlockingTestByProfile ( const FVector &  Pos,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Test the collision of a shape at the supplied location using a specific profile, and return if any blocking overlap is found

参数
PosLocation of center of box to test against the world
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any blocking results are found

◆ OverlapMultiByChannel()

bool UWorld::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

Test the collision of a shape at the supplied location using a specific channel, and determine the set of components that it overlaps

参数
OutOverlapsArray of components found to overlap supplied box
PosLocation of center of shape to test against the world
TraceChannelThe 'channel' that this query is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if OutOverlaps contains any blocking results

◆ OverlapMultiByObjectType()

bool UWorld::OverlapMultiByObjectType ( TArray< struct FOverlapResult > &  OutOverlaps,
const FVector &  Pos,
const FQuat &  Rot,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Test the collision of a shape at the supplied location using object types, and determine the set of components that it overlaps

参数
OutOverlapsArray of components found to overlap supplied box
PosLocation of center of shape to test against the world
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any overlap is found

◆ OverlapMultiByProfile()

bool UWorld::OverlapMultiByProfile ( TArray< struct FOverlapResult > &  OutOverlaps,
const FVector &  Pos,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Test the collision of a shape at the supplied location using a specific profile, and determine the set of components that it overlaps

参数
OutOverlapsArray of components found to overlap supplied box
PosLocation of center of shape to test against the world
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if OutOverlaps contains any blocking results

◆ ParallelLineTraceSingleByChannel()

bool UWorld::ParallelLineTraceSingleByChannel ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
ECollisionChannel  TraceChannel,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam,
const FCollisionResponseParams &  ResponseParam = FCollisionResponseParams::DefaultResponseParam 
) const

Trace a ray against the world without blocking the physics scene using a specific channel and return the first blocking hit

参数
OutHitFirst blocking hit found
StartStart location of the ray
EndEnd location of the ray
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if a blocking hit is found

◆ PostDuplicate()

virtual void UWorld::PostDuplicate ( bool  bDuplicateForPIE)
overridevirtual

Called after duplication & serialization and before PostLoad.

Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.

重载 UObject .

◆ PostLoad()

virtual void UWorld::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ PostSaveRoot()

virtual void UWorld::PostSaveRoot ( bool  bCleanupIsRequired)
overridevirtual

Called from within SavePackage on the passed in base/root object.

This function is called after the package has been saved and can perform cleanup.

参数
bCleanupIsRequiredWhether PreSaveRoot dirtied state that needs to be cleaned up

重载 UObject .

◆ PreDuplicate()

virtual void UWorld::PreDuplicate ( FObjectDuplicationParameters &  DupParams)
overridevirtual

Called before duplication.

参数
DupParamsthe full parameters the object will be duplicated with. Allows access to modify params such as the duplication seed for example for pre-filling the dup-source => dup-target map used by StaticDuplicateObject.
参见
FObjectDuplicationParameters

重载 UObject .

◆ PrepareMapChange()

void UWorld::PrepareMapChange ( const TArray< FName > &  LevelNames)

asynchronously loads the given levels in preparation for a streaming map transition.

This codepath is designed for worlds that heavily use level streaming and GameModes where the game state should be preserved through a transition.

参数
LevelNamesthe names of the level packages to load. LevelNames[0] will be the new persistent (primary) level

◆ PreSaveRoot()

virtual bool UWorld::PreSaveRoot ( const TCHAR *  Filename)
overridevirtual

Called from within SavePackage on the passed in base/root object.

The return value of this function will be passed to PostSaveRoot. This is used to allow objects used as a base to perform required actions before saving and cleanup afterwards.

参数
FilenameName of the file being saved to (includes path)
返回
Whether PostSaveRoot needs to perform internal cleanup

重载 UObject .

◆ ProcessLevelStreamingVolumes()

void UWorld::ProcessLevelStreamingVolumes ( FVector *  OverrideViewLocation = NULL)

Issues level streaming load/unload requests based on whether local players are inside/outside level streaming volumes.

参数
OverrideViewLocationOptional position used to override the location used to calculate current streaming volumes

◆ RemapCompiledScriptActor()

bool UWorld::RemapCompiledScriptActor ( FString &  Str) const

Given a level script actor, modify the string such that it points to the correct instance of the object.

For replays.

◆ RemoveActor()

void UWorld::RemoveActor ( AActor *  Actor,
bool  bShouldModifyLevel 
) const

Removes the passed in actor from the actor lists.

Please note that the code actually doesn't physically remove the index but rather clears it so other indices are still valid and the actors array size doesn't change.

参数
ActorActor to remove.
bShouldModifyLevelIf true, Modify() the level before removing the actor if in the editor.

◆ RemoveController()

void UWorld::RemoveController ( AController *  Controller)

Removes the passed in controller from the linked list of controllers.

参数
ControllerController to remove

◆ RemoveFromWorld()

void UWorld::RemoveFromWorld ( ULevel *  Level,
bool  bAllowIncrementalRemoval = false 
)

Dissociates the passed in level from the world.

The removal is blocking.

参数
LevelLevel object we should remove

◆ RemoveNetworkActor()

void UWorld::RemoveNetworkActor ( AActor *  Actor) const

Removes the passed in actor to from special network actor list

参数
ActorActor to remove

◆ RemovePawn()

void UWorld::RemovePawn ( APawn *  Pawn) const

Removes the passed in pawn from the linked list of pawns.

参数
PawnPawn to remove

◆ RemoveStreamingLevel()

bool UWorld::RemoveStreamingLevel ( ULevelStreaming *  StreamingLevelToRemove)

Remove a streaming level to the list of streamed levels to consider.

Returns true if the specified level was in the streaming levels list.

◆ RemoveStreamingLevelAt()

bool UWorld::RemoveStreamingLevelAt ( int32  IndexToRemove)

Remove a streaming level to the list of streamed levels to consider.

Returns true if the specified index was a valid index for removal.

◆ RemoveStreamingLevels()

int32 UWorld::RemoveStreamingLevels ( TArrayView< ULevelStreaming *const >  StreamingLevelsToRemove)

Remove multiple streaming levels to the list of streamed levels to consider.

Returns a count of how many of the specified levels were in the streaming levels list

◆ RunTickGroup()

void UWorld::RunTickGroup ( ETickingGroup  Group,
bool  bBlockTillComplete 
)

Run a tick group, ticking all actors and components

参数
Group- Ticking group to run
bBlockTillComplete- if true, do not return until all ticks are complete

◆ SeamlessTravel()

void UWorld::SeamlessTravel ( const FString &  InURL,
bool  bAbsolute = false,
FGuid  MapPackageGuid = FGuid() 
)

seamlessly travels to the given URL by first loading the entry level in the background, switching to it, and then loading the specified level.

Does not disrupt network communication or disconnect clients. You may need to implement GameModeBase::GetSeamlessTravelActorList(), PlayerController::GetSeamlessTravelActorList(), GameModeBase::PostSeamlessTravel(), and/or GameModeBase::HandleSeamlessTravelPlayer() to handle preserving any information that should be maintained (player teams, etc) This codepath is designed for worlds that use little or no level streaming and GameModes where the game state is reset/reloaded when transitioning. (like UT)

参数
URL- the URL to travel to; must be on the same server as the current URL
bAbsolute(opt) - if true, URL is absolute, otherwise relative
MapPackageGuid(opt) - the GUID of the map package to travel to - this is used to find the file when it has been auto-downloaded, so it is only needed for clients

◆ Serialize()

virtual void UWorld::Serialize ( FArchive &  Ar)
overridevirtual

Handles reading, writing, and reference collecting using FArchive.

This implementation handles all FProperty serialization, but can be overridden for native variables.

重载 UObject .

◆ ServerTravel()

virtual bool UWorld::ServerTravel ( const FString &  InURL,
bool  bAbsolute = false,
bool  bShouldSkipGameNotify = false 
)
virtual

Jumps the server to new level.

If bAbsolute is true and we are using seemless traveling, we will do an absolute travel (URL will be flushed).

参数
URLthe URL that we are traveling to
bAbsolutewhether we are using relative or absolute travel
bShouldSkipGameNotifywhether to notify the clients/game or not

◆ SetActiveLevelCollection()

void UWorld::SetActiveLevelCollection ( int32  LevelCollectionIndex)

Sets the level collection and its context on this world.

Should only be called by FScopedLevelCollectionContextSwitch.

◆ SetMapNeedsLightingFullyRebuilt()

void UWorld::SetMapNeedsLightingFullyRebuilt ( int32  InNumLightingUnbuiltObjects,
int32  InNumUnbuiltReflectionCaptures 
)

Sets NumLightingUnbuiltObjects to the specified value.

Marks the worldsettings package dirty if the value changed.

参数
InNumLightingUnbuiltObjectsThe new value.

◆ SetNetDriver()

void UWorld::SetNetDriver ( UNetDriver *  NewDriver)
inline

Sets the net driver to use for this world

参数
NewDriverthe new net driver to use

◆ SetSeamlessTravelMidpointPause()

void UWorld::SetSeamlessTravelMidpointPause ( bool  bNowPaused)

this function allows pausing the seamless travel in the middle, right before it starts loading the destination (i.e.

while in the transition level) this gives the opportunity to perform any other loading tasks before the final transition this function has no effect if we have already started loading the destination (you will get a log warning if this is the case)

参数
bNowPaused- whether the transition should now be paused

◆ SetShouldTick()

void UWorld::SetShouldTick ( const bool  bInShouldTick)
inline

Sets whether or not this world is ticked by the engine, but use it at your own risk! This could have unintended consequences if used carelessly.

That said, for worlds that are not interactive and not rendering, it can save the cost of ticking them. This should probably never be used for a primary game world.

◆ SetTimeUntilNextGarbageCollection()

void UWorld::SetTimeUntilNextGarbageCollection ( float  MinTimeUntilNextPass)

Updates the timer (as a one-off) that is used to trigger garbage collection; this should only be used for things like performance tests, using it recklessly can dramatically increase memory usage and cost of the eventual GC.

Note: Things that force a GC will still force a GC after using this method (and they will also reset the timer)

◆ SetupParameterCollectionInstances()

void UWorld::SetupParameterCollectionInstances ( )

Creates instances for each parameter collection in memory.

Called when a world is created.

◆ ShouldTick()

bool UWorld::ShouldTick ( ) const
inline

Returns whether or not this world is currently ticking.

See SetShouldTick.

◆ SpawnActor() [1/2]

AActor * UWorld::SpawnActor ( UClass *  Class,
FTransform const *  Transform,
const FActorSpawnParameters &  SpawnParameters = FActorSpawnParameters() 
)

Spawn Actors with given transform and SpawnParameters

参数
ClassClass to Spawn
TransformWorld Transform to spawn on
SpawnParametersSpawn Parameters
返回
Actor that just spawned

◆ SpawnActor() [2/2]

AActor * UWorld::SpawnActor ( UClass *  InClass,
FVector const *  Location = NULL,
FRotator const *  Rotation = NULL,
const FActorSpawnParameters &  SpawnParameters = FActorSpawnParameters() 
)

Spawn Actors with given transform and SpawnParameters

参数
ClassClass to Spawn
LocationLocation To Spawn
RotationRotation To Spawn
SpawnParametersSpawn Parameters
返回
Actor that just spawned

◆ SpawnActorAbsolute()

AActor * UWorld::SpawnActorAbsolute ( UClass *  Class,
FTransform const &  AbsoluteTransform,
const FActorSpawnParameters &  SpawnParameters = FActorSpawnParameters() 
)

Spawn Actors with given absolute transform (override root component transform) and SpawnParameters

参数
ClassClass to Spawn
AbsoluteTransformWorld Transform to spawn on - without considering CDO's relative transform, thus Absolute
SpawnParametersSpawn Parameters
返回
Actor that just spawned

◆ SpawnActorDeferred()

template<class T >
T * UWorld::SpawnActorDeferred ( UClass *  Class,
FTransform const &  Transform,
AActor *  Owner = nullptr,
APawn *  Instigator = nullptr,
ESpawnActorCollisionHandlingMethod  CollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::Undefined 
)
inline

Spawns given class and returns class T pointer, forcibly sets world transform (note this allows scale as well).

WILL NOT run Construction Script of Blueprints to give caller an opportunity to set parameters beforehand. Caller is responsible for invoking construction manually by calling UGameplayStatics::FinishSpawningActor (see AActor::OnConstruction).

◆ SpawnPlayActor()

APlayerController * UWorld::SpawnPlayActor ( class UPlayer *  Player,
ENetRole  RemoteRole,
const FURL &  InURL,
const TSharedPtr< const FUniqueNetId > &  UniqueId,
FString &  Error,
uint8  InNetPlayerIndex = 0 
)

Spawns a PlayerController and binds it to the passed in Player with the specified RemoteRole and options

参数
Player- the Player to set on the PlayerController
RemoteRole- the RemoteRole to set on the PlayerController
URL- URL containing player options (name, etc)
UniqueId- unique net ID of the player (may be zeroed if no online subsystem or not logged in, e.g. a local game or LAN match)
Error(out) - if set, indicates that there was an error - usually is set to a property from which the calling code can look up the actual message
InNetPlayerIndex(optional) - the NetPlayerIndex to set on the PlayerController
返回
the PlayerController that was spawned (may fail and return NULL)

◆ StripPIEPrefixFromPackageName()

static FString UWorld::StripPIEPrefixFromPackageName ( const FString &  PackageName,
const FString &  Prefix 
)
static

Given a PackageName and a prefix type, get back to the original package name (i.e.

the saved map name)

◆ SweepMultiByChannel()

bool UWorld::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

Sweep a shape against the world and return all initial overlaps using a specific channel (including blocking) if requested, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the shape
EndEnd location of the shape
TraceChannelThe 'channel' that this ray is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if OutHits contains any blocking hit entries

◆ SweepMultiByObjectType()

bool UWorld::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

Sweep a shape against the world and return all initial overlaps using object types (including blocking) if requested, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the shape
EndEnd location of the shape
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ SweepMultiByProfile()

bool UWorld::SweepMultiByProfile ( TArray< FHitResult > &  OutHits,
const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Sweep a shape against the world and return all initial overlaps using a specific profile, then overlapping hits and then first blocking hit Results are sorted, so a blocking hit (if found) will be the last element of the array Only the single closest blocking result will be generated, no tests will be done after that

参数
OutHitsArray of hits found between ray and the world
StartStart location of the shape
EndEnd location of the shape
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if OutHits contains any blocking hit entries

◆ SweepSingleByChannel()

bool UWorld::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

Sweep a shape against the world and return the first blocking hit using a specific channel

参数
OutHitFirst blocking hit found
StartStart location of the shape
EndEnd location of the shape
TraceChannelThe 'channel' that this trace is in, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if OutHits contains any blocking hit entries

◆ SweepSingleByObjectType()

bool UWorld::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

Sweep a shape against the world and return the first blocking hit using object types

参数
OutHitFirst blocking hit found
StartStart location of the shape
EndEnd location of the shape
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ SweepSingleByProfile()

bool UWorld::SweepSingleByProfile ( struct FHitResult &  OutHit,
const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Sweep a shape against the world and return the first blocking hit using a specific profile

参数
OutHitFirst blocking hit found
StartStart location of the shape
EndEnd location of the shape
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if OutHits contains any blocking hit entries

◆ SweepTestByChannel()

bool UWorld::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

Sweep a shape against the world using a specific channel and return if a blocking hit is found.

参数
StartStart location of the shape
EndEnd location of the shape
TraceChannelThe 'channel' that this trace uses, used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
ResponseParamResponseContainer to be used for this trace
返回
TRUE if a blocking hit is found

◆ SweepTestByObjectType()

bool UWorld::SweepTestByObjectType ( const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
const FCollisionObjectQueryParams &  ObjectQueryParams,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params = FCollisionQueryParams::DefaultQueryParam 
) const

Sweep a shape against the world using object types and return if a blocking hit is found.

参数
StartStart location of the shape
EndEnd location of the shape
ObjectQueryParamsList of object types it's looking for
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if any hit is found

◆ SweepTestByProfile()

bool UWorld::SweepTestByProfile ( const FVector &  Start,
const FVector &  End,
const FQuat &  Rot,
FName  ProfileName,
const FCollisionShape &  CollisionShape,
const FCollisionQueryParams &  Params 
) const

Sweep a shape against the world using a specific profile and return if a blocking hit is found.

参数
StartStart location of the shape
EndEnd location of the shape
ProfileNameThe 'profile' used to determine which components to hit
CollisionShapeCollisionShape - supports Box, Sphere, Capsule
ParamsAdditional parameters used for the trace
返回
TRUE if a blocking hit is found

◆ Tick()

void UWorld::Tick ( ELevelTick  TickType,
float  DeltaSeconds 
)

Update the level after a variable amount of time, DeltaSeconds, has passed.

All child actors are ticked after their owners have been ticked.

◆ TransferBlueprintDebugReferences()

void UWorld::TransferBlueprintDebugReferences ( UWorld *  NewWorld)

Transfers the set of Kismet / Blueprint objects being debugged to the new world that are not already present, and updates blueprints accordingly

参数
NewWorldThe new world to find equivalent objects in

◆ UpdateConstraintActors()

virtual void UWorld::UpdateConstraintActors ( )
virtual

Updates all physics constraint actor joint locations.


◆ UpdateCullDistanceVolumes()

bool UWorld::UpdateCullDistanceVolumes ( AActor *  ActorToUpdate = nullptr,
UPrimitiveComponent *  ComponentToUpdate = nullptr 
)

Updates cull distance volumes for a specified component or a specified actor or all actors

参数
ComponentToUpdateIf specified just that Component will be updated
ActorToUpdateIf specified (and ComponentToUpdate is not specified), all Components owned by this Actor will be updated
返回
True if the passed in actors or components were within a volume

◆ UpdateWorldComponents()

void UWorld::UpdateWorldComponents ( bool  bRerunConstructionScripts,
bool  bCurrentLevelOnly,
FRegisterComponentContext *  Context = nullptr 
)

Updates world components like e.g.

line batcher and all level components.

参数
bRerunConstructionScriptsIf we should rerun construction scripts on actors
bCurrentLevelOnlyIf true, affect only the current level.

类成员变量说明

◆ bShouldSimulatePhysics

uint8 UWorld::bShouldSimulatePhysics

If true this world will tick physics to simulate.

This isn't same as having Physics Scene. You need Physics Scene if you'd like to trace. This flag changed ticking

◆ DeltaTimeSeconds

float UWorld::DeltaTimeSeconds

Frame delta time in seconds adjusted by e.g.

time dilation.

◆ FXSystem

class FFXSystemInterface* UWorld::FXSystem

Interface to the FX system managing particles and related effects for this world.


◆ LastTimeUnbuiltLightingWasEncountered

double UWorld::LastTimeUnbuiltLightingWasEncountered

Time in FPlatformTime::Seconds unbuilt time was last encountered.

0 means not yet.

◆ NextSwitchCountdown

float UWorld::NextSwitchCountdown

Amount of time to wait before traveling to next map, gives clients time to receive final RPCs

参见
ServerTravelPause

◆ NumLightingUnbuiltObjects

uint32 UWorld::NumLightingUnbuiltObjects

This is a int on the level which is set when a light that needs to have lighting rebuilt is moved.

This is then checked in CheckMap for errors to let you know that this level should have lighting rebuilt.

◆ NumTextureStreamingDirtyResources

int32 UWorld::NumTextureStreamingDirtyResources

Num of resources that have changed since the last texture streaming build.

Updated in map check.

◆ NumTextureStreamingUnbuiltComponents

int32 UWorld::NumTextureStreamingUnbuiltComponents

Num of components missing valid texture streaming data.

Updated in map check.

◆ OriginOffsetThisFrame

FVector UWorld::OriginOffsetThisFrame

World origin offset value.

Non-zero only for a single frame when origin is rebased

◆ PostProcessVolumes

TArray< IInterface_PostProcessVolume * > UWorld::PostProcessVolumes

An array of post processing volumes, sorted in ascending order of priority.


◆ URL

FURL UWorld::URL

The URL that was used when loading this World.


◆ WorldType

TEnumAsByte<EWorldType::Type> UWorld::WorldType

The type of world this is.

Describes the context in which it is being used (Editor, Game, Preview etc.)

◆ WorldTypePreLoadMap

TMap<FName, EWorldType::Type> UWorld::WorldTypePreLoadMap
static

A static map that is populated before loading a world from a package.

This is so UWorld can look up its WorldType in PostLoad


该类的文档由以下文件生成: