engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
APlayerController类 参考

PlayerControllers are used by human players to control Pawns. 更多...

#include <PlayerController.h>

+ 类 APlayerController 继承关系图:

Public 成员函数

virtual void AcknowledgePossession (class APawn *P)
 Returns true if input should be frozen (whether UnFreeze timer is active)
 
virtual void ActivateTouchInterface (class UTouchInterface *NewTouchInterface)
 Activates a new touch interface for this player controller
 
virtual void AddCheats (bool bForce=false)
 Notifies the server that the client has ticked gameplay code, and should no longer get the extended "still loading" timeout grace period
 
virtual void AddPitchInput (float Val)
 Add Pitch (look up) input. 更多...
 
virtual void AddRollInput (float Val)
 Add Roll input. 更多...
 
virtual void AddYawInput (float Val)
 Add Yaw (turn) input. 更多...
 
 APlayerController (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 Default Constructor
 
virtual void AutoManageActiveCameraTarget (AActor *SuggestedTarget)
 If bAutoManageActiveCameraTarget is true, then automatically manage the active camera target. 更多...
 
virtual void BeginInactiveState () override
 State entered when inactive (no possessed pawn, not spectating, etc).
 
void BuildHiddenComponentList (const FVector &ViewLocation, TSet< FPrimitiveComponentId > &HiddenComponentsOut)
 Builds a list of components that are hidden based upon gameplay. 更多...
 
virtual void CalcCamera (float DeltaTime, struct FMinimalViewInfo &OutResult) override
 Calculate camera view point, when viewing this actor. 更多...
 
virtual void Camera (FName NewMode)
 Change Camera mode 更多...
 
virtual bool CanRestartPlayer ()
 Returns true if this controller thinks it's able to restart. 更多...
 
virtual void ChangeState (FName NewState) override
 Change the current state to named state
 
virtual void CleanUpAudioComponents ()
 Clears out 'left-over' audio components.
 
virtual void CleanupGameViewport ()
 Gives the PlayerController an opportunity to cleanup any changes it applied to the game viewport, primarily for the touch interface
 
virtual void CleanupPlayerState () override
 Called from Destroyed(). 更多...
 
void ClearAudioListenerOverride ()
 Clear any overrides that have been applied to audio listener
 
void ClientAddTextureStreamingLoc (FVector InLoc, float Duration, bool bOverrideLocation)
 Adds a location to the texture streaming system for the specified duration.
 
void ClientCancelPendingMapChange ()
 Tells client to cancel any pending map change.
 
void ClientCapBandwidth (int32 Cap)
 Set CurrentNetSpeed to the lower of its current value and Cap.
 
virtual void ClientClearCameraLensEffects ()
 Removes all Camera Lens Effects.
 
void ClientCommitMapChange ()
 Actually performs the level transition prepared by PrepareMapChange().
 
virtual void ClientEnableNetworkVoice (bool bEnable)
 Tell the client to enable or disable voice chat (not muting) 更多...
 
void ClientEndOnlineSession ()
 Notify client that the session is about to start
 
void ClientFlushLevelStreaming ()
 Tells the client to block until all pending level streaming actions are complete happens at the end of the tick primarily used to force update the client ASAP at join time
 
void ClientForceGarbageCollection ()
 Forces GC at the end of the tick on the client
 
void ClientGameEnded (class AActor *EndGameFocus, bool bIsWinner)
 Replicated function called by GameHasEnded(). 更多...
 
void ClientGotoState (FName NewState)
 Server uses this to force client into NewState . 更多...
 
void ClientIgnoreLookInput (bool bIgnore)
 Calls IgnoreLookInput on client
 
void ClientIgnoreMoveInput (bool bIgnore)
 Calls IgnoreMoveInput on client
 
void ClientMessage (const FString &S, FName Type=NAME_None, float MsgLifeTime=0.f)
 Outputs a message to HUD 更多...
 
virtual void ClientMutePlayer (FUniqueNetIdRepl PlayerId)
 Tell the client to mute a player for this controller 更多...
 
void ClientPlayCameraAnim (class UCameraAnim *AnimToPlay, float Scale=1.f, float Rate=1.f, float BlendInTime=0.f, float BlendOutTime=0.f, bool bLoop=false, bool bRandomStartTime=false, ECameraShakePlaySpace Space=ECameraShakePlaySpace::CameraLocal, FRotator CustomPlaySpace=FRotator::ZeroRotator)
 Play the indicated CameraAnim on this camera. 更多...
 
void ClientPlayCameraShake (TSubclassOf< class UCameraShakeBase > Shake, float Scale=1.f, ECameraShakePlaySpace PlaySpace=ECameraShakePlaySpace::CameraLocal, FRotator UserPlaySpaceRot=FRotator::ZeroRotator)
 Backwards compatible method, for C++ code
 
void ClientPlayCameraShakeFromSource (TSubclassOf< class UCameraShakeBase > Shake, class UCameraShakeSourceComponent *SourceComponent)
 Backwards compatible method, for C++ code
 
void ClientPlayForceFeedback (class UForceFeedbackEffect *ForceFeedbackEffect, FForceFeedbackParameters Params=FForceFeedbackParameters())
 Play a force feedback pattern on the player's controller 更多...
 
void ClientPlaySound (class USoundBase *Sound, float VolumeMultiplier=1.f, float PitchMultiplier=1.f)
 Play sound client-side (so only the client will hear it) 更多...
 
void ClientPlaySoundAtLocation (class USoundBase *Sound, FVector Location, float VolumeMultiplier=1.f, float PitchMultiplier=1.f)
 Play sound client-side at the specified location 更多...
 
void ClientPrepareMapChange (FName LevelName, bool bFirst, bool bLast)
 Asynchronously loads the given level in preparation for a streaming map transition. 更多...
 
void ClientPrestreamTextures (class AActor *ForcedActor, float ForceDuration, bool bEnableStreaming, int32 CinematicTextureGroups=0)
 Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified actor. 更多...
 
void ClientReceiveLocalizedMessage (TSubclassOf< ULocalMessage > Message, int32 Switch=0, class APlayerState *RelatedPlayerState_1=nullptr, class APlayerState *RelatedPlayerState_2=nullptr, class UObject *OptionalObject=nullptr)
 send client localized message id
 
virtual void ClientRepObjRef (UObject *Object)
 Development RPC for testing object reference replication
 
void ClientReset ()
 Tell client to reset the PlayerController
 
void ClientRestart (class APawn *NewPawn)
 Tell client to restart the level
 
void ClientRetryClientRestart (class APawn *NewPawn)
 Assign Pawn to player, but avoid calling ClientRestart if we have already accepted this pawn
 
virtual void ClientReturnToMainMenu (const FString &ReturnReason)
 Return the client to the main menu gracefully
 
virtual void ClientReturnToMainMenuWithTextReason (const FText &ReturnReason)
 Return the client to the main menu gracefully
 
void ClientSetBlockOnAsyncLoading ()
 Tells the client to block until all pending level streaming actions are complete. 更多...
 
void ClientSetCameraFade (bool bEnableFading, FColor FadeColor=FColor(ForceInit), FVector2D FadeAlpha=FVector2D(-1.0f, 0.0f), float FadeTime=0, bool bFadeAudio=false, bool bHoldWhenFinished=false)
 Tell client to fade camera @Param bEnableFading - true if we should apply FadeColor/FadeAmount to the screen @Param FadeColor - Color to fade to @Param FadeAlpha - Contains the start fade (X) and end fade (Y) values to apply. 更多...
 
void ClientSetCameraMode (FName NewCamMode)
 Replicated function to set camera style on client 更多...
 
void ClientSetCinematicMode (bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning, bool bAffectsHUD)
 Called by the server to synchronize cinematic transitions with the client
 
void ClientSetForceMipLevelsToBeResident (class UMaterialInterface *Material, float ForceDuration, int32 CinematicTextureGroups=0)
 Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified material. 更多...
 
void ClientSetHUD (TSubclassOf< AHUD > NewHUDClass)
 Set the client's class of HUD and spawns a new instance of it. 更多...
 
void ClientSetSpectatorWaiting (bool bWaiting)
 Indicate that the Spectator is waiting to join/respawn.
 
void ClientSetViewTarget (class AActor *A, struct FViewTargetTransitionParams TransitionParams=FViewTargetTransitionParams())
 Set the view target 更多...
 
void ClientSpawnCameraLensEffect (TSubclassOf< class AEmitterCameraLensEffectBase > LensEffectEmitterClass)
 Spawn a camera lens effect (e.g. 更多...
 
void ClientStartCameraShake (TSubclassOf< class UCameraShakeBase > Shake, float Scale=1.f, ECameraShakePlaySpace PlaySpace=ECameraShakePlaySpace::CameraLocal, FRotator UserPlaySpaceRot=FRotator::ZeroRotator)
 Play Camera Shake 更多...
 
void ClientStartCameraShakeFromSource (TSubclassOf< class UCameraShakeBase > Shake, class UCameraShakeSourceComponent *SourceComponent)
 Play Camera Shake localized to a given source 更多...
 
void ClientStartOnlineSession ()
 Notify client that the session is starting
 
void ClientStopCameraAnim (class UCameraAnim *AnimToStop)
 Stop camera animation on client.
 
void ClientStopCameraShake (TSubclassOf< class UCameraShakeBase > Shake, bool bImmediately=true)
 Stop camera shake on client. 更多...
 
void ClientStopCameraShakesFromSource (class UCameraShakeSourceComponent *SourceComponent, bool bImmediately=true)
 Stop camera shake on client. 更多...
 
void ClientStopForceFeedback (class UForceFeedbackEffect *ForceFeedbackEffect, FName Tag)
 Stops a playing force feedback pattern 更多...
 
void ClientTeamMessage (class APlayerState *SenderPlayerState, const FString &S, FName Type, float MsgLifeTime=0)
 
void ClientTravel (const FString &URL, enum ETravelType TravelType, bool bSeamless=false, FGuid MapPackageGuid=FGuid())
 Travel to a different map or IP address. 更多...
 
void ClientTravelInternal (const FString &URL, enum ETravelType TravelType, bool bSeamless=false, FGuid MapPackageGuid=FGuid())
 Internal clientside implementation of ClientTravel - use ClientTravel to call this 更多...
 
virtual void ClientUnmutePlayer (FUniqueNetIdRepl PlayerId)
 Tell the client to unmute a player for this controller 更多...
 
void ClientUpdateLevelStreamingStatus (FName PackageName, bool bNewShouldBeLoaded, bool bNewShouldBeVisible, bool bNewShouldBlockOnLoad, int32 LODIndex)
 Replicated Update streaming status 更多...
 
void ClientUpdateMultipleLevelsStreamingStatus (const TArray< FUpdateLevelStreamingLevelStatus > &LevelStatuses)
 Replicated Update streaming status. 更多...
 
virtual void ClientVoiceHandshakeComplete ()
 Tells the client that the server has all the information it needs and that it is ok to start sending voice packets. 更多...
 
void ClientWasKicked (const FText &KickReason)
 Notify client they were kicked from the server
 
virtual FString ConsoleCommand (const FString &Command, bool bWriteToLog=true)
 Executes the Exec() command on the UPlayer object 更多...
 
virtual void ConsoleKey (FKey Key)
 Console control commands, useful when remote debugging so you can't touch the console the normal way
 
virtual void CreateTouchInterface ()
 Create the touch interface, and activate an initial touch interface (if touch interface is desired)
 
virtual bool DefaultCanUnpause ()
 Default implementation of pausing check for 'CanUnpause' delegates 更多...
 
virtual void DelayedPrepareMapChange ()
 Used to wait until a map change can be prepared when one was already in progress
 
bool DeprojectMousePositionToWorld (FVector &WorldLocation, FVector &WorldDirection) const
 Convert current mouse 2D position to World Space 3D position and direction. 更多...
 
bool DeprojectScreenPositionToWorld (float ScreenX, float ScreenY, FVector &WorldLocation, FVector &WorldDirection) const
 Convert 2D screen position to World Space 3D position and direction. 更多...
 
virtual void Destroyed () override
 Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending
 
virtual bool DestroyNetworkActorHandled () override
 Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first 更多...
 
virtual void DisableInput (class APlayerController *PlayerController) override
 Removes this actor from the stack of input being handled by a PlayerController. 更多...
 
virtual void EnableCheats ()
 Enables cheats within the game
 
virtual void EnableInput (class APlayerController *PlayerController) override
 Pushes this actor on to the stack of input being handled by a PlayerController. 更多...
 
virtual void EndInactiveState () override
 Called when leaving the inactive state
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason) override
 Overridable function called whenever this actor is being removed from a level
 
virtual void FailedToSpawnPawn () override
 GameMode failed to spawn pawn for me.
 
virtual void FellOutOfWorld (const class UDamageType &dmgType) override
 Called when the actor falls out of the world 'safely' (below KillZ and such)
 
virtual void FlushPressedKeys ()
 Flushes the current key state.
 
void ForceSingleNetUpdateFor (class AActor *Target)
 forces a full replication check of the specified Actor on only the client that owns this PlayerController this function has no effect if this PC is not a remote client or if the Actor is not relevant to that client
 
virtual void FOV (float NewFOV)
 Set the field of view to NewFOV
 
virtual void GameHasEnded (class AActor *EndGameFocus=nullptr, bool bIsWinner=false) override
 Called from game mode upon end of the game, used to transition to proper state. 更多...
 
void GameplayMutePlayer (const FUniqueNetIdRepl &PlayerNetId)
 Mutes a remote player on the server and then tells the client to mute 更多...
 
void GameplayUnmutePlayer (const FUniqueNetIdRepl &PlayerNetId)
 Unmutes a remote player on the server and then tells the client to unmute 更多...
 
virtual void GetActorEyesViewPoint (FVector &Location, FRotator &Rotation) const override
 Returns the point of view of the actor. 更多...
 
virtual bool GetAudioListenerAttenuationOverridePosition (FVector &OutLocation) const
 Gets the attenuation position override.
 
virtual void GetAudioListenerPosition (FVector &OutLocation, FVector &OutFrontDir, FVector &OutRightDir) const
 get audio listener position and orientation
 
UInterpTrackInstDirector * GetControllingDirector ()
 Returns the Matinee director track that's currently possessing this player controller, or nullptr for none
 
virtual FVector GetFocalLocation () const
 Returns the location the PlayerController is focused on. 更多...
 
bool GetHitResultAtScreenPosition (const FVector2D ScreenPosition, const ECollisionChannel TraceChannel, const FCollisionQueryParams &CollisionQueryParams, FHitResult &HitResult) const
 Returns hit results from doing a collision query at a certain location on the screen
 
bool GetHitResultUnderCursorByChannel (ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult &HitResult) const
 Performs a collision query under the mouse cursor, looking on a trace channel
 
bool GetHitResultUnderCursorForObjects (const TArray< TEnumAsByte< EObjectTypeQuery > > &ObjectTypes, bool bTraceComplex, FHitResult &HitResult) const
 Performs a collision query under the mouse cursor, looking for object types
 
bool GetHitResultUnderFingerByChannel (ETouchIndex::Type FingerIndex, ETraceTypeQuery TraceChannel, bool bTraceComplex, FHitResult &HitResult) const
 Performs a collision query under the finger, looking on a trace channel
 
bool GetHitResultUnderFingerForObjects (ETouchIndex::Type FingerIndex, const TArray< TEnumAsByte< EObjectTypeQuery > > &ObjectTypes, bool bTraceComplex, FHitResult &HitResult) const
 Performs a collision query under the finger, looking for object types
 
AHUD * GetHUD () const
 Gets the HUD currently being used by this player controller
 
template<class T >
T * GetHUD () const
 Templated version of GetHUD, will return nullptr if cast fails
 
float GetInputAnalogKeyState (FKey Key) const
 Returns the analog value for the given key/button. 更多...
 
void GetInputAnalogStickState (EControllerAnalogStick::Type WhichStick, float &StickX, float &StickY) const
 Retrieves the X and Y displacement of the given analog stick.
 
float GetInputKeyTimeDown (FKey Key) const
 Returns how long the given key/button has been down. 更多...
 
void GetInputMotionState (FVector &Tilt, FVector &RotationRate, FVector &Gravity, FVector &Acceleration) const
 Retrieves the current motion state of the player's input device
 
void GetInputMouseDelta (float &DeltaX, float &DeltaY) const
 Retrieves how far the mouse moved this frame.
 
void GetInputTouchState (ETouchIndex::Type FingerIndex, float &LocationX, float &LocationY, bool &bIsCurrentlyPressed) const
 Retrieves the X and Y screen coordinates of the specified touch key. 更多...
 
FVector GetInputVectorKeyState (FKey Key) const
 Returns the vector value for the given key/button.
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties
 
class ULocalPlayer * GetLocalPlayer () const
 Returns the ULocalPlayer for this controller if it exists, or null otherwise
 
virtual float GetMinRespawnDelay ()
 Calculate minimal respawn delay
 
virtual EMouseCursor::Type GetMouseCursor () const
 Returns the current mouse cursor, or None
 
bool GetMousePosition (float &LocationX, float &LocationY) const
 Retrieves the X and Y screen coordinates of the mouse cursor. 更多...
 
virtual class UNetConnection * GetNetConnection () const override
 Get the owning connection used for communicating between client/server 更多...
 
virtual const AActor * GetNetOwner () const override
 Return the actor responsible for replication, if any. 更多...
 
virtual class UPlayer * GetNetOwningPlayer () override
 Return the owning UPlayer (if any) of this actor. 更多...
 
virtual float GetNetPriority (const FVector &ViewPos, const FVector &ViewDir, AActor *Viewer, AActor *ViewTarget, UActorChannel *InChannel, float Time, bool bLowBandwidth) override
 Function used to prioritize actors when deciding which to replicate 更多...
 
virtual class APlayerState * GetNextViewablePlayer (int32 dir)
 Get next active viewable player in PlayerArray. 更多...
 
APawn * GetPawnOrSpectator () const
 Returns the first of GetPawn() or GetSpectatorPawn() that is not nullptr, or nullptr otherwise.
 
virtual class APlayerController * GetPlayerControllerForMuting (const FUniqueNetIdRepl &PlayerNetId)
 Get a remote player controller on the server for muting 更多...
 
FString GetPlayerNetworkAddress ()
 Get the local players network address 更多...
 
virtual void GetPlayerViewPoint (FVector &out_Location, FRotator &out_Rotation) const override
 Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint 更多...
 
virtual void GetSeamlessTravelActorList (bool bToEntry, TArray< class AActor * > &ActorList)
 Called on client during seamless level transitions to get the list of Actors that should be moved into the new level PlayerControllers, Role < ROLE_Authority Actors, and any non-Actors that are inside an Actor that is in the list (i.e. 更多...
 
FString GetServerNetworkAddress ()
 Get the server network address 更多...
 
FVector GetSpawnLocation () const
 Get the location used when initially created, or when changing states when there is no pawn or spectator.
 
ASpectatorPawn * GetSpectatorPawn () const
 Get the Pawn used when spectating. 更多...
 
class APlayerState * GetSplitscreenPlayerByIndex (int32 PlayerIndex=1) const
 Returns the PlayerState associated with the player at the specified index. 更多...
 
int32 GetSplitscreenPlayerCount () const
 Returns the number of split-screen players playing on this player's machine. 更多...
 
void GetViewportSize (int32 &SizeX, int32 &SizeY) const
 Helper to get the size of the HUD canvas for this player controller. 更多...
 
virtual class AActor * GetViewTarget () const override
 Get the actor the controller is looking at
 
bool HasClientLoadedCurrentWorld ()
 returns whether the client has completely loaded the server's current world (valid on server only)
 
virtual void InitInputSystem ()
 Spawn the appropriate class of PlayerInput. 更多...
 
virtual bool InputAxis (FKey Key, float Delta, float DeltaTime, int32 NumSamples, bool bGamepad)
 Handles a controller axis input
 
virtual bool InputKey (FKey Key, EInputEvent EventType, float AmountDepressed, bool bGamepad)
 Handles a key press
 
virtual bool InputMotion (const FVector &Tilt, const FVector &RotationRate, const FVector &Gravity, const FVector &Acceleration)
 Handles motion control
 
virtual bool InputTouch (uint32 Handle, ETouchType::Type Type, const FVector2D &TouchLocation, float Force, FDateTime DeviceTimestamp, uint32 TouchpadIndex)
 Handles a touch screen action
 
virtual bool IsFrozen ()
 Returns true if input should be frozen (whether UnFreeze timer is active)
 
bool IsInputKeyDown (FKey Key) const
 Returns true if the given key/button is pressed on the input of the controller (if present)
 
virtual bool IsLocalController () const override
 Returns whether this Controller is a local controller. 更多...
 
virtual bool IsNetRelevantFor (const AActor *RealViewer, const AActor *ViewTarget, const FVector &SrcLocation) const override
 Checks to see if this actor is relevant for a specific network connection 更多...
 
bool IsPaused () const
 Returns true if game is currently paused.
 
virtual bool IsPlayerMuted (const class FUniqueNetId &PlayerId)
 Is the specified player muted by this controlling player for any reason (gameplay, system, etc), check voice interface IsMuted() for system mutes 更多...
 
bool IsPrimaryPlayer () const
 Wrapper for determining whether this player is the first player on their console. 更多...
 
bool IsSplitscreenPlayer (int32 *OutSplitscreenPlayerIndex=nullptr) const
 Determines whether this player is playing split-screen. 更多...
 
void K2_ClientPlayForceFeedback (class UForceFeedbackEffect *ForceFeedbackEffect, FName Tag, bool bLooping, bool bIgnoreTimeDilation, bool bPlayWhilePaused)
 Play a force feedback pattern on the player's controller 更多...
 
void LevelStreamingStatusChanged (class ULevelStreaming *LevelObject, bool bNewShouldBeLoaded, bool bNewShouldBeVisible, bool bNewShouldBlockOnLoad, int32 LODIndex)
 Notify player of change to level
 
virtual void LocalTravel (const FString &URL)
 Causes the client to travel to the given URL
 
FName NetworkRemapPath (FName InPackageName, bool bReading)
 Handles remapping a package name for networking, call on both the client and server when sending package names manually for RPCs
 
virtual void NotifyActorChannelFailure (UActorChannel *ActorChan)
 Called on the server when the client sends a message indicating it was unable to initialize an Actor channel, most commonly because the desired Actor's archetype couldn't be serialized the default is to do nothing (Actor simply won't exist on the client), but this function gives the game code an opportunity to try to correct the problem
 
virtual void NotifyDirectorControl (bool bNowControlling, class AMatineeActor *CurrentMatinee)
 Notification when a matinee director track starts or stops controlling the ViewTarget of this PlayerController
 
virtual void NotifyLoadedWorld (FName WorldPackageName, bool bFinalDest)
 Called to notify the server when the client has loaded a new world via seamless traveling 更多...
 
virtual bool NotifyServerReceivedClientData (APawn *InPawn, float TimeStamp)
 Notify the server that client data was received on the Pawn. 更多...
 
virtual void OnActorChannelOpen (class FInBunch &InBunch, class UNetConnection *Connection) override
 Allows for a specific response from the actor when the actor channel is opened (client side) 更多...
 
virtual void OnNetCleanup (class UNetConnection *Connection) override
 Handles cleaning up the associated Actor when killing the connection 更多...
 
virtual void OnSerializeNewActor (class FOutBunch &OutBunch) override
 SerializeNewActor has just been called on the actor before network replication (server side) 更多...
 
void OnServerStartedVisualLogger (bool bIsLogging)
 Notify from server that Visual Logger is recording, to show that information on client about possible performance issues
 
virtual void Pause ()
 Command to try to pause the game.
 
virtual void PawnLeavingGame ()
 Clean up when a Pawn's player is leaving a game. 更多...
 
FDynamicForceFeedbackHandle PlayDynamicForceFeedback (float Intensity, float Duration, bool bAffectsLeftLarge, bool bAffectsLeftSmall, bool bAffectsRightLarge, bool bAffectsRightSmall, EDynamicForceFeedbackAction::Type Action=EDynamicForceFeedbackAction::Start, FDynamicForceFeedbackHandle ActionHandle=0)
 Allows playing of a dynamic force feedback event from native code Begins playing when Start is called. 更多...
 
virtual void PlayerTick (float DeltaTime)
 Processes player input (immediately after PlayerInput gets ticked) and calls UpdateRotation(). 更多...
 
void PlayHapticEffect (class UHapticFeedbackEffect_Base *HapticEffect, EControllerHand Hand, float Scale=1.f, bool bLoop=false)
 Play a haptic feedback curve on the player's controller 更多...
 
virtual bool PopInputComponent (UInputComponent *Input)
 Removes given inputcomponent from the input stack (regardless of if it's the top, actually).
 
virtual void PostInitializeComponents () override
 Overridden to create the player replication info and perform other mundane initialization tasks.
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostProcessInput (const float DeltaTime, const bool bGamePaused)
 Method called after processing input
 
virtual bool PostProcessWorldToScreen (FVector WorldLocation, FVector2D &ScreenLocation, bool bPlayerViewportRelative) const
 After successful world to screen projection, allows custom post-processing of the resulting ScreenLocation. 更多...
 
virtual void PostSeamlessTravel ()
 Called after this player controller has transitioned through seamless travel, but before that player is initialized This is called both when a new player controller is created, and when it is maintained
 
virtual void PreClientTravel (const FString &PendingURL, ETravelType TravelType, bool bIsSeamlessTravel)
 Called when the local player is about to travel to a new map or IP address. 更多...
 
virtual void PreProcessInput (const float DeltaTime, const bool bGamePaused)
 Method called prior to processing input
 
bool ProjectWorldLocationToScreen (FVector WorldLocation, FVector2D &ScreenLocation, bool bPlayerViewportRelative=false) const
 Convert a World Space 3D position into a 2D Screen Space position. 更多...
 
bool ProjectWorldLocationToScreenWithDistance (FVector WorldLocation, FVector &ScreenLocation, bool bPlayerViewportRelative=false) const
 Convert a World Space 3D position into a 3D Screen Space position. 更多...
 
virtual void PushInputComponent (UInputComponent *Input)
 Adds an inputcomponent to the top of the input stack.
 
virtual void ReceivedGameModeClass (TSubclassOf< class AGameModeBase > GameModeClass)
 This function will be called to notify the player controller that the world has received its game class. 更多...
 
virtual void ReceivedPlayer ()
 Called after this PlayerController's viewport/net connection is associated with this player controller.
 
virtual void ReceivedSpectatorClass (TSubclassOf< ASpectatorPawn > SpectatorClass)
 Called to notify the controller that the spectator class has been received.
 
virtual void Reset () override
 Reset actor to initial state - used when restarting level without reloading.
 
virtual void ResetCameraMode ()
 Reset Camera Mode to default.
 
void ResetControllerLightColor ()
 Resets the light color of the player's controller to default
 
virtual void ResetIgnoreInputFlags () override
 Reset move and look input ignore flags to defaults
 
virtual void RestartLevel ()
 Restarts the current level
 
virtual void SafeRetryClientRestart ()
 Call ClientRetryClientRestart, but only if the current pawn is not the currently acknowledged pawn (and throttled to avoid saturating the network).
 
virtual void SafeServerCheckClientPossession ()
 Call ServerCheckClientPossession on the server, but only if the current pawn is not the acknowledged pawn (and throttled to avoid saturating the network).
 
void SafeServerUpdateSpectatorState ()
 Calls ServerSetSpectatorLocation but throttles it to reduce bandwidth and only calls it when necessary.
 
virtual void SeamlessTravelFrom (class APlayerController *OldPC)
 Called when seamless traveling and the specified PC is being replaced by this one copy over data that should persist (not called if PlayerController is the same for the from and to GameModes)
 
virtual void SeamlessTravelTo (class APlayerController *NewPC)
 Called when seamless traveling and we are being replaced by the specified PC clean up any persistent state (post process chains on LocalPlayers, for example) (not called if PlayerController is the same for the from and to GameModes)
 
virtual void SendClientAdjustment ()
 Called on server at end of tick, to let client Pawns handle updates from the server. 更多...
 
virtual void SendToConsole (const FString &Command)
 Sends a command to the console to execute if not shipping version
 
void ServerAcknowledgePossession (class APawn *P)
 acknowledge possession of pawn
 
void ServerCamera (FName NewMode)
 change mode of camera
 
void ServerChangeName (const FString &S)
 Change name of server
 
void ServerCheckClientPossession ()
 Tells the server to make sure the possessed pawn is in sync with the client.
 
void ServerCheckClientPossessionReliable ()
 Reliable version of ServerCheckClientPossession to be used when there is no likely danger of spamming the network.
 
void ServerExec (const FString &Msg)
 Executes command on server (non shipping builds only)
 
void ServerExecRPC (const FString &Msg)
 RPC used by ServerExec. 更多...
 
virtual void ServerMutePlayer (FUniqueNetIdRepl PlayerId)
 Tell the server to mute a player for this controller 更多...
 
void ServerNotifyLoadedWorld (FName WorldPackageName)
 Called to notify the server when the client has loaded a new world via seamless traveling 更多...
 
void ServerPause ()
 Replicate pause request to the server
 
void ServerRestartPlayer ()
 Attempts to restart this player, generally called from the client upon respawn request.
 
void ServerSetSpectatorLocation (FVector NewLoc, FRotator NewRot)
 When spectating, updates spectator location/rotation and pings the server to make sure spectating should continue.
 
void ServerSetSpectatorWaiting (bool bWaiting)
 Indicate that the Spectator is waiting to join/respawn.
 
void ServerShortTimeout ()
 Notifies the server that the client has ticked gameplay code, and should no longer get the extended "still loading" timeout grace period
 
void ServerToggleAILogging ()
 Used by UGameplayDebuggingControllerComponent to replicate messages for AI debugging in network games.
 
virtual void ServerUnmutePlayer (FUniqueNetIdRepl PlayerId)
 Tell the server to unmute a player for this controller 更多...
 
void ServerUpdateCamera (FVector_NetQuantize CamLoc, int32 CamPitchAndYaw)
 If PlayerCamera.bUseClientSideCameraUpdates is set, client will replicate camera positions to the server.
 
void ServerUpdateLevelVisibility (const FUpdateLevelVisibilityLevelInfo &LevelVisibility)
 Called when the client adds/removes a streamed level. 更多...
 
void ServerUpdateMultipleLevelsVisibility (const TArray< FUpdateLevelVisibilityLevelInfo > &LevelVisibilities)
 Called when the client adds/removes a streamed level. 更多...
 
void ServerVerifyViewTarget ()
 Used by client to request server to confirm current viewtarget (server will respond with ClientSetViewTarget() ).
 
void ServerViewNextPlayer ()
 Move camera to next player on round ended or spectating
 
void ServerViewPrevPlayer ()
 Move camera to previous player on round ended or spectating
 
void ServerViewSelf (struct FViewTargetTransitionParams TransitionParams=FViewTargetTransitionParams())
 Move camera to current user
 
void SetAsLocalPlayerController ()
 Designate this player controller as local (public for GameModeBase to use, not expected to be called anywhere else)
 
void SetAudioListenerOverride (USceneComponent *AttachToComponent, FVector Location, FRotator Rotation)
 Used to override the default positioning of the audio listener 更多...
 
virtual void SetCameraMode (FName NewCamMode)
 Set new camera mode
 
virtual void SetCinematicMode (bool bInCinematicMode, bool bAffectsMovement, bool bAffectsTurning)
 Adjust input based on cinematic mode 更多...
 
virtual void SetCinematicMode (bool bInCinematicMode, bool bHidePlayer, bool bAffectsHUD, bool bAffectsMovement, bool bAffectsTurning)
 Server/SP only function for changing whether the player is in cinematic mode. 更多...
 
void SetControllerLightColor (FColor Color)
 Sets the light color of the player's controller 更多...
 
void SetControllingDirector (UInterpTrackInstDirector *NewControllingDirector, bool bClientSimulatingViewTarget)
 Sets the Matinee director track instance that's currently possessing this player controller 更多...
 
virtual void SetDisableHaptics (bool bNewDisabled)
 Allows the player controller to disable all haptic requests from being fired, e.g. 更多...
 
void SetHapticsByValue (const float Frequency, const float Amplitude, EControllerHand Hand)
 Sets the value of the haptics for the specified hand directly, using frequency and amplitude. 更多...
 
virtual void SetInitialLocationAndRotation (const FVector &NewLocation, const FRotator &NewRotation) override
 Set the initial location and rotation of the controller, as well as the control rotation. 更多...
 
virtual void SetInputMode (const FInputModeDataBase &InData)
 Setup an input mode.
 
void SetMouseCursorWidget (EMouseCursor::Type Cursor, class UUserWidget *CursorWidget)
 Sets the Widget for the Mouse Cursor to display 更多...
 
void SetMouseLocation (const int X, const int Y)
 Positions the mouse cursor in screen space, in pixels.
 
virtual void SetName (const FString &S)
 Tries to set the player's name to the given name.
 
void SetNetSpeed (int32 NewSpeed)
 Store the net speed 更多...
 
virtual bool SetPause (bool bPause, FCanUnpause CanUnpauseDelegate=FCanUnpause())
 Locally try to pause game (call serverpause to pause network game); returns success indicator. 更多...
 
virtual void SetPawn (APawn *InPawn) override
 Setter for Pawn. 更多...
 
virtual void SetPlayer (UPlayer *InPlayer)
 Associate a new UPlayer with this PlayerController.
 
virtual void SetViewTarget (class AActor *NewViewTarget, FViewTargetTransitionParams TransitionParams=FViewTargetTransitionParams())
 Set the view target 更多...
 
virtual void SetViewTargetWithBlend (class AActor *NewViewTarget, float BlendTime=0, enum EViewTargetBlendFunction BlendFunc=VTBlend_Linear, float BlendExp=0, bool bLockOutgoing=false)
 Set the view target blending with variable control 更多...
 
virtual void SetVirtualJoystickVisibility (bool bVisible)
 Set the virtual joystick visibility.
 
bool ShouldPerformFullTickWhenPaused () const
 Returns true if we fully tick when paused (and if our tick function is enabled when paused). 更多...
 
virtual bool ShouldShowMouseCursor () const
 Returns true if the mouse cursor should be shown
 
virtual void SmoothTargetViewRotation (APawn *TargetPawn, float DeltaSeconds)
 Called client-side to smoothly interpolate received TargetViewRotation (result is in BlendedTargetViewRotation) 更多...
 
virtual void SpawnDefaultHUD ()
 Spawn a HUD (make sure that PlayerController always has valid HUD, even if ClientSetHUD() hasn't been called
 
virtual void SpawnPlayerCameraManager ()
 spawn cameras for servers and owning players
 
virtual void StartFire (uint8 FireModeNum=0)
 Fire the player's currently selected weapon with the optional firemode.
 
virtual void StartSpectatingOnly ()
 Start spectating mode, as the only mode allowed.
 
void StartTalking ()
 Enable voice chat transmission
 
void StopHapticEffect (EControllerHand Hand)
 Stops a playing haptic feedback curve 更多...
 
void StopTalking ()
 Disable voice chat transmission
 
virtual void SwitchLevel (const FString &URL)
 SwitchLevel to the given MapURL.
 
virtual void TickActor (float DeltaTime, enum ELevelTick TickType, FActorTickFunction &ThisTickFunction) override
 Dispatches the once-per frame Tick() function for this actor 更多...
 
virtual void ToggleSpeaking (bool bInSpeaking)
 Toggle voice chat on and off 更多...
 
virtual void UnFreeze ()
 Timer used by RoundEnded and Inactive states to accept player input again
 
virtual void UpdateCameraManager (float DeltaSeconds)
 Update the camera manager; this is called after all actors have been ticked. 更多...
 
virtual void UpdateHiddenActors (const FVector &ViewLocation)
 Builds a list of actors that are hidden based upon gameplay 更多...
 
virtual void UpdateHiddenComponents (const FVector &ViewLocation, TSet< FPrimitiveComponentId > &)
 Builds a list of components that are hidden based upon gameplay 更多...
 
virtual void UpdatePing (float InPing)
 Takes ping updates from the net driver (both clientside and serverside), and passes them on to PlayerState::UpdatePing
 
virtual void UpdateRotation (float DeltaTime)
 Updates the rotation of player, based on ControlRotation after RotationInput has been applied. 更多...
 
virtual bool UseShortConnectTimeout () const override
 Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value 更多...
 
virtual void ViewAPlayer (int32 dir)
 View next active player in PlayerArray. 更多...
 
bool WasInputKeyJustPressed (FKey Key) const
 Returns true if the given key/button was up last frame and down this frame.
 
bool WasInputKeyJustReleased (FKey Key) const
 Returns true if the given key/button was down last frame and up this frame.
 
- Public 成员函数 继承自 AController
 AController (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get())
 Default Constructor
 
class APlayerController * CastToPlayerController ()
 DEPRECATED! Use the standard "Cast To" node instead. 更多...
 
virtual void ChangeState (FName NewState)
 Change the current state to named state
 
virtual void CleanupPlayerState ()
 Called from Destroyed(). 更多...
 
void ClientSetLocation (FVector NewLocation, FRotator NewRotation)
 Replicated function to set the pawn location and rotation, allowing server to force (ex. 更多...
 
void ClientSetRotation (FRotator NewRotation, bool bResetCamera=false)
 Replicated function to set the pawn rotation, allowing the server to force.
 
virtual void CurrentLevelUnloaded ()
 Called when the level this controller is in is unloaded via streaming.
 
virtual void Destroyed () override
 Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending
 
virtual void FailedToSpawnPawn ()
 GameMode failed to spawn pawn for me.
 
virtual void GameHasEnded (class AActor *EndGameFocus=nullptr, bool bIsWinner=false)
 Called from game mode upon end of the game, used to transition to proper state. 更多...
 
virtual void GetActorEyesViewPoint (FVector &out_Location, FRotator &out_Rotation) const override
 Returns the point of view of the actor. 更多...
 
FORCEINLINE ACharacter * GetCharacter () const
 Getter for Character
 
virtual FRotator GetControlRotation () const
 Get the control rotation. 更多...
 
virtual FRotator GetDesiredRotation () const
 Get the desired pawn target rotation
 
virtual FString GetHumanReadableName () const override
 Returns the human readable string representation of an object.
 
virtual void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties
 
FORCEINLINE APawn * GetPawn () const
 Getter for Pawn
 
template<class T >
T * GetPawn () const
 Templated version of GetPawn, will return nullptr if cast fails
 
template<class T >
T * GetPlayerState () const
 
virtual void GetPlayerViewPoint (FVector &Location, FRotator &Rotation) const
 Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint 更多...
 
FName GetStateName () const
 
virtual AActor * GetViewTarget () const
 Get the actor the controller is looking at
 
virtual void InitNavigationControl (UObject *&PathFollowingComp)
 prepares path following component
 
virtual void InitPlayerState ()
 spawns and initializes the PlayerState for this Controller
 
virtual void InstigatedAnyDamage (float Damage, const class UDamageType *DamageType, class AActor *DamagedActor, class AActor *DamageCauser)
 Called when this controller instigates ANY damage
 
bool IsInState (FName InStateName) const
 States (uses FNames for replication, correlated to state flags) 更多...
 
virtual bool IsLocalController () const
 Returns whether this Controller is a local controller. 更多...
 
bool IsLocalPlayerController () const
 Returns whether this Controller is a locally controlled PlayerController. 更多...
 
virtual bool IsLookInputIgnored () const
 Returns true if look input is ignored.
 
virtual bool IsMoveInputIgnored () const
 Returns true if movement input is ignored.
 
bool IsPlayerController () const
 Returns whether this Controller is a PlayerController. 更多...
 
virtual void K2_DestroyActor () override
 Destroy the actor
 
APawn * K2_GetPawn () const
 Return the Pawn that is currently 'controlled' by this PlayerController
 
virtual bool LineOfSightTo (const class AActor *Other, FVector ViewPoint=FVector(ForceInit), bool bAlternateChecks=false) const
 Checks line to center and top of other actor 更多...
 
virtual void OnRep_Pawn ()
 Replication Notification Callbacks
 
virtual void PawnPendingDestroy (APawn *inPawn)
 Called to unpossess our pawn because it is going to be destroyed. 更多...
 
virtual void Possess (APawn *InPawn) final
 Handles attaching this controller to the specified pawn. 更多...
 
virtual void PostInitializeComponents () override
 Overridden to create the player replication info and perform other mundane initialization tasks.
 
virtual void Reset () override
 Reset actor to initial state - used when restarting level without reloading.
 
virtual void ResetIgnoreInputFlags ()
 Reset move and look input ignore flags.
 
virtual void ResetIgnoreLookInput ()
 Stops ignoring look input by resetting the ignore look input state.
 
virtual void ResetIgnoreMoveInput ()
 Stops ignoring move input by resetting the ignore move input state.
 
virtual void SetControlRotation (const FRotator &NewRotation)
 Set the control rotation. 更多...
 
virtual void SetIgnoreLookInput (bool bNewLookInput)
 Locks or unlocks look input, consecutive calls stack up and require the same amount of calls to undo, or can all be undone using ResetIgnoreLookInput. 更多...
 
virtual void SetIgnoreMoveInput (bool bNewMoveInput)
 Locks or unlocks movement input, consecutive calls stack up and require the same amount of calls to undo, or can all be undone using ResetIgnoreMoveInput. 更多...
 
virtual void SetInitialLocationAndRotation (const FVector &NewLocation, const FRotator &NewRotation)
 Set the initial location and rotation of the controller, as well as the control rotation. 更多...
 
virtual void SetPawn (APawn *InPawn)
 Setter for Pawn. 更多...
 
void SetPawnFromRep (APawn *InPawn)
 Calls SetPawn and RepNotify locally
 
virtual void StopMovement ()
 Aborts the move the controller is currently performing
 
virtual void TickActor (float DeltaTime, enum ELevelTick TickType, FActorTickFunction &ThisTickFunction) override
 Dispatches the once-per frame Tick() function for this actor 更多...
 
virtual void UnPossess () final
 Called to unpossess our pawn for any reason that is not the pawn being destroyed (destruction handled by PawnDestroyed()).
 
virtual void UpdateNavigationComponents ()
 If controller has any navigation-related components then this function makes them update their cached data DEPRECATED: this functionality has been taken over by PathFollowingComponent by observing newly possessed pawns (via OnNewPawn)
 
- Public 成员函数 继承自 AActor
 AActor ()
 Default constructor for AActor
 
 AActor (const FObjectInitializer &ObjectInitializer)
 Constructor for AActor that takes an ObjectInitializer for backward compatibility
 
float ActorGetDistanceToCollision (const FVector &Point, ECollisionChannel TraceChannel, FVector &ClosestPointOnCollision, UPrimitiveComponent **OutPrimitiveComponent=nullptr) const
 returns Distance to closest Body Instance surface. 更多...
 
bool ActorHasTag (FName Tag) const
 See if this actor's Tags array contains the supplied name tag
 
bool ActorLineTraceSingle (struct FHitResult &OutHit, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const struct FCollisionQueryParams &Params) const
 Trace a ray against the Components of this Actor and return the first blocking hit 更多...
 
FORCEINLINE const FTransform & ActorToWorld () const
 Get the local-to-world transform of the RootComponent. 更多...
 
UActorComponent * AddComponent (FName TemplateName, bool bManualAttachment, const FTransform &RelativeTransform, const UObject *ComponentTemplateContext, bool bDeferredFinish=false)
 Creates a new component and assigns ownership to the Actor this is called for. 更多...
 
UActorComponent * AddComponentByClass (TSubclassOf< UActorComponent > Class, bool bManualAttachment, const FTransform &RelativeTransform, bool bDeferredFinish)
 Creates a new component and assigns ownership to the Actor this is called for. 更多...
 
void AddControllingMatineeActor (AMatineeActor &InMatineeActor)
 Adds a controlling matinee actor for use during matinee playback 更多...
 
void AddInstanceComponent (UActorComponent *Component)
 Adds a component to the instance components array
 
void AddOwnedComponent (UActorComponent *Component)
 Puts a component in to the OwnedComponents array of the Actor. 更多...
 
virtual void AddTickPrerequisiteActor (AActor *PrerequisiteActor)
 Make this actor tick after PrerequisiteActor. 更多...
 
virtual void AddTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Make this actor tick after PrerequisiteComponent. 更多...
 
FORCEINLINE bool AllowReceiveTickEventOnDedicatedServer () const
 Return the value of bAllowReceiveTickEventOnDedicatedServer, indicating whether the Blueprint ReceiveTick() event will occur on dedicated servers.
 
virtual void ApplyWorldOffset (const FVector &InOffset, bool bWorldShift)
 Called by owning level to shift an actor location and all relevant data structures by specified delta 更多...
 
void AttachToActor (AActor *ParentActor, const FAttachmentTransformRules &AttachmentRules, FName SocketName=NAME_None)
 Attaches the RootComponent of this Actor to the RootComponent of the supplied actor, optionally at a named socket. 更多...
 
void AttachToComponent (USceneComponent *Parent, const FAttachmentTransformRules &AttachmentRules, FName SocketName=NAME_None)
 Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. 更多...
 
virtual void BecomeViewTarget (class APlayerController *PC)
 Called when this actor becomes the given PlayerController's ViewTarget. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual void CalcCamera (float DeltaTime, struct FMinimalViewInfo &OutResult)
 Calculate camera view point, when viewing this actor. 更多...
 
virtual FBox CalculateComponentsBoundingBoxInLocalSpace (bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Calculates the actor space bounding box of all components in this Actor. 更多...
 
void CallPreReplication (UNetDriver *NetDriver)
 Called by the networking system to call PreReplication on this actor and its components using the given NetDriver to find or create RepChangedPropertyTrackers.
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parameters, FOutParmRec *OutParms, FFrame *Stack) override
 Call the actor's function remotely 更多...
 
virtual bool CanBeBaseForCharacter (class APawn *Pawn) const
 Return true if the given Pawn can be "based" on this actor (ie walk on it). 更多...
 
bool CanBeDamaged () const
 Gets the literal value of bCanBeDamaged. 更多...
 
virtual bool CanBeInCluster () const override
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE bool CanEverTick () const
 Accessor for the value of bCanEverTick
 
void CheckComponentInstanceName (const FName InName)
 Checks for and resolve any name conflicts prior to instancing a new Blueprint Component.
 
virtual bool CheckDefaultSubobjectsInternal () const override
 Checks default sub-object assumptions. 更多...
 
virtual bool CheckStillInWorld ()
 This will check to see if the Actor is still in the world. 更多...
 
void ClearComponentOverlaps ()
 Dispatch all EndOverlap for all of the Actor's PrimitiveComponents. 更多...
 
virtual void ClearCrossLevelReferences ()
 Do anything needed to clear out cross level references; Called from ULevel::PreSave

 
void ClearInstanceComponents (bool bDestroyComponents)
 Clears the instance components array
 
void CopyRemoteRoleFrom (const AActor *CopyFromActor)
 Copies RemoteRole from another Actor and adds this actor to the list of network actors if necessary.
 
UActorComponent * CreateComponentFromTemplate (UActorComponent *Template, const FName InName=NAME_None)
 Util to create a component based on a template

 
void DebugShowComponentHierarchy (const TCHAR *Info, bool bShowPosition=true)
 Debug helper to show the component hierarchy of this actor. 更多...
 
void DebugShowOneComponentHierarchy (USceneComponent *SceneComp, int32 &NestLevel, bool bShowPosition)
 Debug helper for showing the component hierarchy of one component
 
bool Destroy (bool bNetForce=false, bool bShouldModifyLevel=true)
 Destroy this actor. 更多...
 
void DestroyConstructedComponents ()
 Destroys the constructed components.
 
virtual void Destroyed ()
 Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending
 
virtual bool DestroyNetworkActorHandled ()
 Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first 更多...
 
void DetachAllSceneComponents (class USceneComponent *InParentComponent, const FDetachmentTransformRules &DetachmentRules)
 Detaches all SceneComponents in this Actor from the supplied parent SceneComponent. 更多...
 
void DetachFromActor (const FDetachmentTransformRules &DetachmentRules)
 Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to. 更多...
 
void DetachRootComponentFromParent (bool bMaintainWorldPosition=true)
 DEPRECATED - Use DetachFromActor() instead
 
void DisableComponentsSimulatePhysics ()
 Stop all simulation from all components in this actor
 
virtual void DisableInput (class APlayerController *PlayerController)
 Removes this actor from the stack of input being handled by a PlayerController. 更多...
 
void DispatchBeginPlay (bool bFromLevelStreaming=false)
 Initiate a begin play call on this Actor, will handle calling in the correct order.
 
void DispatchBlockingHit (UPrimitiveComponent *MyComp, UPrimitiveComponent *OtherComp, bool bSelfMoved, FHitResult const &Hit)
 Call ReceiveHit, as well as delegates on Actor and Component
 
virtual void DispatchPhysicsCollisionHit (const struct FRigidBodyCollisionInfo &MyInfo, const struct FRigidBodyCollisionInfo &OtherInfo, const FCollisionImpactData &RigidCollisionData)
 Dispatches ReceiveHit virtual and OnComponentHit delegate
 
virtual void DisplayDebug (class UCanvas *Canvas, const class FDebugDisplayInfo &DebugDisplay, float &YL, float &YPos)
 Draw important Actor variables on canvas. 更多...
 
void DrawDebugComponents (FColor const &BaseColor=FColor::White) const
 Debug rendering to visualize the component tree for this actor.
 
virtual void EnableInput (class APlayerController *PlayerController)
 Pushes this actor on to the stack of input being handled by a PlayerController. 更多...
 
virtual void EndViewTarget (class APlayerController *PC)
 Called when this actor is no longer the given PlayerController's ViewTarget. 更多...
 
void ExchangeNetRoles (bool bRemoteOwner)
 Swaps Role and RemoteRole if client
 
bool ExecuteConstruction (const FTransform &Transform, const struct FRotationConversionCache *TransformRotationCache, const class FComponentInstanceDataCache *InstanceDataCache, bool bIsDefaultTransform=false)
 Run any construction script for this Actor. 更多...
 
virtual void FellOutOfWorld (const class UDamageType &dmgType)
 Called when the actor falls out of the world 'safely' (below KillZ and such)
 
template<class T >
T * FindComponentByClass () const
 Templatized version of FindComponentByClass that handles casting for you
 
virtual UActorComponent * FindComponentByClass (const TSubclassOf< UActorComponent > ComponentClass) const
 Searches components array and returns first encountered component of the specified class, native version of GetComponentByClass
 
FNetworkObjectInfo * FindNetworkObjectInfo ()
 Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver). 更多...
 
FNetworkObjectInfo * FindOrAddNetworkObjectInfo ()
 Find the FNetworkObjectInfo struct associated with this actor (for the main NetDriver). 更多...
 
void FinishAddComponent (UActorComponent *Component, bool bManualAttachment, const FTransform &RelativeTransform)
 Completes the creation of a new actor component. 更多...
 
void FinishAndRegisterComponent (UActorComponent *Component)
 Helper function to register the specified component, and add it to the serialized components array 更多...
 
void FinishSpawning (const FTransform &Transform, bool bIsDefaultTransform=false, const FComponentInstanceDataCache *InstanceDataCache=nullptr)
 Called to finish the spawning process, generally in the case of deferred spawning
 
void FlushNetDormancy ()
 Forces dormant actor to replicate but doesn't change NetDormancy state (i.e., they will go dormant again if left dormant)
 
virtual void ForceNetRelevant ()
 Forces this actor to be net relevant if it is not already by default

 
virtual void ForceNetUpdate ()
 Force actor to be updated to clients/demo net drivers
 
void ForcePropertyCompare ()
 Forces properties on this actor to do a compare for one frame (rather than share shadow state)
 
void ForEachAttachedActors (TFunctionRef< bool(class AActor *)> Functor) const
 Call a functor for Actors which are attached directly to a component in this actor. 更多...
 
template<class ComponentType , typename Func >
void ForEachComponent (bool bIncludeFromChildActors, Func InFunc) const
 Calls the compile-time lambda on each component of the specified type 更多...
 
template<typename Func >
void ForEachComponent (bool bIncludeFromChildActors, Func InFunc) const
 Calls the compile-time lambda on each valid component 更多...
 
virtual void GatherCurrentMovement ()
 Fills ReplicatedMovement property
 
void GetActorBounds (bool bOnlyCollidingComponents, FVector &Origin, FVector &BoxExtent, bool bIncludeFromChildActors=false) const
 Returns the bounding box of all components that make up this Actor (excluding ChildActorComponents). 更多...
 
bool GetActorEnableCollision () const
 Get current state of collision for the whole actor
 
virtual void GetActorEyesViewPoint (FVector &OutLocation, FRotator &OutRotation) const
 Returns the point of view of the actor. 更多...
 
FVector GetActorForwardVector () const
 Get the forward (X) vector (length 1.0) from this Actor, in world space. 更多...
 
FORCEINLINE FVector GetActorLocation () const
 Returns the location of the RootComponent of this Actor
 
FORCEINLINE FQuat GetActorQuat () const
 Returns the quaternion of the RootComponent of this Actor
 
FVector GetActorRelativeScale3D () const
 Return the actor's relative scale 3d
 
FVector GetActorRightVector () const
 Get the right (Y) vector (length 1.0) from this Actor, in world space. 更多...
 
FORCEINLINE FRotator GetActorRotation () const
 Returns the rotation of the RootComponent of this Actor
 
FORCEINLINE FVector GetActorScale () const
 Returns the scale of the RootComponent of this Actor
 
FVector GetActorScale3D () const
 Returns the Actor's world-space scale.
 
float GetActorTickInterval () const
 Returns the tick interval of this actor's primary tick function
 
float GetActorTimeDilation () const
 Get ActorTimeDilation - this can be used for input control or speed control for slomo. 更多...
 
float GetActorTimeDilation (const UWorld &ActorWorld) const
 More efficient version that takes the Actor's current world.
 
FORCEINLINE const FTransform & GetActorTransform () const
 Returns the transform of the RootComponent of this Actor
 
FVector GetActorUpVector () const
 Get the up (Z) vector (length 1.0) from this Actor, in world space. 更多...
 
void GetAllChildActors (TArray< AActor * > &ChildActors, bool bIncludeDescendants=true) const
 Returns a list of all actors spawned by our Child Actor Components, including children of children. 更多...
 
void GetAttachedActors (TArray< AActor * > &OutActors, bool bResetArray=true) const
 Find all Actors which are attached directly to a component in this actor
 
const struct FRepAttachment & GetAttachmentReplication () const
 Get read-only access to current AttachmentReplication.
 
AActor * GetAttachParentActor () const
 Walk up the attachment chain from RootComponent until we encounter a different actor, and return it. 更多...
 
FName GetAttachParentSocketName () const
 Walk up the attachment chain from RootComponent until we encounter a different actor, and return the socket name in the component. 更多...
 
UActorComponent * GetComponentByClass (TSubclassOf< UActorComponent > ComponentClass) const
 Searches components array and returns first encountered component of the specified class
 
const TSet< UActorComponent * > & GetComponents () const
 Get a direct reference to the Components set rather than a copy with the null pointers removed. 更多...
 
template<class T , class AllocatorType >
void GetComponents (TArray< T *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 Get all components derived from class 'T' and fill in the OutComponents array with the result. 更多...
 
template<class AllocatorType >
void GetComponents (TArray< UActorComponent *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 UActorComponent specialization of GetComponents() to avoid unnecessary casts. 更多...
 
template<class AllocatorType >
void GetComponents (TSubclassOf< UActorComponent > ComponentClass, TArray< UActorComponent *, AllocatorType > &OutComponents, bool bIncludeFromChildActors=false) const
 Get all components derived from specified ComponentClass and fill in the OutComponents array with the result. 更多...
 
virtual FBox GetComponentsBoundingBox (bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Returns the world space bounding box of all components in this Actor. 更多...
 
virtual void GetComponentsBoundingCylinder (float &CollisionRadius, float &CollisionHalfHeight, bool bNonColliding=false, bool bIncludeFromChildActors=false) const
 Get half-height/radius of a big axis-aligned cylinder around this actors registered colliding components, or all registered components if bNonColliding is false. 更多...
 
TArray< UActorComponent * > GetComponentsByInterface (TSubclassOf< UInterface > Interface) const
 Gets all the components that implements the given interface.
 
TArray< UActorComponent * > GetComponentsByTag (TSubclassOf< UActorComponent > ComponentClass, FName Tag) const
 Gets all the components that inherit from the given class with a given tag.
 
virtual ECollisionResponse GetComponentsCollisionResponseToChannel (ECollisionChannel Channel) const
 Get Collision Response to the passed in Channel for all components It returns Max of state - i.e. 更多...
 
virtual USceneComponent * GetDefaultAttachComponent () const
 Returns this actor's default attachment component for attaching children to 更多...
 
float GetDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor.
 
float GetDotProductTo (const AActor *OtherActor) const
 Returns the dot product from this Actor to OtherActor. 更多...
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack) override
 Return the space this function should be called. 更多...
 
class UGameInstance * GetGameInstance () const
 Gets the GameInstance that ultimately contains this actor.
 
template<class T >
T * GetGameInstance () const
 Gets the GameInstance that ultimately contains this actor cast to the template type. 更多...
 
float GetGameTimeSinceCreation () const
 The number of seconds (in game time) since this Actor was created, relative to Get Game Time In Seconds.
 
float GetHorizontalDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor, ignoring Z.
 
float GetHorizontalDotProductTo (const AActor *OtherActor) const
 Returns the dot product from this Actor to OtherActor, ignoring Z. 更多...
 
virtual FString GetHumanReadableName () const
 Returns the human readable string representation of an object.
 
float GetInputAxisKeyValue (const FKey InputAxisKey) const
 Gets the value of the input axis key if input is enabled for this actor.
 
float GetInputAxisValue (const FName InputAxisName) const
 Gets the value of the input axis if input is enabled for this actor.
 
FVector GetInputVectorAxisValue (const FKey InputAxisKey) const
 Gets the value of the input axis key if input is enabled for this actor.
 
const TArray< UActorComponent * > & GetInstanceComponents () const
 Returns the instance components array
 
APawn * GetInstigator () const
 Returns the instigator for this actor, or nullptr if there is none.
 
template<class T >
T * GetInstigator () const
 Get the instigator, cast as a specific class. 更多...
 
AController * GetInstigatorController () const
 Returns the instigator's controller for this actor, or nullptr if there is none.
 
template<class T >
T * GetInstigatorController () const
 Returns the instigator's controller, cast as a specific class. 更多...
 
FORCEINLINE bool GetIsReplicated () const
 Returns whether replication is enabled or not.
 
virtual float GetLastRenderTime () const
 Returns the most recent time any of this actor's components were rendered
 
ULevel * GetLevel () const
 Return the ULevel that this Actor is part of.
 
virtual float GetLifeSpan () const
 Get the remaining lifespan of this actor. 更多...
 
void GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override
 Returns the properties used for network replication, this needs to be overridden by all actor classes with native replicated properties
 
ENetRole GetLocalRole () const
 Returns how much control the local machine has over this actor.
 
virtual class UNetConnection * GetNetConnection () const
 Get the owning connection used for communicating between client/server 更多...
 
virtual bool GetNetDormancy (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *InChannel, float Time, bool bLowBandwidth)
 Returns true if the actor should be dormant for a specific net connection. 更多...
 
class UNetDriver * GetNetDriver () const
 Returns the net driver that this actor is bound to, may be null
 
FName GetNetDriverName () const
 Returns name of the net driver associated with this actor (all RPCs will go out via this connection)
 
ENetMode GetNetMode () const
 Get the network mode (dedicated server, client, standalone, etc) for this actor. 更多...
 
virtual const AActor * GetNetOwner () const
 Return the actor responsible for replication, if any. 更多...
 
virtual class UPlayer * GetNetOwningPlayer ()
 Return the owning UPlayer (if any) of this actor. 更多...
 
virtual float GetNetPriority (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *InChannel, float Time, bool bLowBandwidth)
 Function used to prioritize actors when deciding which to replicate 更多...
 
void GetOverlappingActors (TArray< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns list of actors this actor is overlapping (any component overlapping any component). 更多...
 
void GetOverlappingActors (TSet< AActor * > &OverlappingActors, TSubclassOf< AActor > ClassFilter=nullptr) const
 Returns set of actors this actor is overlapping (any component overlapping any component). 更多...
 
void GetOverlappingComponents (TArray< UPrimitiveComponent * > &OverlappingComponents) const
 Returns list of components this actor is overlapping.
 
void GetOverlappingComponents (TSet< UPrimitiveComponent * > &OverlappingComponents) const
 Returns set of components this actor is overlapping.
 
AActor * GetOwner () const
 Get the owner of this Actor, used primarily for network replication.
 
template<class T >
T * GetOwner () const
 Templated version of GetOwner(), will return nullptr if cast fails
 
AActor * GetParentActor () const
 If this Actor was created by a Child Actor Component returns the Actor that owns that Child Actor Component

 
UChildActorComponent * GetParentComponent () const
 If this Actor was created by a Child Actor Component returns that Child Actor Component

 
FVector GetPlacementExtent () const
 Get the extent used when placing this actor in the editor, used for 'pulling back' hit.
 
ENetRole GetRemoteRole () const
 Returns how much control the remote machine has over this actor.
 
virtual float GetReplayPriority (const FVector &ViewPos, const FVector &ViewDir, class AActor *Viewer, AActor *ViewTarget, UActorChannel *const InChannel, float Time)
 Similar to GetNetPriority, but will only be used for prioritizing actors while recording a replay. 更多...
 
const TArray< UActorComponent * > & GetReplicatedComponents () const
 Returns a constant reference to the replicated components set
 
const FRepMovement & GetReplicatedMovement () const
 Gets the literal value of ReplicatedMovement. 更多...
 
FRepMovement & GetReplicatedMovement_Mutable ()
 Gets a reference to ReplicatedMovement with the expectation that it will be modified. 更多...
 
FORCEINLINE USceneComponent * GetRootComponent () const
 Returns this actor's root component.
 
virtual void GetSimpleCollisionCylinder (float &CollisionRadius, float &CollisionHalfHeight) const
 Get axis-aligned cylinder around this actor, used for simple collision checks (ie Pawns reaching a destination). 更多...
 
FVector GetSimpleCollisionCylinderExtent () const
 Returns collision extents vector for this Actor, based on GetSimpleCollisionCylinder().
 
float GetSimpleCollisionHalfHeight () const
 Returns the half height of the collision cylinder from GetSimpleCollisionCylinder().
 
float GetSimpleCollisionRadius () const
 Returns the radius of the collision cylinder from GetSimpleCollisionCylinder().
 
float GetSquaredDistanceTo (const AActor *OtherActor) const
 Returns the squared distance from this Actor to OtherActor.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList) override
 Returns a list of sub-objects that have stable names for networking
 
virtual FVector GetTargetLocation (AActor *RequestedBy=nullptr) const
 Returns the optimal location to fire weapons at this actor 更多...
 
bool GetTearOff () const
 If true, this actor is no longer replicated to new clients, and is "torn off" (becomes a ROLE_Authority) on clients to which it was being replicated.
 
bool GetTickableWhenPaused ()
 Gets whether this actor can tick when paused.
 
const FTransform & GetTransform () const
 Get the actor-to-world transform. 更多...
 
EActorUpdateOverlapsMethod GetUpdateOverlapsMethodDuringLevelStreaming () const
 Get the method used to UpdateOverlaps() when loaded via level streaming. 更多...
 
virtual FVector GetVelocity () const
 Returns velocity (in cm/s (Unreal Units/second) of the rootcomponent if it is either using physics or has an associated MovementComponent
 
float GetVerticalDistanceTo (const AActor *OtherActor) const
 Returns the distance from this Actor to OtherActor, ignoring XY.
 
virtual UWorld * GetWorld () const override
 Getter for the cached world pointer, will return null if the actor is not actually spawned in a level
 
class AWorldSettings * GetWorldSettings () const
 Returns the WorldSettings for the World the actor is in If you'd like to know what UWorld this placed actor (not dynamic spawned actor) belong to, use GetTypedOuter<UWorld>()
 
class FTimerManager & GetWorldTimerManager () const
 Get the timer instance from the actors world
 
virtual bool HasActiveCameraComponent () const
 Returns true if the actor contains an active camera component
 
virtual bool HasActivePawnControlCameraComponent () const
 Returns true if the actor contains an active locked to HMD camera component
 
bool HasActorBegunPlay () const
 Returns whether an actor has had BeginPlay called on it (and not subsequently had EndPlay called)
 
bool HasAuthority () const
 Returns whether this actor has network authority
 
FORCEINLINE bool HasDeferredComponentRegistration () const
 Returns true if Actor has deferred the RegisterAllComponents() call at spawn time (e.g. 更多...
 
virtual bool HasLocalNetOwner () const
 Does this actor have a locally controlled owner responsible for replication? (APlayerController typically) 更多...
 
virtual bool HasNetOwner () const
 Does this actor have an owner responsible for replication? (APlayerController typically) 更多...
 
bool HasValidRootComponent ()
 Returns true if Actor has a registered root component
 
bool IncrementalRegisterComponents (int32 NumComponentsToRegister, FRegisterComponentContext *Context=nullptr)
 Incrementally registers components associated with this actor, used during level streaming 更多...
 
void InitializeComponents ()
 Iterate over components array and call InitializeComponent, which happens once per actor
 
void InvalidateLightingCache ()
 Invalidate lighting cache with default options.
 
virtual void InvalidateLightingCacheDetailed (bool bTranslationOnly)
 Invalidates anything produced by the last lighting build.
 
bool IsActorBeginningPlay () const
 Returns whether an actor is in the process of beginning play
 
bool IsActorBeginningPlayFromLevelStreaming () const
 Returns whether an actor is beginning play in DispatchBeginPlay() during level streaming (which includes initial level load).
 
bool IsActorBeingDestroyed () const
 Returns true if this actor is currently being destroyed, some gameplay events may be unsafe
 
bool IsActorInitialized () const
 Returns whether an actor has been initialized for gameplay
 
bool IsActorTickEnabled () const
 Returns whether this actor has tick enabled or not

 
virtual bool IsAsset () const override
 Returns true if this object is considered an asset.
 
virtual bool IsAttachedTo (const AActor *Other) const
 Iterates up the attachment chain to see whether or not this Actor is attached to the given Actor 更多...
 
virtual bool IsBasedOnActor (const AActor *Other) const
 Iterates up the movement base chain to see whether or not this Actor is based on the given Actor, defaults to checking attachment 更多...
 
bool IsChildActor () const
 Returns whether this Actor was spawned by a child actor component
 
virtual bool IsComponentRelevantForNavigation (UActorComponent *Component) const
 Check if owned component should be relevant for navigation Allows implementing master switch to disable e.g. 更多...
 
virtual bool IsEditorOnly () const override
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
bool IsHidden () const
 Gets the literal value of bHidden. 更多...
 
bool IsInLevel (const class ULevel *TestLevel) const
 Returns true if this actor is contained by TestLevel.
 
bool IsInPersistentLevel (bool bIncludeLevelStreamingPersistent=false) const
 Returns whether this Actor is in the persistent level, i.e. 更多...
 
virtual bool IsLevelBoundsRelevant () const
 Indicates whether this actor should participate in level bounds calculations
 
bool IsMatineeControlled () const
 Returns whether a MatineeActor is currently controlling this Actor
 
virtual bool IsNameStableForNetworking () const override
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
bool IsNetMode (ENetMode Mode) const
 Test whether net mode is the given mode. 更多...
 
virtual bool IsNetRelevantFor (const AActor *RealViewer, const AActor *ViewTarget, const FVector &SrcLocation) const
 Checks to see if this actor is relevant for a specific network connection 更多...
 
bool IsNetStartupActor () const
 Returns true if this is a replicated actor that was placed in the map
 
bool IsOverlappingActor (const AActor *Other) const
 Check whether any component of this Actor is overlapping any component of another Actor. 更多...
 
bool IsOwnedBy (const AActor *TestOwner) const
 See if this actor is owned by TestOwner.
 
bool IsPackageExternal () const
 Get the actor packaging mode. 更多...
 
bool IsPendingKillPending () const
 Returns true if this actor has begun the destruction process. 更多...
 
virtual bool IsReadyForFinishDestroy () override
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsRelevancyOwnerFor (const AActor *ReplicatedActor, const AActor *ActorOwner, const AActor *ConnectionActor) const
 Check if this actor is the owner when doing relevancy checks for actors marked bOnlyRelevantToOwner 更多...
 
virtual bool IsReplayRelevantFor (const AActor *RealViewer, const AActor *ViewTarget, const FVector &SrcLocation, const float CullDistanceSquared) const
 Checks to see if this actor is relevant for a recorded replay 更多...
 
bool IsReplicatingMovement () const
 Gets the literal value of bReplicateMovement. 更多...
 
virtual bool IsReplicationPausedForConnection (const FNetViewer &ConnectionOwnerNetViewer)
 Gives the actor a chance to pause replication to a player represented by the passed in actor - only called on server
 
virtual bool IsRootComponentCollisionRegistered () const
 Returns true if the root component is registered and has collision enabled. 更多...
 
bool IsRootComponentMovable () const
 See if the root component has Mobility of EComponentMobility::Movable
 
bool IsRootComponentStatic () const
 See if the root component has ModifyFrequency of MF_Static
 
bool IsRootComponentStationary () const
 See if the root component has Mobility of EComponentMobility::Stationary
 
FORCEINLINE bool IsRunningUserConstructionScript () const
 Returns if this actor is currently running the User Construction Script
 
virtual bool IsSupportedForNetworking () const override
 IsSupportedForNetworking means an object can be referenced over the network
 
void K2_AddActorLocalOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of this component in its local reference frame. 更多...
 
void K2_AddActorLocalRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of this component in its local reference frame 更多...
 
void K2_AddActorLocalTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this component in its local reference frame 更多...
 
void K2_AddActorWorldOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of this actor in world space. 更多...
 
void K2_AddActorWorldRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of this actor in world space. 更多...
 
void K2_AddActorWorldTransform (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this actor in world space. 更多...
 
void K2_AddActorWorldTransformKeepScale (const FTransform &DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of this actor in world space. 更多...
 
void K2_AttachRootComponentTo (USceneComponent *InParent, FName InSocketName=NAME_None, EAttachLocation::Type AttachLocationType=EAttachLocation::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
 DEPRECATED - Use AttachToComponent() instead
 
void K2_AttachRootComponentToActor (AActor *InParentActor, FName InSocketName=NAME_None, EAttachLocation::Type AttachLocationType=EAttachLocation::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
 DEPRECATED - Use AttachToActor() instead
 
void K2_AttachToActor (AActor *ParentActor, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attaches the RootComponent of this Actor to the supplied actor, optionally at a named socket. 更多...
 
void K2_AttachToComponent (USceneComponent *Parent, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attaches the RootComponent of this Actor to the supplied component, optionally at a named socket. 更多...
 
virtual void K2_DestroyActor ()
 Destroy the actor
 
void K2_DetachFromActor (EDetachmentRule LocationRule=EDetachmentRule::KeepRelative, EDetachmentRule RotationRule=EDetachmentRule::KeepRelative, EDetachmentRule ScaleRule=EDetachmentRule::KeepRelative)
 Detaches the RootComponent of this Actor from any SceneComponent it is currently attached to. 更多...
 
FVector K2_GetActorLocation () const
 Returns the location of the RootComponent of this Actor
 
FRotator K2_GetActorRotation () const
 Returns rotation of the RootComponent of this Actor.
 
TArray< UActorComponent * > K2_GetComponentsByClass (TSubclassOf< UActorComponent > ComponentClass) const
 Gets all the components that inherit from the given class. 更多...
 
USceneComponent * K2_GetRootComponent () const
 Returns the RootComponent of this Actor
 
void K2_OnBecomeViewTarget (class APlayerController *PC)
 Event called when this Actor becomes the view target for the given PlayerController.
 
void K2_OnEndViewTarget (class APlayerController *PC)
 Event called when this Actor is no longer the view target for the given PlayerController.
 
void K2_OnReset ()
 Event called when this Actor is reset to its initial state - used when restarting level without reloading.
 
bool K2_SetActorLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Move the Actor to the specified location. 更多...
 
bool K2_SetActorLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Move the actor instantly to the specified location and rotation. 更多...
 
void K2_SetActorRelativeLocation (FVector NewRelativeLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative location. 更多...
 
void K2_SetActorRelativeRotation (FRotator NewRelativeRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative rotation 更多...
 
void K2_SetActorRelativeTransform (const FTransform &NewRelativeTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the actor's RootComponent to the specified relative transform 更多...
 
bool K2_SetActorRotation (FRotator NewRotation, bool bTeleportPhysics)
 Set the Actor's rotation instantly to the specified rotation. 更多...
 
bool K2_SetActorTransform (const FTransform &NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the Actors transform to the specified one. 更多...
 
bool K2_TeleportTo (FVector DestLocation, FRotator DestRotation)
 Teleport this actor to a new location. 更多...
 
virtual void LifeSpanExpired ()
 Called when the lifespan of an actor expires (if he has one).
 
void MakeNoise (float Loudness=1.f, APawn *NoiseInstigator=nullptr, FVector NoiseLocation=FVector::ZeroVector, float MaxRange=0.f, FName Tag=NAME_None)
 Trigger a noise caused by a given Pawn, at a given location. 更多...
 
virtual void MarkComponentsAsPendingKill ()
 Called to mark all components as pending kill when the actor is being destroyed
 
void MarkComponentsRenderStateDirty ()
 Flags all component's render state as dirty

 
virtual void NotifyActorBeginCursorOver ()
 Event when this actor has the mouse moved over it with the clickable interface.
 
virtual void NotifyActorBeginOverlap (AActor *OtherActor)
 Event when this actor overlaps another actor, for example a player walking into a trigger. 更多...
 
virtual void NotifyActorEndCursorOver ()
 Event when this actor has the mouse moved off of it with the clickable interface.
 
virtual void NotifyActorEndOverlap (AActor *OtherActor)
 Event when an actor no longer overlaps another actor, and they have separated. 更多...
 
virtual void NotifyActorOnClicked (FKey ButtonPressed=EKeys::LeftMouseButton)
 Event when this actor is clicked by the mouse when using the clickable interface.
 
virtual void NotifyActorOnInputTouchBegin (const ETouchIndex::Type FingerIndex)
 Event when this actor is touched when click events are enabled.
 
virtual void NotifyActorOnInputTouchEnd (const ETouchIndex::Type FingerIndex)
 Event when this actor is under the finger when untouched when click events are enabled.
 
virtual void NotifyActorOnInputTouchEnter (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved over it with the clickable interface.
 
virtual void NotifyActorOnInputTouchLeave (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved off of it with the clickable interface.
 
virtual void NotifyActorOnReleased (FKey ButtonReleased=EKeys::LeftMouseButton)
 Event when this actor is under the mouse when left mouse button is released while using the clickable interface.
 
virtual void NotifyHit (class UPrimitiveComponent *MyComp, AActor *Other, class UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit)
 Event when this actor bumps into a blocking object, or blocks another actor that bumps into it. 更多...
 
virtual void OnActorChannelOpen (class FInBunch &InBunch, class UNetConnection *Connection)
 Allows for a specific response from the actor when the actor channel is opened (client side) 更多...
 
virtual void OnConstruction (const FTransform &Transform)
 Called when an instance of this class is placed (in editor) or spawned. 更多...
 
virtual void OnNetCleanup (class UNetConnection *Connection)
 Handles cleaning up the associated Actor when killing the connection 更多...
 
virtual void OnRep_AttachmentReplication ()
 Called on client when updated AttachmentReplication value is received for this actor.
 
virtual void OnRep_Instigator ()
 Called on clients when Instigator is replicated.
 
virtual void OnRep_ReplicatedMovement ()
 ReplicatedMovement struct replication event
 
virtual void OnRep_ReplicateMovement ()
 Called on client when updated bReplicateMovement value is received for this actor.
 
virtual void OnReplicationPausedChanged (bool bIsReplicationPaused)
 Called on the client when the replication paused value is changed
 
virtual void OnSerializeNewActor (class FOutBunch &OutBunch)
 SerializeNewActor has just been called on the actor before network replication (server side) 更多...
 
virtual void OnSubobjectCreatedFromReplication (UObject *NewSubobject)
 Called on the actor when a new subobject is dynamically created via replication
 
virtual void OnSubobjectDestroyFromReplication (UObject *Subobject)
 Called on the actor when a subobject is dynamically destroyed via replication
 
virtual void OutsideWorldBounds ()
 Called when the Actor is outside the hard limit on world bounds
 
void PostActorConstruction ()
 Called after the actor has run its construction. 更多...
 
virtual void PostActorCreated ()
 Called when an actor is done spawning into the world (from UWorld::SpawnActor), both in the editor and during gameplay For actors with a root component, the location and rotation will have already been set. 更多...
 
virtual void PostInitializeComponents ()
 Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay
 
virtual void PostInitProperties () override
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph) override
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetInit ()
 Always called immediately after spawning and reading in replicated properties
 
virtual void PostNetReceive () override
 Always called immediately after properties are received from the remote.
 
virtual void PostNetReceiveLocationAndRotation ()
 Update location and rotation from ReplicatedMovement. 更多...
 
virtual void PostNetReceivePhysicState ()
 Update and smooth simulated physic state, replaces PostNetReceiveLocation() and PostNetReceiveVelocity()
 
virtual void PostNetReceiveRole ()
 Always called immediately after a new Role is received from the remote.
 
virtual void PostNetReceiveVelocity (const FVector &NewVelocity)
 Update velocity - typically from ReplicatedMovement, not called for simulated physics!
 
virtual void PostRegisterAllComponents ()
 Called after all the components in the Components array are registered, called both in editor and during gameplay
 
virtual void PostRename (UObject *OldOuter, const FName OldName) override
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRenderFor (class APlayerController *PC, class UCanvas *Canvas, FVector CameraPosition, FVector CameraDir)
 Hook to allow actors to render HUD overlays for themselves. 更多...
 
virtual void PostSaveRoot (bool bCleanupIsRequired) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
void PostSpawnInitialize (FTransform const &SpawnTransform, AActor *InOwner, APawn *InInstigator, bool bRemoteOwned, bool bNoFail, bool bDeferConstruction)
 Called after the actor is spawned in the world. 更多...
 
virtual void PostUnregisterAllComponents ()
 Called after all currently registered components are cleared
 
virtual void PreInitializeComponents ()
 Called right before components are initialized, only called during gameplay
 
virtual void PreNetReceive () override
 Always called immediately before properties are received from the remote.
 
virtual void PreRegisterAllComponents ()
 Called before all the components in the Components array are registered, called both in editor and during gameplay
 
virtual void PreReplication (IRepChangedPropertyTracker &ChangedPropertyTracker)
 Called on the actor right before replication occurs. 更多...
 
virtual void PreReplicationForReplay (IRepChangedPropertyTracker &ChangedPropertyTracker)
 Called on the actor right before replication occurs. 更多...
 
virtual bool PreSaveRoot (const TCHAR *InFilename) override
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PrestreamTextures (float Seconds, bool bEnableStreaming, int32 CinematicTextureGroups=0)
 Calls PrestreamTextures() for all the actor's meshcomponents. 更多...
 
virtual void ProcessEvent (UFunction *Function, void *Parameters) override
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
void ReceiveActorBeginCursorOver ()
 Event when this actor has the mouse moved over it with the clickable interface.
 
void ReceiveActorBeginOverlap (AActor *OtherActor)
 Event when this actor overlaps another actor, for example a player walking into a trigger. 更多...
 
void ReceiveActorEndCursorOver ()
 Event when this actor has the mouse moved off of it with the clickable interface.
 
void ReceiveActorEndOverlap (AActor *OtherActor)
 Event when an actor no longer overlaps another actor, and they have separated. 更多...
 
void ReceiveActorOnClicked (FKey ButtonPressed=EKeys::LeftMouseButton)
 Event when this actor is clicked by the mouse when using the clickable interface.
 
void ReceiveActorOnInputTouchBegin (const ETouchIndex::Type FingerIndex)
 Event when this actor is touched when click events are enabled.
 
void ReceiveActorOnInputTouchEnd (const ETouchIndex::Type FingerIndex)
 Event when this actor is under the finger when untouched when click events are enabled.
 
void ReceiveActorOnInputTouchEnter (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved over it with the clickable interface.
 
void ReceiveActorOnInputTouchLeave (const ETouchIndex::Type FingerIndex)
 Event when this actor has a finger moved off of it with the clickable interface.
 
void ReceiveActorOnReleased (FKey ButtonReleased=EKeys::LeftMouseButton)
 Event when this actor is under the mouse when left mouse button is released while using the clickable interface.
 
void ReceiveAnyDamage (float Damage, const class UDamageType *DamageType, class AController *InstigatedBy, AActor *DamageCauser)
 Event when this actor takes ANY damage
 
void ReceiveDestroyed ()
 Called when the actor has been explicitly destroyed.
 
void ReceiveHit (class UPrimitiveComponent *MyComp, AActor *Other, class UPrimitiveComponent *OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult &Hit)
 Event when this actor bumps into a blocking object, or blocks another actor that bumps into it. 更多...
 
void ReceivePointDamage (float Damage, const class UDamageType *DamageType, FVector HitLocation, FVector HitNormal, class UPrimitiveComponent *HitComponent, FName BoneName, FVector ShotFromDirection, class AController *InstigatedBy, AActor *DamageCauser, const FHitResult &HitInfo)
 Event when this actor takes POINT damage
 
void ReceiveRadialDamage (float DamageReceived, const class UDamageType *DamageType, FVector Origin, const struct FHitResult &HitInfo, class AController *InstigatedBy, AActor *DamageCauser)
 Event when this actor takes RADIAL damage
 
void ReceiveTick (float DeltaSeconds)
 Event called every frame, if ticking is enabled
 
void RegisterAllActorTickFunctions (bool bRegister, bool bDoComponents)
 When called, will call the virtual call chain to register all of the tick functions for both the actor and optionally all components Do not override this function or make it virtual 更多...
 
virtual void RegisterAllComponents ()
 Ensure that all the components in the Components array are registered
 
void RemoveControllingMatineeActor (AMatineeActor &InMatineeActor)
 Removes a controlling matinee actor 更多...
 
void RemoveInstanceComponent (UActorComponent *Component)
 Removes a component from the instance components array
 
void RemoveOwnedComponent (UActorComponent *Component)
 Removes a component from the OwnedComponents array of the Actor. 更多...
 
virtual void RemoveTickPrerequisiteActor (AActor *PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
 
virtual void RemoveTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None) override
 Rename this object to a unique name, or change its outer. 更多...
 
virtual bool ReplicateSubobjects (class UActorChannel *Channel, class FOutBunch *Bunch, FReplicationFlags *RepFlags)
 Method that allows an actor to replicate subobjects on its actor channel
 
virtual void ReregisterAllComponents ()
 Will reregister all components on this actor. 更多...
 
virtual void RerunConstructionScripts ()
 Rerun construction scripts, destroying all autogenerated components; will attempt to preserve the root component location.
 
virtual void Reset ()
 Reset actor to initial state - used when restarting level without reloading.
 
void ResetOwnedComponents ()
 Force the Actor to clear and rebuild its OwnedComponents array by evaluating all children (recursively) and locating components In general this should not need to be called directly, but can sometimes be necessary as part of undo/redo code paths.
 
void ResetPropertiesForConstruction ()
 Reset private properties to defaults, and all FRandomStream structs in this Actor, so they will start their sequence of random numbers again.
 
virtual void RewindForReplay ()
 Called on the actor before checkpoint data is applied during a replay. 更多...
 
void RouteEndPlay (const EEndPlayReason::Type EndPlayReason)
 Non-virtual function to evaluate which portions of the EndPlay process should be dispatched for each actor
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SetActorEnableCollision (bool bNewActorEnableCollision)
 Allows enabling/disabling collision for the whole actor
 
virtual void SetActorHiddenInGame (bool bNewHidden)
 Sets the actor to be hidden in the game 更多...
 
bool SetActorLocation (const FVector &NewLocation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Move the actor instantly to the specified location. 更多...
 
bool SetActorLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep=false, FHitResult *OutSweepHitResult=nullptr, ETeleportType Teleport=ETeleportType::None)
 Move the actor instantly to the specified location and rotation. 更多...
 
void SetActorRelativeScale3D (FVector NewRelativeScale)
 Set the actor's RootComponent to the specified relative scale 3d 更多...
 
bool SetActorRotation (FRotator NewRotation, ETeleportType Teleport=ETeleportType::None)
 Set the Actor's rotation instantly to the specified rotation. 更多...
 
void SetActorScale3D (FVector NewScale3D)
 Set the Actor's world-space scale.
 
void SetActorTickEnabled (bool bEnabled)
 Set this actor's tick functions to be enabled or disabled. 更多...
 
void SetActorTickInterval (float TickInterval)
 Sets the tick interval of this actor's primary tick function. 更多...
 
void SetAutonomousProxy (const bool bInAutonomousProxy, const bool bAllowForcePropertyCompare=true)
 Sets whether or not this Actor is an autonomous proxy, which is an actor on a network client that is controlled by a user on that client.
 
void SetCanBeDamaged (bool bInCanBeDamaged)
 Sets the value of bCanBeDamaged without causing other side effects to this instance.
 
void SetHidden (const bool bInHidden)
 Sets the value of bHidden without causing other side effects to this instance. 更多...
 
void SetInstigator (APawn *InInstigator)
 Sets the value of Instigator without causing other side effects to this instance.
 
virtual void SetLifeSpan (float InLifespan)
 Set the lifespan of this actor. 更多...
 
void SetLODParent (class UPrimitiveComponent *InLODParent, float InParentDrawDistance)
 Set LOD Parent component for all of our components, normally associated with an ALODActor. 更多...
 
void SetNetDormancy (ENetDormancy NewDormancy)
 Puts actor in dormant networking state
 
void SetNetDriverName (FName NewNetDriverName)
 Set the name of the net driver associated with this actor. 更多...
 
void SetNetUpdateTime (float NewUpdateTime)
 Updates NetUpdateTime to the new value for future net relevancy checks
 
virtual void SetOwner (AActor *NewOwner)
 Set the owner of this Actor, used primarily for network replication. 更多...
 
void SetReplicatedMovement (const FRepMovement &InReplicatedMovement)
 Sets the value of ReplicatedMovement without causing other side effects to this instance.
 
virtual void SetReplicateMovement (bool bInReplicateMovement)
 Set whether this actor's movement replicates to network clients. 更多...
 
void SetReplicates (bool bInReplicates)
 Set whether this actor replicates to network clients. 更多...
 
void SetReplicatingMovement (bool bInReplicateMovement)
 Sets the value of bReplicateMovement without causing other side effects to this instance.
 
void SetRole (ENetRole InRole)
 Sets the value of Role without causing other side effects to this instance.
 
bool SetRootComponent (USceneComponent *NewRootComponent)
 Sets root component to be the specified component. 更多...
 
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this actor can tick when paused.
 
void SetTickGroup (ETickingGroup NewTickGroup)
 Sets the ticking group for this actor. 更多...
 
virtual bool ShouldTickIfViewportsOnly () const
 If true, actor is ticked even if TickType==LEVELTICK_ViewportsOnly

 
void SwapRoles ()
 Calls this to swap the Role and RemoteRole. 更多...
 
virtual float TakeDamage (float DamageAmount, struct FDamageEvent const &DamageEvent, class AController *EventInstigator, AActor *DamageCauser)
 Apply damage to this actor. 更多...
 
virtual void TearOff ()
 Networking - Server - TearOff this actor to stop replication to clients. 更多...
 
virtual void TeleportSucceeded (bool bIsATest)
 Called from TeleportTo() when teleport succeeds
 
virtual bool TeleportTo (const FVector &DestLocation, const FRotator &DestRotation, bool bIsATest=false, bool bNoCheck=false)
 Used for adding actors to levels or teleporting them to a new location. 更多...
 
virtual void Tick (float DeltaSeconds)
 Function called every frame on this Actor. 更多...
 
virtual void TickActor (float DeltaTime, enum ELevelTick TickType, FActorTickFunction &ThisTickFunction)
 Dispatches the once-per frame Tick() function for this actor 更多...
 
virtual void TornOff ()
 Networking - called on client when actor is torn off (bTearOff==true), meaning it's no longer replicated to clients. 更多...
 
void UninitializeComponents ()
 Iterate over components array and call UninitializeComponent, called when the actor is ending play
 
virtual void UnregisterAllComponents (bool bForReregister=false)
 Unregister all currently registered components 更多...
 
void UpdateAllReplicatedComponents ()
 Completely synchronizes the replicated components array so that it contains exactly the number of replicated components currently owned
 
void UpdateComponentTransforms ()
 Update all components transforms
 
void UpdateOverlaps (bool bDoNotifies=true)
 Queries world and updates overlap detection state for this actor. 更多...
 
void UpdateReplicatedComponent (UActorComponent *Component)
 Called when the replicated state of a component changes to update the Actor's cached ReplicatedComponents array
 
void UserConstructionScript ()
 Construction script, the place to spawn components and do other setup. 更多...
 
virtual bool UseShortConnectTimeout () const
 Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value 更多...
 
bool WasRecentlyRendered (float Tolerance=0.2) const
 Returns true if this actor has been rendered "recently", with a tolerance in seconds to define what "recent" means. 更多...
 
- 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
 

Public 属性

APawn * AcknowledgedPawn
 Used in net games so client can acknowledge it possessed a specific pawn.
 
TSharedPtr< struct FActiveHapticFeedbackEffect > ActiveHapticEffect_Left
 Currently playing haptic effects for both the left and right hand
 
bool bAutoManageActiveCameraTarget
 True to allow this player controller to manage the camera target for you, typically by using the possessed pawn as the camera target. 更多...
 
uint32 bCinematicMode:1
 Is this player currently in cinematic mode? Prevents rotation/movement/firing/etc
 
uint32 bEnableClickEvents:1
 Whether actor/component click events should be generated.
 
uint32 bEnableMouseOverEvents:1
 Whether actor/component mouse over events should be generated.
 
uint32 bEnableTouchEvents:1
 Whether actor/component touch events should be generated.
 
uint32 bEnableTouchOverEvents:1
 Whether actor/component touch over events should be generated.
 
uint32 bHidePawnInCinematicMode:1
 When cinematic mode is true, signifies that this controller's pawn should be hidden
 
uint32 bIsUsingStreamingVolumes:1
 Whether this controller is using streaming volumes. 更多...
 
FRotator BlendedTargetViewRotation
 Smoothed version of TargetViewRotation to remove jerkiness from intermittent replication updates.
 
uint32 bPlayerIsWaiting:1
 True if PlayerController is currently waiting for the match to start or to respawn. 更多...
 
bool bRenderPrimitiveComponents
 Whether to render primitives component.
 
uint32 bShortConnectTimeOut:1
 When true, reduces connect timeout from InitialConnectionTimeOut to ConnectionTimeout. 更多...
 
uint32 bShowMouseCursor:1
 Whether the mouse cursor should be displayed.
 
TSubclassOf< UCheatManager > CheatClass
 Class of my CheatManager. 更多...
 
UCheatManager * CheatManager
 Object that manages "cheat" commands. 更多...
 
TArray< FKey > ClickEventKeys
 List of keys that will cause click events to be forwarded, default to left click
 
int32 ClientCap
 Cap set by server on bandwidth from client to server in bytes/sec (only has impact if >=2600)
 
UInterpTrackInstDirector * ControllingDirTrackInst
 Director track that's currently possessing this player controller, or none if not possessed.
 
TEnumAsByte< ECollisionChannel > CurrentClickTraceChannel
 Trace channel currently being used for determining what world object was clicked on.
 
TEnumAsByte< EMouseCursor::Type > CurrentMouseCursor
 Currently visible mouse cursor
 
TEnumAsByte< ECollisionChannel > DefaultClickTraceChannel
 Default trace channel used for determining what world object was clicked on.
 
TEnumAsByte< EMouseCursor::Type > DefaultMouseCursor
 Type of mouse cursor to show by default
 
TArray< FForceFeedbackEffectHistoryEntry > ForceFeedbackEffectHistoryEntries
 For debugging, shows the last force feeback effects that played
 
float ForceFeedbackScale
 Scale applied to force feedback values
 
FForceFeedbackValues ForceFeedbackValues
 Currently active force feedback weights
 
TArray< class AActor * > HiddenActors
 The actors which the camera shouldn't see - e.g. 更多...
 
TArray< TWeakObjectPtr< UPrimitiveComponent > > HiddenPrimitiveComponents
 Explicit components the camera shouldn't see (helpful for external systems to hide a component from a single player)
 
float HitResultTraceDistance
 Distance to trace when computing click events
 
float InputPitchScale
 Pitch input speed scaling
 
float InputRollScale
 Roll input speed scaling
 
float InputYawScale
 Yaw input speed scaling
 
uint16 LastCompletedSeamlessTravelCount
 The value of SeamlessTravelCount, upon the last call to GameModeBase::HandleSeamlessTravelPlayer; used to detect seamless travel
 
float LastSpectatorStateSynchTime
 Used to make sure the client is kept synchronized when in a spectator state
 
FVector LastSpectatorSyncLocation
 Last location synced on the server for a spectator.
 
FRotator LastSpectatorSyncRotation
 Last rotation synced on the server for a spectator.
 
float LocalPlayerCachedLODDistanceFactor
 Last used FOV based multiplier to distance to an object when determining if it exceeds the object's cull distance 更多...
 
FPlayerMuteList MuteList
 List of muted players in various categories
 
AHUD * MyHUD
 Heads up display associated with this PlayerController.
 
UNetConnection * NetConnection
 The net connection this controller is communicating on, nullptr for local players on server
 
uint8 NetPlayerIndex
 Index identifying players using the same base connection (splitscreen clients) Used by netcode to match replicated PlayerControllers to the correct splitscreen viewport and child connection replicated via special internal code, not through normal variable replication
 
TArray< FName > PendingMapChangeLevelNames
 List of names of levels the server is in the middle of sending us for a PrepareMapChange() call
 
UNetConnection * PendingSwapConnection
 This is set on the OLD PlayerController when performing a swap over a network connection so we know what connection we're waiting on acknowledgment from to finish destroying this PC (or when the connection is closed) 更多...
 
UPlayer * Player
 UPlayer associated with this PlayerController. 更多...
 
APlayerCameraManager * PlayerCameraManager
 Camera manager associated with this Player Controller.
 
TSubclassOf< APlayerCameraManager > PlayerCameraManagerClass
 PlayerCamera class should be set for each game, otherwise Engine.PlayerCameraManager is used
 
class UPlayerInput * PlayerInput
 Object that manages player input.
 
FRotator RotationInput
 Input axes values, accumulated each tick.
 
uint16 SeamlessTravelCount
 Counter for this players seamless travels (used along with the below value, to restrict ServerNotifyLoadedWorld)
 
float SmoothTargetViewRotationSpeed
 Interp speed for blending remote view rotation for smoother client updates
 
FRotator TargetViewRotation
 Used to replicate the view rotation of targets not owned/possessed by this PlayerController.
 
- Public 属性 继承自 AController
FInstigatedAnyDamageSignature OnInstigatedAnyDamage
 Called when the controller has instigated damage in any way
 
APlayerState * PlayerState
 PlayerState containing replicated information about the player using this controller (only exists for players, not NPCs).
 
TWeakObjectPtr< class AActor > StartSpot
 Actor marking where this controller spawned in.
 
FName StateName
 Current gameplay state this controller is in
 
- Public 属性 继承自 AActor
TEnumAsByte< EAutoReceiveInput::Type > AutoReceiveInput
 Automatically registers this actor to receive input from a player.
 
uint8 bActorIsBeingConstructed: 1
 Set while actor is being constructed. 更多...
 
uint8 bActorSeamlessTraveled:1
 Indicates the actor was pulled through a seamless travel. 更多...
 
uint8 bAllowTickBeforeBeginPlay:1
 Whether we allow this Actor to tick before it receives the BeginPlay event. 更多...
 
uint8 bAlwaysRelevant:1
 Always relevant for network (overrides bOnlyRelevantToOwner).
 
uint8 bBlockInput:1
 If true, all input on the stack below this actor will not be considered
 
uint8 bCollideWhenPlacing:1
 This actor collides with the world when placing in the editor, even if RootComponent collision is disabled. 更多...
 
uint8 bEnableAutoLODGeneration:1
 If true, and if World setting has bEnableHierarchicalLOD equal to true, then it will generate LODActor from groups of clustered Actor
 
uint8 bExchangedRoles:1
 Whether we have already exchanged Role/RemoteRole on the client, as when removing then re-adding a streaming level. 更多...
 
uint8 bFindCameraComponentWhenViewTarget:1
 If true, this actor should search for an owned camera component to view through when used as a view target.
 
uint8 bGenerateOverlapEventsDuringLevelStreaming:1
 If true, this actor will generate overlap Begin/End events when spawned as part of level streaming, which includes initial level load. 更多...
 
uint8 bIgnoresOriginShifting:1
 Whether this actor should not be affected by world origin shifting.
 
uint8 bIsEditorOnlyActor:1
 Whether this actor is editor-only. 更多...
 
TArray< UActorComponent * > BlueprintCreatedComponents
 Array of ActorComponents that are created by blueprints and serialized per-instance.
 
uint8 bNetLoadOnClient:1
 This actor will be loaded on network clients during map load
 
uint8 bNetStartup:1
 If true, this actor was loaded directly from the map, and for networking purposes can be addressed by its full path name
 
uint8 bNetTemporary:1
 If true, when the actor is spawned it will be sent to the client but receive no further replication updates from the server afterwards.
 
uint8 bNetUseOwnerRelevancy:1
 If actor has valid Owner, call Owner's IsNetRelevantFor and GetNetPriority
 
uint8 bOnlyRelevantToOwner:1
 If true, this actor is only relevant to its owner. 更多...
 
uint8 bRelevantForLevelBounds:1
 If true, this actor's component's bounds will be included in the level's bounding box unless the Actor's class has overridden IsLevelBoundsRelevant
 
uint8 bRelevantForNetworkReplays:1
 If true, this actor will be replicated to network replays (default is true)
 
uint8 bReplayRewindable:1
 If true, this actor will only be destroyed during scrubbing if the replay is set to a time before the actor existed. 更多...
 
TArray< AActor * > Children
 Array of all Actors whose Owner is this actor, these are not necessarily spawned by UChildActorComponent
 
float CreationTime
 The time this actor was created, relative to World->GetTimeSeconds(). 更多...
 
float CustomTimeDilation
 Allow each actor to run at a different time speed. 更多...
 
FRenderCommandFence DetachFence
 A fence to track when the primitive is detached from the scene in the rendering thread.
 
float InitialLifeSpan
 How long this Actor lives before dying, 0=forever. 更多...
 
class UInputComponent * InputComponent
 Component that handles input for this actor, if input is enabled.
 
int32 InputPriority
 The priority of this input component when pushed in to the stack.
 
TArray< FName > Layers
 Layers the actor belongs to. 更多...
 
float MinNetUpdateFrequency
 Used to determine what rate to throttle down to when replicated properties are changing infrequently
 
float NetCullDistanceSquared
 Square of the max distance from the client's viewpoint that this actor is relevant and will be replicated.
 
TEnumAsByte< enum ENetDormancy > NetDormancy
 Dormancy setting for actor to take itself off of the replication list without being destroyed on clients.
 
float NetPriority
 Priority for this actor when checking for replication in a low bandwidth or saturated situation, higher priority means it is more likely to replicate
 
int32 NetTag
 Internal - used by UNetDriver
 
float NetUpdateFrequency
 How often (per second) this actor will be considered for replication, used to determine NetUpdateTime
 
FActorBeginOverlapSignature OnActorBeginOverlap
 Called when another actor begins to overlap this actor, for example a player walking into a trigger. 更多...
 
FActorEndOverlapSignature OnActorEndOverlap
 Called when another actor stops overlapping this actor. 更多...
 
FActorHitSignature OnActorHit
 Called when this Actor hits (or is hit by) something solid. 更多...
 
FActorBeginCursorOverSignature OnBeginCursorOver
 Called when the mouse cursor is moved over this actor if mouse over events are enabled in the player controller.
 
FActorOnClickedSignature OnClicked
 Called when the left mouse button is clicked while the mouse is over this actor and click events are enabled in the player controller.
 
FActorDestroyedSignature OnDestroyed
 Event triggered when the actor has been explicitly destroyed.
 
FActorEndCursorOverSignature OnEndCursorOver
 Called when the mouse cursor is moved off this actor if mouse over events are enabled in the player controller.
 
FActorEndPlaySignature OnEndPlay
 Event triggered when the actor is being deleted or removed from a level.
 
FActorOnInputTouchBeginSignature OnInputTouchBegin
 Called when a touch input is received over this actor when touch events are enabled in the player controller.
 
FActorOnInputTouchEndSignature OnInputTouchEnd
 Called when a touch input is received over this component when touch events are enabled in the player controller.
 
FActorBeginTouchOverSignature OnInputTouchEnter
 Called when a finger is moved over this actor when touch over events are enabled in the player controller.
 
FActorEndTouchOverSignature OnInputTouchLeave
 Called when a finger is moved off this actor when touch over events are enabled in the player controller.
 
FActorOnReleasedSignature OnReleased
 Called when the left mouse button is released while the mouse is over this actor and click events are enabled in the player controller.
 
FTakeAnyDamageSignature OnTakeAnyDamage
 Called when the actor is damaged in any way.
 
FTakePointDamageSignature OnTakePointDamage
 Called when the actor is damaged by point damage.
 
FTakeRadialDamageSignature OnTakeRadialDamage
 Called when the actor is damaged by radial damage.
 
struct FActorTickFunction PrimaryActorTick
 Primary Actor tick function, which calls TickActor(). 更多...
 
ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingMethod
 Controls how to handle spawning this actor in a situation where it's colliding with something else. 更多...
 
TArray< FName > Tags
 Array of tags that can be used for grouping and categorizing.
 

Protected 成员函数

virtual void BeginPlay () override
 Overridable native event for when play begins for this actor.
 
virtual void BeginPlayingState ()
 Pawn has been possessed, so changing state to NAME_Playing. 更多...
 
virtual void BeginSpectatingState ()
 Event when spectating begins.
 
virtual void DestroySpectatorPawn ()
 Destroys the SpectatorPawn and sets it to nullptr.
 
virtual void EndPlayingState ()
 Leave playing state.
 
virtual void EndSpectatingState ()
 Event when no longer spectating.
 
virtual bool HasNetOwner () const override
 Overridden to return that player controllers are capable of RPCs
 
virtual void OnPossess (APawn *aPawn) override
 Overridable native function for when this controller is asked to possess a pawn. 更多...
 
virtual void OnUnPossess () override
 Overridable native function for when this controller unpossesses its pawn.
 
virtual void SetSpawnLocation (const FVector &NewLocation)
 Set the SpawnLocation for use when changing states or when there is no pawn or spectator.
 
virtual void SetSpectatorPawn (ASpectatorPawn *NewSpectatorPawn)
 Set the spectator pawn. 更多...
 
virtual void SetupInactiveStateInputComponent (UInputComponent *InComponent)
 Sets up input bindings for the input component pushed on the stack in the inactive state.
 
virtual void SetupInputComponent ()
 Allows the PlayerController to set up custom input bindings.
 
virtual bool ShouldKeepCurrentPawnUponSpectating () const
 Useful to spectate other pawn without un-possessing the current pawn
 
virtual ASpectatorPawn * SpawnSpectatorPawn ()
 Spawn a SpectatorPawn to use as a spectator and initialize it. 更多...
 
void TickPlayerInput (const float DeltaSeconds, const bool bGamePaused)
 Internal.
 
virtual void UpdateStateInputComponents ()
 Refresh state specific input components
 
- Protected 成员函数 继承自 AController
virtual void AddPawnTickDependency (APawn *NewPawn)
 Add dependency that makes us tick before the given Pawn. 更多...
 
virtual void AttachToPawn (APawn *InPawn)
 Physically attach the Controller to the specified Pawn, so that our position reflects theirs. 更多...
 
virtual void BeginInactiveState ()
 State entered when inactive (no possessed pawn, not spectating, etc).
 
virtual void DetachFromPawn ()
 Detach the RootComponent from its parent, but only if bAttachToPawn is true and it was attached to a Pawn. 更多...
 
virtual void EndInactiveState ()
 Called when leaving the inactive state
 
class USceneComponent * GetTransformComponent () const
 Returns TransformComponent subobject
 
bool IsValidControlRotation (FRotator CheckRotation) const
 Return false if rotation contains NaN or extremely large values (usually resulting from uninitialized values).
 
virtual void OnPossess (APawn *InPawn)
 Overridable native function for when this controller is asked to possess a pawn. 更多...
 
virtual void OnUnPossess ()
 Overridable native function for when this controller unpossesses its pawn.
 
void ReceiveInstigatedAnyDamage (float Damage, const class UDamageType *DamageType, class AActor *DamagedActor, class AActor *DamageCauser)
 Event when this controller instigates ANY damage
 
void ReceivePossess (APawn *PossessedPawn)
 Blueprint implementable event to react to the controller possessing a pawn
 
void ReceiveUnPossess (APawn *UnpossessedPawn)
 Blueprint implementable event to react to the controller unpossessing a pawn
 
virtual void RemovePawnTickDependency (APawn *InOldPawn)
 Remove dependency that makes us tick before the given Pawn. 更多...
 
- Protected 成员函数 继承自 AActor
virtual void BeginPlay ()
 Overridable native event for when play begins for this actor.
 
bool CheckActorComponents () const
 Checks components for validity, implemented in AActor
 
virtual void EndPlay (const EEndPlayReason::Type EndPlayReason)
 Overridable function called whenever this actor is being removed from a level
 
bool IsWithinNetRelevancyDistance (const FVector &SrcLocation) const
 Determines whether or not the distance between the given SrcLocation and the Actor's location is within the net relevancy distance. 更多...
 
virtual void OnRep_Owner ()
 Called when owner changes, does nothing by default but can be overridden
 
void PostCreateBlueprintComponent (UActorComponent *NewActorComp)
 Called after instancing a new Blueprint Component from either a template or cooked data.
 
void ProcessUserConstructionScript ()
 Runs UserConstructionScript, delays component registration until it's complete.
 
void ReceiveBeginPlay ()
 Event when play begins for this actor.
 
void ReceiveEndPlay (EEndPlayReason::Type EndPlayReason)
 Event to notify blueprints this actor is being deleted or removed from a level.
 
virtual void RegisterActorTickFunctions (bool bRegister)
 Virtual call chain to register all tick functions for the actor class hierarchy 更多...
 
void SetRemoteRoleForBackwardsCompat (const ENetRole InRemoteRole)
 This function should only be used in the constructor of classes that need to set the RemoteRole for backwards compatibility purposes
 
void SyncReplicatedPhysicsSimulation ()
 Sync IsSimulatingPhysics() with ReplicatedMovement.bRepPhysics
 
- 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 属性

TWeakObjectPtr< USceneComponent > AudioListenerAttenuationComponent
 Component that is used to only override where attenuation calculations are computed from.
 
FVector AudioListenerAttenuationOverride
 Currently overridden vector used to do attenuation calculations for listener.
 
TWeakObjectPtr< USceneComponent > AudioListenerComponent
 Component that is currently driving the audio listener position/orientation
 
FVector AudioListenerLocationOverride
 Currently overridden location of audio listener
 
FRotator AudioListenerRotationOverride
 Currently overridden rotation of audio listener
 
uint32 bCinemaDisableInputMove:1
 The state of the inputs from cinematic mode
 
uint32 bOverrideAudioAttenuationListener:1
 Whether to override the attenuation listener position.
 
uint32 bOverrideAudioListener:1
 Whether to override the normal audio listener positioning method
 
uint32 bShouldPerformFullTickWhenPaused: 1
 Whether we fully tick when the game is paused, if our tick function is allowed to do so. 更多...
 
TWeakObjectPtr< UPrimitiveComponent > CurrentClickablePrimitive
 Clickable object currently under the mouse cursor.
 
TArray< TWeakObjectPtr< UInputComponent > > CurrentInputStack
 Internal. 更多...
 
TWeakObjectPtr< UPrimitiveComponent > CurrentTouchablePrimitives [EKeys::NUM_TOUCH_KEYS]
 Touchable objects currently under fingers.
 
class UTouchInterface * CurrentTouchInterface
 The currently set touch interface
 
UInputComponent * InactiveStateInputComponent
 InputComponent we use when player is in Inactive state.
 
float LastMovementHitch
 Last real time (undilated) a hitch was detected in TickActor() when checking for forced client movement updates.
 
float LastMovementUpdateTime
 Last real time (undilated) recorded in TickActor() when checking for forced client movement updates.
 
FVector SpawnLocation
 The location used internally when there is no pawn or spectator, to know where to spawn the spectator or focus the camera on death.
 
FTimerHandle TimerHandle_UnFreeze
 Handle for efficient management of UnFreeze timer
 
TSharedPtr< class SVirtualJoystick > VirtualJoystick
 The virtual touch interface
 
- Protected 属性 继承自 AController
uint8 bAttachToPawn:1
 If true, the controller location will match the possessed Pawn's location. 更多...
 
uint8 bCanPossessWithoutAuthority:1
 Whether the controller must have authority to be able to call possess on a Pawn
 
uint8 bIsPlayerController:1
 Whether this controller is a PlayerController.
 
FRotator ControlRotation
 The control rotation of the Controller. 更多...
 
uint8 IgnoreLookInput
 Ignores look input. 更多...
 
uint8 IgnoreMoveInput
 Ignores movement input. 更多...
 
FPawnChangedSignature OnNewPawn
 Delegate broadcasted when possessing a new pawn or unpossessing one
 
- Protected 属性 继承自 AActor
uint8 bAllowReceiveTickEventOnDedicatedServer:1
 If false, the Blueprint ReceiveTick() event will be disabled on dedicated servers. 更多...
 
uint8 bCanBeInCluster:1
 If true, this actor can be put inside of a GC Cluster to improve Garbage Collection performance
 
uint8 bNetCheckedInitialPhysicsState: 1
 Flag indicating we have checked initial simulating physics state to sync networked proxies to the server.
 
uint8 bReplicates:1
 If true, this actor will replicate to remote machines 更多...
 
TArray< class AMatineeActor * > ControllingMatineeActors
 The matinee actors that control this actor.
 
FName NetDriverName
 Used to specify the net driver to replicate on (NAME_None || NAME_GameNetDriver is the default net driver)
 
TArray< UActorComponent * > ReplicatedComponents
 Set of replicated components, stored as an array to save space as this is generally not very large
 
USceneComponent * RootComponent
 The component that defines the transform (location, rotation, scale) of this Actor in the world, all other components must be attached to this one somehow
 
FTimerHandle TimerHandle_LifeSpanExpired
 Handle for efficient management of LifeSpanExpired timer
 
EActorUpdateOverlapsMethod UpdateOverlapsMethodDuringLevelStreaming
 Condition for calling UpdateOverlaps() to initialize overlap state when loaded in during level streaming. 更多...
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 AActor
static const FName GetCanBeDamagedPropertyName ()
 Gets the property name for bCanBeDamaged. 更多...
 
static FString GetDebugName (const AActor *Actor)
 Retrieves actor's name used for logging, or string "NULL" if Actor is null
 
static const FName GetHiddenPropertyName ()
 Gets the property name for bHidden. 更多...
 
static const FName GetInstigatorPropertyName ()
 Gets the property name for Instigator. 更多...
 
static const FName GetReplicateMovementPropertyName ()
 Gets the property name for bReplicateMovement. 更多...
 
static const FName GetRolePropertyName ()
 Gets the property name for Role. 更多...
 
static void MakeNoiseImpl (AActor *NoiseMaker, float Loudness, APawn *NoiseInstigator, const FVector &NoiseLocation, float MaxRange, FName Tag)
 Default Implementation of MakeNoise
 
static void SetMakeNoiseDelegate (const FMakeNoiseDelegate &NewDelegate)
 Modifies the global delegate used for handling MakeNoise
 
- 静态 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 属性 继承自 AActor
static FOnProcessEvent ProcessEventDelegate
 Delegate for globally hooking ProccessEvent calls - used by a non-public testing plugin
 
- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

PlayerControllers are used by human players to control Pawns.

ControlRotation (accessed via GetControlRotation()), determines the aiming orientation of the controlled Pawn.

In networked games, PlayerControllers exist on the server for every player-controlled pawn, and also on the controlling client's machine. They do NOT exist on a client's machine for pawns controlled by remote players elsewhere on the network.

参见
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Controller/PlayerController/
示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

成员函数说明

◆ AddPitchInput()

virtual void APlayerController::AddPitchInput ( float  Val)
virtual

Add Pitch (look up) input.

This value is multiplied by InputPitchScale.

参数
ValAmount to add to Pitch. This value is multiplied by InputPitchScale.

◆ AddRollInput()

virtual void APlayerController::AddRollInput ( float  Val)
virtual

Add Roll input.

This value is multiplied by InputRollScale.

参数
ValAmount to add to Roll. This value is multiplied by InputRollScale.

◆ AddYawInput()

virtual void APlayerController::AddYawInput ( float  Val)
virtual

Add Yaw (turn) input.

This value is multiplied by InputYawScale.

参数
ValAmount to add to Yaw. This value is multiplied by InputYawScale.

◆ AutoManageActiveCameraTarget()

virtual void APlayerController::AutoManageActiveCameraTarget ( AActor *  SuggestedTarget)
virtual

If bAutoManageActiveCameraTarget is true, then automatically manage the active camera target.

If there a CameraActor placed in the level with an auto-activate player assigned to it, that will be preferred, otherwise SuggestedTarget will be used.

◆ BeginPlayingState()

virtual void APlayerController::BeginPlayingState ( )
protectedvirtual

Pawn has been possessed, so changing state to NAME_Playing.

Start it walking and begin playing with it.

◆ BuildHiddenComponentList()

void APlayerController::BuildHiddenComponentList ( const FVector &  ViewLocation,
TSet< FPrimitiveComponentId > &  HiddenComponentsOut 
)

Builds a list of components that are hidden based upon gameplay.

This calls both UpdateHiddenActors and UpdateHiddenComponents, merging the two lists.

参数
ViewLocationthe view point to hide/unhide from
HiddenComponentsthis list will have all components that should be hidden added to it

◆ CalcCamera()

virtual void APlayerController::CalcCamera ( float  DeltaTime,
struct FMinimalViewInfo &  OutResult 
)
overridevirtual

Calculate camera view point, when viewing this actor.

参数
DeltaTimeDelta time seconds since last update
OutResultCamera configuration

重载 AActor .

◆ Camera()

virtual void APlayerController::Camera ( FName  NewMode)
virtual

Change Camera mode

参数
Newcamera mode to set

◆ CanRestartPlayer()

virtual bool APlayerController::CanRestartPlayer ( )
virtual

Returns true if this controller thinks it's able to restart.

Called from GameModeBase::PlayerCanRestart

◆ CleanupPlayerState()

virtual void APlayerController::CleanupPlayerState ( )
overridevirtual

Called from Destroyed().

Cleans up PlayerState.

重载 AController .

◆ ClientEnableNetworkVoice()

virtual void APlayerController::ClientEnableNetworkVoice ( bool  bEnable)
virtual

Tell the client to enable or disable voice chat (not muting)

参数
bEnableenable or disable voice chat

◆ ClientGameEnded()

void APlayerController::ClientGameEnded ( class AActor *  EndGameFocus,
bool  bIsWinner 
)

Replicated function called by GameHasEnded().

参数
EndGameFocus- actor to view with camera
bIsWinner- true if this controller is on winning team

◆ ClientGotoState()

void APlayerController::ClientGotoState ( FName  NewState)

Server uses this to force client into NewState .

@Note ALL STATE NAMES NEED TO BE DEFINED IN name table in UnrealNames.h to be correctly replicated (so they are mapped to the same thing on client and server).

◆ ClientMessage()

void APlayerController::ClientMessage ( const FString &  S,
FName  Type = NAME_None,
float  MsgLifeTime = 0.f 
)

Outputs a message to HUD

参数
S- message to display
Type-
待办事项:
document
参数
MsgLifeTime- Optional length of time to display 0 = default time

◆ ClientMutePlayer()

virtual void APlayerController::ClientMutePlayer ( FUniqueNetIdRepl  PlayerId)
virtual

Tell the client to mute a player for this controller

参数
PlayerIdplayer id to mute

◆ ClientPlayCameraAnim()

void APlayerController::ClientPlayCameraAnim ( class UCameraAnim *  AnimToPlay,
float  Scale = 1.f,
float  Rate = 1.f,
float  BlendInTime = 0.f,
float  BlendOutTime = 0.f,
bool  bLoop = false,
bool  bRandomStartTime = false,
ECameraShakePlaySpace  Space = ECameraShakePlaySpace::CameraLocal,
FRotator  CustomPlaySpace = FRotator::ZeroRotator 
)

Play the indicated CameraAnim on this camera.

参数
AnimToPlay- Camera animation to play
Scale- "Intensity" scalar. This is the scale at which the anim was first played.
Rate- Multiplier for playback rate. 1.0 = normal.
BlendInTime- Time to interpolate in from zero, for smooth starts
BlendOutTime- Time to interpolate out to zero, for smooth finishes
bLoop- True if the animation should loop, false otherwise
bRandomStartTime- Whether or not to choose a random time to start playing. Only really makes sense for bLoop = true
Space- Animation play area
CustomPlaySpace- Matrix used when Space = CAPS_UserDefined

◆ ClientPlayForceFeedback()

void APlayerController::ClientPlayForceFeedback ( class UForceFeedbackEffect *  ForceFeedbackEffect,
FForceFeedbackParameters  Params = FForceFeedbackParameters() 
)
inline

Play a force feedback pattern on the player's controller

参数
ForceFeedbackEffectThe force feedback pattern to play
ParamsParameter struct to customize playback behavior of the feedback effect

◆ ClientPlaySound()

void APlayerController::ClientPlaySound ( class USoundBase *  Sound,
float  VolumeMultiplier = 1.f,
float  PitchMultiplier = 1.f 
)

Play sound client-side (so only the client will hear it)

参数
Sound- Sound to play
VolumeMultiplier- Volume multiplier to apply to the sound
PitchMultiplier- Pitch multiplier to apply to the sound

◆ ClientPlaySoundAtLocation()

void APlayerController::ClientPlaySoundAtLocation ( class USoundBase *  Sound,
FVector  Location,
float  VolumeMultiplier = 1.f,
float  PitchMultiplier = 1.f 
)

Play sound client-side at the specified location

参数
Sound- Sound to play
Location- Location to play the sound at
VolumeMultiplier- Volume multiplier to apply to the sound
PitchMultiplier- Pitch multiplier to apply to the sound

◆ ClientPrepareMapChange()

void APlayerController::ClientPrepareMapChange ( FName  LevelName,
bool  bFirst,
bool  bLast 
)

Asynchronously loads the given level in preparation for a streaming map transition.

the server sends one function per level name since dynamic arrays can't be replicated

参数
LevelNames- the names of the level packages to load. LevelNames[0] will be the new persistent (primary) level
bFirst- whether this is the first item in the list (so clear the list first)
bLast- whether this is the last item in the list (so start preparing the change after receiving it)

◆ ClientPrestreamTextures()

void APlayerController::ClientPrestreamTextures ( class AActor *  ForcedActor,
float  ForceDuration,
bool  bEnableStreaming,
int32  CinematicTextureGroups = 0 
)

Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified actor.

参数
ForcedActor- The actor whose textures should be forced into memory.
ForceDuration- Number of seconds to keep all mip-levels in memory, disregarding the normal priority logic.
bEnableStreaming- Whether to start (true) or stop (false) streaming
CinematicTextureGroups- Bitfield indicating which texture groups that use extra high-resolution mips

◆ ClientSetBlockOnAsyncLoading()

void APlayerController::ClientSetBlockOnAsyncLoading ( )

Tells the client to block until all pending level streaming actions are complete.

Happens at the end of the tick primarily used to force update the client ASAP at join time.

◆ ClientSetCameraFade()

void APlayerController::ClientSetCameraFade ( bool  bEnableFading,
FColor  FadeColor = FColor(ForceInit),
FVector2D  FadeAlpha = FVector2D(-1.0f, 0.0f),
float  FadeTime = 0,
bool  bFadeAudio = false,
bool  bHoldWhenFinished = false 
)

Tell client to fade camera @Param bEnableFading - true if we should apply FadeColor/FadeAmount to the screen @Param FadeColor - Color to fade to @Param FadeAlpha - Contains the start fade (X) and end fade (Y) values to apply.

A start fade of less than 0 will use the screen's current fade value @Param FadeTime - length of time for fade to occur over @Param bFadeAudio - true to apply fading of audio alongside the video

参数
bHoldWhenFinished- True for fade to hold at the ToAlpha until fade is disabled

◆ ClientSetCameraMode()

void APlayerController::ClientSetCameraMode ( FName  NewCamMode)

Replicated function to set camera style on client

参数
NewCamMode,namedefining the new camera mode

◆ ClientSetForceMipLevelsToBeResident()

void APlayerController::ClientSetForceMipLevelsToBeResident ( class UMaterialInterface *  Material,
float  ForceDuration,
int32  CinematicTextureGroups = 0 
)

Forces the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by the specified material.

参数
Material- The material whose textures should be forced into memory.
ForceDuration- Number of seconds to keep all mip-levels in memory, disregarding the normal priority logic.
CinematicTextureGroups- Bitfield indicating which texture groups that use extra high-resolution mips

◆ ClientSetHUD()

void APlayerController::ClientSetHUD ( TSubclassOf< AHUD >  NewHUDClass)

Set the client's class of HUD and spawns a new instance of it.

If there was already a HUD active, it is destroyed.

◆ ClientSetViewTarget()

void APlayerController::ClientSetViewTarget ( class AActor *  A,
struct FViewTargetTransitionParams  TransitionParams = FViewTargetTransitionParams() 
)

Set the view target

参数
A- new actor to set as view target
TransitionParams- parameters to use for controlling the transition

◆ ClientSpawnCameraLensEffect()

void APlayerController::ClientSpawnCameraLensEffect ( TSubclassOf< class AEmitterCameraLensEffectBase >  LensEffectEmitterClass)

Spawn a camera lens effect (e.g.

blood).

◆ ClientStartCameraShake()

void APlayerController::ClientStartCameraShake ( TSubclassOf< class UCameraShakeBase >  Shake,
float  Scale = 1.f,
ECameraShakePlaySpace  PlaySpace = ECameraShakePlaySpace::CameraLocal,
FRotator  UserPlaySpaceRot = FRotator::ZeroRotator 
)

Play Camera Shake

参数
Shake- Camera shake animation to play
Scale- Scalar defining how "intense" to play the anim
PlaySpace- Which coordinate system to play the shake in (used for CameraAnims within the shake).
UserPlaySpaceRot- Matrix used when PlaySpace = CAPS_UserDefined

◆ ClientStartCameraShakeFromSource()

void APlayerController::ClientStartCameraShakeFromSource ( TSubclassOf< class UCameraShakeBase >  Shake,
class UCameraShakeSourceComponent *  SourceComponent 
)

Play Camera Shake localized to a given source

参数
Shake- Camera shake animation to play
SourceComponent- The source from which the camera shakes originates

◆ ClientStopCameraShake()

void APlayerController::ClientStopCameraShake ( TSubclassOf< class UCameraShakeBase >  Shake,
bool  bImmediately = true 
)

Stop camera shake on client.


◆ ClientStopCameraShakesFromSource()

void APlayerController::ClientStopCameraShakesFromSource ( class UCameraShakeSourceComponent *  SourceComponent,
bool  bImmediately = true 
)

Stop camera shake on client.


◆ ClientStopForceFeedback()

void APlayerController::ClientStopForceFeedback ( class UForceFeedbackEffect *  ForceFeedbackEffect,
FName  Tag 
)

Stops a playing force feedback pattern

参数
ForceFeedbackEffectIf set only patterns from that effect will be stopped
TagIf not none only the pattern with this tag will be stopped

◆ ClientTeamMessage()

void APlayerController::ClientTeamMessage ( class APlayerState *  SenderPlayerState,
const FString &  S,
FName  Type,
float  MsgLifeTime = 0 
)
待办事项:
document

◆ ClientTravel()

void APlayerController::ClientTravel ( const FString &  URL,
enum ETravelType  TravelType,
bool  bSeamless = false,
FGuid  MapPackageGuid = FGuid() 
)

Travel to a different map or IP address.

Calls the PreClientTravel event before doing anything. NOTE: This is implemented as a locally executed wrapper for ClientTravelInternal, to avoid API compatability breakage

参数
URLA string containing the mapname (or IP address) to travel to, along with option key/value pairs
TravelTypespecifies whether the client should append URL options used in previous travels; if true is specified for the bSeamlesss parameter, this value must be TRAVEL_Relative.
bSeamlessIndicates whether to use seamless travel (requires TravelType of TRAVEL_Relative)
MapPackageGuidThe GUID of the map package to travel to - this is used to find the file when it has been autodownloaded, so it is only needed for clients

◆ ClientTravelInternal()

void APlayerController::ClientTravelInternal ( const FString &  URL,
enum ETravelType  TravelType,
bool  bSeamless = false,
FGuid  MapPackageGuid = FGuid() 
)

Internal clientside implementation of ClientTravel - use ClientTravel to call this

参数
URLA string containing the mapname (or IP address) to travel to, along with option key/value pairs
TravelTypespecifies whether the client should append URL options used in previous travels; if true is specified for the bSeamlesss parameter, this value must be TRAVEL_Relative.
bSeamlessIndicates whether to use seamless travel (requires TravelType of TRAVEL_Relative)
MapPackageGuidThe GUID of the map package to travel to - this is used to find the file when it has been autodownloaded, so it is only needed for clients

◆ ClientUnmutePlayer()

virtual void APlayerController::ClientUnmutePlayer ( FUniqueNetIdRepl  PlayerId)
virtual

Tell the client to unmute a player for this controller

参数
PlayerIdplayer id to unmute

◆ ClientUpdateLevelStreamingStatus()

void APlayerController::ClientUpdateLevelStreamingStatus ( FName  PackageName,
bool  bNewShouldBeLoaded,
bool  bNewShouldBeVisible,
bool  bNewShouldBlockOnLoad,
int32  LODIndex 
)

Replicated Update streaming status

参数
PackageName- Name of the level package name used for loading.
bNewShouldBeLoaded- Whether the level should be loaded
bNewShouldBeVisible- Whether the level should be visible if it is loaded
bNewShouldBlockOnLoad- Whether we want to force a blocking load
LODIndex- Current LOD index for a streaming level

◆ ClientUpdateMultipleLevelsStreamingStatus()

void APlayerController::ClientUpdateMultipleLevelsStreamingStatus ( const TArray< FUpdateLevelStreamingLevelStatus > &  LevelStatuses)

Replicated Update streaming status.

This version allows for the streaming state of many levels to be sent in a single RPC.

参数
LevelStatusesThe list of levels the client should have either streamed in or not, depending on state.

◆ ClientVoiceHandshakeComplete()

virtual void APlayerController::ClientVoiceHandshakeComplete ( )
virtual

Tells the client that the server has all the information it needs and that it is ok to start sending voice packets.

The server will already send voice packets when this function is called, since it is set server side and then forwarded

NOTE: This is done as an RPC instead of variable replication because ordering matters

◆ ConsoleCommand()

virtual FString APlayerController::ConsoleCommand ( const FString &  Command,
bool  bWriteToLog = true 
)
virtual

Executes the Exec() command on the UPlayer object

参数
Commandcommand to execute (string of commands optionally separated by a | (pipe))
bWriteToLogwrite out to the log

被 ADebugCameraController 重载.

◆ DefaultCanUnpause()

virtual bool APlayerController::DefaultCanUnpause ( )
virtual

Default implementation of pausing check for 'CanUnpause' delegates

返回
True if pausing is allowed

◆ DeprojectMousePositionToWorld()

bool APlayerController::DeprojectMousePositionToWorld ( FVector &  WorldLocation,
FVector &  WorldDirection 
) const

Convert current mouse 2D position to World Space 3D position and direction.

Returns false if unable to determine value.

◆ DeprojectScreenPositionToWorld()

bool APlayerController::DeprojectScreenPositionToWorld ( float  ScreenX,
float  ScreenY,
FVector &  WorldLocation,
FVector &  WorldDirection 
) const

Convert 2D screen position to World Space 3D position and direction.

Returns false if unable to determine value.

◆ DestroyNetworkActorHandled()

virtual bool APlayerController::DestroyNetworkActorHandled ( )
overridevirtual

Called by DestroyActor(), gives actors a chance to op out of actor destruction Used by network code to have the net connection timeout/cleanup first

返回
true if DestroyActor() should not continue with actor destruction, false otherwise

重载 AActor .

◆ DisableInput()

virtual void APlayerController::DisableInput ( class APlayerController *  PlayerController)
overridevirtual

Removes this actor from the stack of input being handled by a PlayerController.

参数
PlayerControllerThe PlayerController whose input events we no longer want to receive. If null, this actor will stop receiving input from all PlayerControllers.

重载 AActor .

◆ EnableInput()

virtual void APlayerController::EnableInput ( class APlayerController *  PlayerController)
overridevirtual

Pushes this actor on to the stack of input being handled by a PlayerController.

参数
PlayerControllerThe PlayerController whose input events we want to receive.

重载 AActor .

◆ GameHasEnded()

virtual void APlayerController::GameHasEnded ( class AActor *  EndGameFocus = nullptr,
bool  bIsWinner = false 
)
overridevirtual

Called from game mode upon end of the game, used to transition to proper state.

参数
EndGameFocusActor to set as the view target on end game
bIsWinnertrue if this controller is on winning team

重载 AController .

◆ GameplayMutePlayer()

void APlayerController::GameplayMutePlayer ( const FUniqueNetIdRepl &  PlayerNetId)

Mutes a remote player on the server and then tells the client to mute

参数
PlayerNetIdthe remote player to mute

◆ GameplayUnmutePlayer()

void APlayerController::GameplayUnmutePlayer ( const FUniqueNetIdRepl &  PlayerNetId)

Unmutes a remote player on the server and then tells the client to unmute

参数
PlayerNetIdthe remote player to unmute

◆ GetActorEyesViewPoint()

virtual void APlayerController::GetActorEyesViewPoint ( FVector &  OutLocation,
FRotator &  OutRotation 
) const
overridevirtual

Returns the point of view of the actor.

Note that this doesn't mean the camera, but the 'eyes' of the actor. For example, for a Pawn, this would define the eye height location, and view rotation (which is different from the pawn rotation which has a zeroed pitch component). A camera first person view will typically use this view point. Most traces (weapon, AI) will be done from this view point.

参数
OutLocation- location of view point
OutRotation- view rotation of actor.

重载 AController .

◆ GetFocalLocation()

virtual FVector APlayerController::GetFocalLocation ( ) const
virtual

Returns the location the PlayerController is focused on.

If there is a possessed Pawn, returns the Pawn's location. If there is a spectator Pawn, returns that Pawn's location. Otherwise, returns the PlayerController's spawn location (usually the last known Pawn location after it has died).

◆ GetInputAnalogKeyState()

float APlayerController::GetInputAnalogKeyState ( FKey  Key) const

Returns the analog value for the given key/button.

If analog isn't supported, returns 1 for down and 0 for up.

◆ GetInputKeyTimeDown()

float APlayerController::GetInputKeyTimeDown ( FKey  Key) const

Returns how long the given key/button has been down.

Returns 0 if it's up or it just went down this frame.

◆ GetInputTouchState()

void APlayerController::GetInputTouchState ( ETouchIndex::Type  FingerIndex,
float &  LocationX,
float &  LocationY,
bool &  bIsCurrentlyPressed 
) const

Retrieves the X and Y screen coordinates of the specified touch key.

Returns false if the touch index is not down

◆ GetMousePosition()

bool APlayerController::GetMousePosition ( float &  LocationX,
float &  LocationY 
) const

Retrieves the X and Y screen coordinates of the mouse cursor.

Returns false if there is no associated mouse device

◆ GetNetConnection()

virtual class UNetConnection * APlayerController::GetNetConnection ( ) const
overridevirtual

Get the owning connection used for communicating between client/server

返回
NetConnection to the client or server for this actor

重载 AActor .

◆ GetNetOwner()

virtual const AActor * APlayerController::GetNetOwner ( ) const
overridevirtual

Return the actor responsible for replication, if any.

Typically the player controller

重载 AActor .

◆ GetNetOwningPlayer()

virtual class UPlayer * APlayerController::GetNetOwningPlayer ( )
overridevirtual

Return the owning UPlayer (if any) of this actor.

This will be a local player, a net connection, or nullptr.

重载 AActor .

◆ GetNetPriority()

virtual float APlayerController::GetNetPriority ( const FVector &  ViewPos,
const FVector &  ViewDir,
AActor *  Viewer,
AActor *  ViewTarget,
UActorChannel *  InChannel,
float  Time,
bool  bLowBandwidth 
)
overridevirtual

Function used to prioritize actors when deciding which to replicate

参数
ViewPosPosition of the viewer
ViewDirVector direction of viewer
Viewer"net object" owned by the client for whom net priority is being determined (typically player controller)
ViewTargetThe actor that is currently being viewed/controlled by Viewer, usually a pawn
InChannelChannel on which this actor is being replicated.
TimeTime since actor was last replicated
bLowBandwidthTrue if low bandwidth of viewer
返回
Priority of this actor for replication, higher is more important

重载 AActor .

◆ GetNextViewablePlayer()

virtual class APlayerState * APlayerController::GetNextViewablePlayer ( int32  dir)
virtual

Get next active viewable player in PlayerArray.

参数
diris the direction to go in the array

◆ GetPlayerControllerForMuting()

virtual class APlayerController * APlayerController::GetPlayerControllerForMuting ( const FUniqueNetIdRepl &  PlayerNetId)
virtual

Get a remote player controller on the server for muting

参数
PlayerNetIdthe remote player to find

◆ GetPlayerNetworkAddress()

FString APlayerController::GetPlayerNetworkAddress ( )

Get the local players network address

返回
the address

◆ GetPlayerViewPoint()

virtual void APlayerController::GetPlayerViewPoint ( FVector &  Location,
FRotator &  Rotation 
) const
overridevirtual

Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint

@output out_Location, view location of player @output out_rotation, view rotation of player

重载 AController .

◆ GetSeamlessTravelActorList()

virtual void APlayerController::GetSeamlessTravelActorList ( bool  bToEntry,
TArray< class AActor * > &  ActorList 
)
virtual

Called on client during seamless level transitions to get the list of Actors that should be moved into the new level PlayerControllers, Role < ROLE_Authority Actors, and any non-Actors that are inside an Actor that is in the list (i.e.

Object.Outer == Actor in the list) are all automatically moved regardless of whether they're included here only dynamic actors in the PersistentLevel may be moved (this includes all actors spawned during gameplay) this is called for both parts of the transition because actors might change while in the middle (e.g. players might join or leave the game)

参见
also GameModeBase::GetSeamlessTravelActorList() (the function that's called on servers)
参数
bToEntrytrue if we are going from old level -> entry, false if we are going from entry -> new level
ActorList(out) list of actors to maintain

◆ GetServerNetworkAddress()

FString APlayerController::GetServerNetworkAddress ( )

Get the server network address

返回
the adress

◆ GetSpectatorPawn()

ASpectatorPawn * APlayerController::GetSpectatorPawn ( ) const
inline

Get the Pawn used when spectating.

nullptr when not spectating.

◆ GetSplitscreenPlayerByIndex()

class APlayerState * APlayerController::GetSplitscreenPlayerByIndex ( int32  PlayerIndex = 1) const

Returns the PlayerState associated with the player at the specified index.

参数
PlayerIndexthe index [into the local player's GamePlayers array] for the player PlayerState to find
返回
the PlayerState associated with the player at the specified index, or None if the player is not a split-screen player or the index was out of range.

◆ GetSplitscreenPlayerCount()

int32 APlayerController::GetSplitscreenPlayerCount ( ) const

Returns the number of split-screen players playing on this player's machine.

返回
the total number of players on the player's local machine, or 0 if this player isn't playing split-screen.

◆ GetViewportSize()

void APlayerController::GetViewportSize ( int32 &  SizeX,
int32 &  SizeY 
) const

Helper to get the size of the HUD canvas for this player controller.

Returns 0 if there is no HUD

◆ InitInputSystem()

virtual void APlayerController::InitInputSystem ( )
virtual

Spawn the appropriate class of PlayerInput.

Only called for playercontrollers that belong to local players.

◆ IsLocalController()

virtual bool APlayerController::IsLocalController ( ) const
overridevirtual

Returns whether this Controller is a local controller.


重载 AController .

◆ IsNetRelevantFor()

virtual bool APlayerController::IsNetRelevantFor ( const AActor *  RealViewer,
const AActor *  ViewTarget,
const FVector &  SrcLocation 
) const
overridevirtual

Checks to see if this actor is relevant for a specific network connection

参数
RealViewer- is the "controlling net object" associated with the client for which network relevancy is being checked (typically player controller)
ViewTarget- is the Actor being used as the point of view for the RealViewer
SrcLocation- is the viewing location
返回
bool - true if this actor is network relevant to the client associated with RealViewer

重载 AActor .

◆ IsPlayerMuted()

virtual bool APlayerController::IsPlayerMuted ( const class FUniqueNetId &  PlayerId)
virtual

Is the specified player muted by this controlling player for any reason (gameplay, system, etc), check voice interface IsMuted() for system mutes

参数
PlayerIdpotentially muted player
返回
true if player is muted, false otherwise

◆ IsPrimaryPlayer()

bool APlayerController::IsPrimaryPlayer ( ) const

Wrapper for determining whether this player is the first player on their console.

返回
true if this player is not using splitscreen, or is the first player in the split-screen layout.

◆ IsSplitscreenPlayer()

bool APlayerController::IsSplitscreenPlayer ( int32 *  OutSplitscreenPlayerIndex = nullptr) const

Determines whether this player is playing split-screen.

参数
OutSplitscreenPlayerIndexreceives the index [into the player's local GamePlayers array] for this player, if playing splitscreen.
返回
true if this player is playing splitscreen.

◆ K2_ClientPlayForceFeedback()

void APlayerController::K2_ClientPlayForceFeedback ( class UForceFeedbackEffect *  ForceFeedbackEffect,
FName  Tag,
bool  bLooping,
bool  bIgnoreTimeDilation,
bool  bPlayWhilePaused 
)

Play a force feedback pattern on the player's controller

参数
ForceFeedbackEffectThe force feedback pattern to play
bLoopingWhether the pattern should be played repeatedly or be a single one shot
bIgnoreTimeDilationWhether the pattern should ignore time dilation
bPlayWhilePausedWhether the pattern should continue to play while the game is paused
TagA tag that allows stopping of an effect. If another effect with this Tag is playing, it will be stopped and replaced

◆ NotifyLoadedWorld()

virtual void APlayerController::NotifyLoadedWorld ( FName  WorldPackageName,
bool  bFinalDest 
)
virtual

Called to notify the server when the client has loaded a new world via seamless traveling

参数
WorldPackageNamethe name of the world package that was loaded
bFinalDestwhether this world is the destination map for the travel (i.e. not the transition level)

◆ NotifyServerReceivedClientData()

virtual bool APlayerController::NotifyServerReceivedClientData ( APawn *  InPawn,
float  TimeStamp 
)
virtual

Notify the server that client data was received on the Pawn.

返回
true if InPawn is acknowledged on the server, false otherwise.

◆ OnActorChannelOpen()

virtual void APlayerController::OnActorChannelOpen ( class FInBunch &  InBunch,
class UNetConnection *  Connection 
)
overridevirtual

Allows for a specific response from the actor when the actor channel is opened (client side)

参数
InBunchBunch received at time of open
Connectionthe connection associated with this actor

重载 AActor .

◆ OnNetCleanup()

virtual void APlayerController::OnNetCleanup ( class UNetConnection *  Connection)
overridevirtual

Handles cleaning up the associated Actor when killing the connection

参数
Connectionthe connection associated with this actor

重载 AActor .

◆ OnPossess()

virtual void APlayerController::OnPossess ( APawn *  InPawn)
overrideprotectedvirtual

Overridable native function for when this controller is asked to possess a pawn.

参数
InPawnThe Pawn to be possessed

重载 AController .

◆ OnSerializeNewActor()

virtual void APlayerController::OnSerializeNewActor ( class FOutBunch &  OutBunch)
overridevirtual

SerializeNewActor has just been called on the actor before network replication (server side)

参数
OutBunchBunch containing serialized contents of actor prior to replication

重载 AActor .

◆ PawnLeavingGame()

virtual void APlayerController::PawnLeavingGame ( )
virtual

Clean up when a Pawn's player is leaving a game.

Base implementation destroys the pawn.

◆ PlayDynamicForceFeedback()

FDynamicForceFeedbackHandle APlayerController::PlayDynamicForceFeedback ( float  Intensity,
float  Duration,
bool  bAffectsLeftLarge,
bool  bAffectsLeftSmall,
bool  bAffectsRightLarge,
bool  bAffectsRightSmall,
EDynamicForceFeedbackAction::Type  Action = EDynamicForceFeedbackAction::Start,
FDynamicForceFeedbackHandle  ActionHandle = 0 
)

Allows playing of a dynamic force feedback event from native code Begins playing when Start is called.

Calling with Action set to Update or Stop if the feedback is not active will have no effect. When Update is called the Intensity, Duration, and affect values will be updated

参数
IntensityHow strong the feedback should be. Valid values are between 0.0 and 1.0
DurationHow long the feedback should play for. If the value is negative it will play until stopped
bAffectsLeftLargeWhether the intensity should be applied to the large left servo
bAffectsLeftSmallWhether the intensity should be applied to the small left servo
bAffectsRightLargeWhether the intensity should be applied to the large right servo
bAffectsRightSmallWhether the intensity should be applied to the small right servo
ActionWhether to (re)start, update, or stop the action
UniqueIDThe ID returned by the start action when wanting to restart, update, or stop the action
返回
The index to pass in to the function to update the latent action in the future if needed. Returns 0 if the feedback was stopped or the specified UniqueID did not map to an action that can be started/updated.

◆ PlayerTick()

virtual void APlayerController::PlayerTick ( float  DeltaTime)
virtual

Processes player input (immediately after PlayerInput gets ticked) and calls UpdateRotation().

PlayerTick is only called if the PlayerController has a PlayerInput object. Therefore, it will only be called for locally controlled PlayerControllers.

◆ PlayHapticEffect()

void APlayerController::PlayHapticEffect ( class UHapticFeedbackEffect_Base *  HapticEffect,
EControllerHand  Hand,
float  Scale = 1.f,
bool  bLoop = false 
)

Play a haptic feedback curve on the player's controller

参数
HapticEffectThe haptic effect to play
HandWhich hand to play the effect on
ScaleScale between 0.0 and 1.0 on the intensity of playback

◆ PostLoad()

virtual void APlayerController::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.

重载 AActor .

◆ PostProcessWorldToScreen()

virtual bool APlayerController::PostProcessWorldToScreen ( FVector  WorldLocation,
FVector2D &  ScreenLocation,
bool  bPlayerViewportRelative 
) const
virtual

After successful world to screen projection, allows custom post-processing of the resulting ScreenLocation.

返回
Whether projected location remains valid.

◆ PreClientTravel()

virtual void APlayerController::PreClientTravel ( const FString &  PendingURL,
ETravelType  TravelType,
bool  bIsSeamlessTravel 
)
virtual

Called when the local player is about to travel to a new map or IP address.

Provides subclass with an opportunity to perform cleanup or other tasks prior to the travel.

◆ ProjectWorldLocationToScreen()

bool APlayerController::ProjectWorldLocationToScreen ( FVector  WorldLocation,
FVector2D &  ScreenLocation,
bool  bPlayerViewportRelative = false 
) const

Convert a World Space 3D position into a 2D Screen Space position.

返回
true if the world coordinate was successfully projected to the screen.

◆ ProjectWorldLocationToScreenWithDistance()

bool APlayerController::ProjectWorldLocationToScreenWithDistance ( FVector  WorldLocation,
FVector &  ScreenLocation,
bool  bPlayerViewportRelative = false 
) const

Convert a World Space 3D position into a 3D Screen Space position.

返回
true if the world coordinate was successfully projected to the screen.

◆ ReceivedGameModeClass()

virtual void APlayerController::ReceivedGameModeClass ( TSubclassOf< class AGameModeBase >  GameModeClass)
virtual

This function will be called to notify the player controller that the world has received its game class.

In the case of a client we need to initialize the Input System here.

@Param GameModeClass - The Class of the game that was replicated

◆ SendClientAdjustment()

virtual void APlayerController::SendClientAdjustment ( )
virtual

Called on server at end of tick, to let client Pawns handle updates from the server.

Done this way to avoid ever sending more than one ClientAdjustment per server tick.

◆ ServerExecRPC()

void APlayerController::ServerExecRPC ( const FString &  Msg)

RPC used by ServerExec.

Not intended to be called directly

◆ ServerMutePlayer()

virtual void APlayerController::ServerMutePlayer ( FUniqueNetIdRepl  PlayerId)
virtual

Tell the server to mute a player for this controller

参数
PlayerIdplayer id to mute

◆ ServerNotifyLoadedWorld()

void APlayerController::ServerNotifyLoadedWorld ( FName  WorldPackageName)

Called to notify the server when the client has loaded a new world via seamless traveling

参数
WorldPackageNamethe name of the world package that was loaded

◆ ServerUnmutePlayer()

virtual void APlayerController::ServerUnmutePlayer ( FUniqueNetIdRepl  PlayerId)
virtual

Tell the server to unmute a player for this controller

参数
PlayerIdplayer id to unmute

◆ ServerUpdateLevelVisibility()

void APlayerController::ServerUpdateLevelVisibility ( const FUpdateLevelVisibilityLevelInfo &  LevelVisibility)

Called when the client adds/removes a streamed level.

The server will only replicate references to Actors in visible levels so that it's impossible to send references to Actors the client has not initialized.

参数
LevelVisibilityVisibility state for the level whose state changed.

◆ ServerUpdateMultipleLevelsVisibility()

void APlayerController::ServerUpdateMultipleLevelsVisibility ( const TArray< FUpdateLevelVisibilityLevelInfo > &  LevelVisibilities)

Called when the client adds/removes a streamed level.

This version of the function allows you to pass the state of multiple levels at once, to reduce the number of RPC events that will be sent.

参数
LevelVisibilitiesVisibility state for each level whose state has changed

◆ SetAudioListenerOverride()

void APlayerController::SetAudioListenerOverride ( USceneComponent *  AttachToComponent,
FVector  Location,
FRotator  Rotation 
)

Used to override the default positioning of the audio listener

参数
AttachToComponentOptional component to attach the audio listener to
LocationDepending on whether Component is attached this is either an offset from its location or an absolute position
RotationDepending on whether Component is attached this is either an offset from its rotation or an absolute rotation

◆ SetCinematicMode() [1/2]

virtual void APlayerController::SetCinematicMode ( bool  bInCinematicMode,
bool  bAffectsMovement,
bool  bAffectsTurning 
)
virtual

Adjust input based on cinematic mode

参数
bInCinematicModespecify true if the player is entering cinematic mode; false if the player is leaving cinematic mode.
bAffectsMovementspecify true to disable movement in cinematic mode, enable it when leaving
bAffectsTurningspecify true to disable turning in cinematic mode or enable it when leaving

◆ SetCinematicMode() [2/2]

virtual void APlayerController::SetCinematicMode ( bool  bInCinematicMode,
bool  bHidePlayer,
bool  bAffectsHUD,
bool  bAffectsMovement,
bool  bAffectsTurning 
)
virtual

Server/SP only function for changing whether the player is in cinematic mode.

Updates values of various state variables, then replicates the call to the client to sync the current cinematic mode.

参数
bInCinematicModespecify true if the player is entering cinematic mode; false if the player is leaving cinematic mode.
bHidePlayerspecify true to hide the player's pawn (only relevant if bInCinematicMode is true)
bAffectsHUDspecify true if we should show/hide the HUD to match the value of bCinematicMode
bAffectsMovementspecify true to disable movement in cinematic mode, enable it when leaving
bAffectsTurningspecify true to disable turning in cinematic mode or enable it when leaving

◆ SetControllerLightColor()

void APlayerController::SetControllerLightColor ( FColor  Color)

Sets the light color of the player's controller

参数
ColorThe color for the light to be

◆ SetControllingDirector()

void APlayerController::SetControllingDirector ( UInterpTrackInstDirector *  NewControllingDirector,
bool  bClientSimulatingViewTarget 
)

Sets the Matinee director track instance that's currently possessing this player controller

参数
NewControllingDirectorThe director track instance that's now controlling this player controller (or nullptr for none)
bClientSimulatingViewTargetTrue to allow clients to simulate their own camera cuts (ignored if NewControllingDirector is nullptr).

◆ SetDisableHaptics()

virtual void APlayerController::SetDisableHaptics ( bool  bNewDisabled)
virtual

Allows the player controller to disable all haptic requests from being fired, e.g.

in the case of a level loading

参数
bNewDisabledIf TRUE, the haptics will stop and prevented from being enabled again until set to FALSE

◆ SetHapticsByValue()

void APlayerController::SetHapticsByValue ( const float  Frequency,
const float  Amplitude,
EControllerHand  Hand 
)

Sets the value of the haptics for the specified hand directly, using frequency and amplitude.

NOTE: If a curve is already playing for this hand, it will be cancelled in favour of the specified values.

参数
FrequencyThe normalized frequency [0.0, 1.0] to play through the haptics system
AmplitudeThe normalized amplitude [0.0, 1.0] to set the haptic feedback to
HandWhich hand to play the effect on

◆ SetInitialLocationAndRotation()

virtual void APlayerController::SetInitialLocationAndRotation ( const FVector &  NewLocation,
const FRotator &  NewRotation 
)
overridevirtual

Set the initial location and rotation of the controller, as well as the control rotation.

Typically used when the controller is first created.

重载 AController .

◆ SetMouseCursorWidget()

void APlayerController::SetMouseCursorWidget ( EMouseCursor::Type  Cursor,
class UUserWidget *  CursorWidget 
)

Sets the Widget for the Mouse Cursor to display

参数
Cursor- the cursor to set the widget for
CursorWidget- the widget to set the cursor to

◆ SetNetSpeed()

void APlayerController::SetNetSpeed ( int32  NewSpeed)

Store the net speed

参数
NewSpeedcurrent speed of network

◆ SetPause()

virtual bool APlayerController::SetPause ( bool  bPause,
FCanUnpause  CanUnpauseDelegate = FCanUnpause() 
)
virtual

Locally try to pause game (call serverpause to pause network game); returns success indicator.

Calls GameModeBase's SetPause().

返回
true if succeeded to pause

◆ SetPawn()

virtual void APlayerController::SetPawn ( APawn *  InPawn)
overridevirtual

Setter for Pawn.

Normally should only be used internally when possessing/unpossessing a Pawn.

重载 AController .

◆ SetSpectatorPawn()

virtual void APlayerController::SetSpectatorPawn ( ASpectatorPawn *  NewSpectatorPawn)
protectedvirtual

Set the spectator pawn.

Will also call AttachToPawn() using the new spectator.

被 ADebugCameraController 重载.

◆ SetViewTarget()

virtual void APlayerController::SetViewTarget ( class AActor *  NewViewTarget,
FViewTargetTransitionParams  TransitionParams = FViewTargetTransitionParams() 
)
virtual

Set the view target

参数
A- new actor to set as view target
TransitionParams- parameters to use for controlling the transition

◆ SetViewTargetWithBlend()

virtual void APlayerController::SetViewTargetWithBlend ( class AActor *  NewViewTarget,
float  BlendTime = 0,
enum EViewTargetBlendFunction  BlendFunc = VTBlend_Linear,
float  BlendExp = 0,
bool  bLockOutgoing = false 
)
virtual

Set the view target blending with variable control

参数
NewViewTarget- new actor to set as view target
BlendTime- time taken to blend
BlendFunc- Cubic, Linear etc functions for blending
BlendExp- Exponent, used by certain blend functions to control the shape of the curve.
bLockOutgoing- If true, lock outgoing viewtarget to last frame's camera position for the remainder of the blend.

◆ ShouldPerformFullTickWhenPaused()

bool APlayerController::ShouldPerformFullTickWhenPaused ( ) const

Returns true if we fully tick when paused (and if our tick function is enabled when paused).


◆ SmoothTargetViewRotation()

virtual void APlayerController::SmoothTargetViewRotation ( APawn *  TargetPawn,
float  DeltaSeconds 
)
virtual

Called client-side to smoothly interpolate received TargetViewRotation (result is in BlendedTargetViewRotation)

参数
TargetPawnis the pawn which is the current ViewTarget
DeltaSecondsis the time interval since the last smoothing update

◆ SpawnSpectatorPawn()

virtual ASpectatorPawn * APlayerController::SpawnSpectatorPawn ( )
protectedvirtual

Spawn a SpectatorPawn to use as a spectator and initialize it.

By default it is spawned at the PC's current location and rotation.

被 ADebugCameraController 重载.

◆ StopHapticEffect()

void APlayerController::StopHapticEffect ( EControllerHand  Hand)

Stops a playing haptic feedback curve

参数
HapticEffectThe haptic effect to stop
HandWhich hand to stop the effect for

◆ TickActor()

virtual void APlayerController::TickActor ( float  DeltaTime,
enum ELevelTick  TickType,
FActorTickFunction &  ThisTickFunction 
)
overridevirtual

Dispatches the once-per frame Tick() function for this actor

参数
DeltaTimeThe time slice of this tick
TickTypeThe type of tick that is happening
ThisTickFunctionThe tick function that is firing, useful for getting the completion handle

重载 AController .

◆ ToggleSpeaking()

virtual void APlayerController::ToggleSpeaking ( bool  bInSpeaking)
virtual

Toggle voice chat on and off

参数
bSpeakingenable or disable voice chat

◆ UpdateCameraManager()

virtual void APlayerController::UpdateCameraManager ( float  DeltaSeconds)
virtual

Update the camera manager; this is called after all actors have been ticked.


◆ UpdateHiddenActors()

virtual void APlayerController::UpdateHiddenActors ( const FVector &  ViewLocation)
inlinevirtual

Builds a list of actors that are hidden based upon gameplay

参数
ViewLocationthe view point to hide/unhide from

◆ UpdateHiddenComponents()

virtual void APlayerController::UpdateHiddenComponents ( const FVector &  ViewLocation,
TSet< FPrimitiveComponentId > &   
)
inlinevirtual

Builds a list of components that are hidden based upon gameplay

参数
ViewLocationthe view point to hide/unhide from
HiddenComponentsthe list to add to/remove from

被 ADebugCameraController 重载.

◆ UpdateRotation()

virtual void APlayerController::UpdateRotation ( float  DeltaTime)
virtual

Updates the rotation of player, based on ControlRotation after RotationInput has been applied.

This may then be modified by the PlayerCamera, and is passed to Pawn->FaceRotation().

◆ UseShortConnectTimeout()

virtual bool APlayerController::UseShortConnectTimeout ( ) const
overridevirtual

Used by the net connection to determine if a net owning actor should switch to using the shortened timeout value

返回
true to switch from InitialConnectTimeout to ConnectionTimeout values on the net driver

重载 AActor .

◆ ViewAPlayer()

virtual void APlayerController::ViewAPlayer ( int32  dir)
virtual

View next active player in PlayerArray.

参数
diris the direction to go in the array

类成员变量说明

◆ bAutoManageActiveCameraTarget

bool APlayerController::bAutoManageActiveCameraTarget

True to allow this player controller to manage the camera target for you, typically by using the possessed pawn as the camera target.

Set to false if you want to manually control the camera target.

◆ bIsUsingStreamingVolumes

uint32 APlayerController::bIsUsingStreamingVolumes

Whether this controller is using streaming volumes.


◆ bPlayerIsWaiting

uint32 APlayerController::bPlayerIsWaiting

True if PlayerController is currently waiting for the match to start or to respawn.

Only valid in Spectating state.

◆ bShortConnectTimeOut

uint32 APlayerController::bShortConnectTimeOut

When true, reduces connect timeout from InitialConnectionTimeOut to ConnectionTimeout.


Set once initial level load is complete (client may be unresponsive during level loading).

◆ bShouldPerformFullTickWhenPaused

uint32 APlayerController::bShouldPerformFullTickWhenPaused
protected

Whether we fully tick when the game is paused, if our tick function is allowed to do so.

If false, we do a minimal update during the tick.

◆ CheatClass

TSubclassOf<UCheatManager> APlayerController::CheatClass

Class of my CheatManager.

参见
CheatManager for more information about when it will be instantiated.

◆ CheatManager

UCheatManager* APlayerController::CheatManager

Object that manages "cheat" commands.

By default:

◆ CurrentInputStack

TArray< TWeakObjectPtr<UInputComponent> > APlayerController::CurrentInputStack
protected

Internal.

Current stack of InputComponents.

◆ HiddenActors

TArray<class AActor*> APlayerController::HiddenActors

The actors which the camera shouldn't see - e.g.

used to hide actors which the camera penetrates

◆ LocalPlayerCachedLODDistanceFactor

float APlayerController::LocalPlayerCachedLODDistanceFactor

Last used FOV based multiplier to distance to an object when determining if it exceeds the object's cull distance

注解
: only valid for local player

◆ PendingSwapConnection

UNetConnection* APlayerController::PendingSwapConnection

This is set on the OLD PlayerController when performing a swap over a network connection so we know what connection we're waiting on acknowledgment from to finish destroying this PC (or when the connection is closed)

参见
GameModeBase::SwapPlayerControllers()

◆ Player

UPlayer* APlayerController::Player

UPlayer associated with this PlayerController.

Could be a local player or a net connection.


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