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

#include <LocalPlayer.h>

+ Inheritance diagram for ULocalPlayer:

Public Member Functions

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

Static Public Member Functions

static ENGINE_API void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 
template<typename TSubsystemClass >
static TSubsystemClassGetSubsystem (const ULocalPlayer *LocalPlayer)
 
template<typename TSubsystemClass >
static FORCEINLINE TSubsystemClassGetSubsystemFromController (const APlayerController *PC)
 
static ENGINE_API bool GetPixelBoundingBox (const FSceneViewProjectionData &ProjectionData, const FBox &ActorBox, FVector2D &OutLowerLeft, FVector2D &OutUpperRight, const FVector2f *OptionalAllotedSize=nullptr)
 
static ENGINE_API bool GetPixelPoint (const FSceneViewProjectionData &ProjectionData, const FVector &InPoint, FVector2D &OutPoint, const FVector2f *OptionalAllotedSize=nullptr)
 
- Static Public Member Functions inherited from UObject
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 
static COREUOBJECT_API bool CanCreateInCurrentContext (UObject *Template)
 
static COREUOBJECT_API void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 
static COREUOBJECT_API const FNameSourceFileTagName ()
 
static COREUOBJECT_API UObjectGetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 
- Static Public Member Functions inherited from UObjectBaseUtility
static bool IsGarbageEliminationEnabled ()
 
static bool IsPendingKillEnabled ()
 
static void SetGarbageEliminationEnabled (bool bEnabled)
 
static COREUOBJECT_API void ReloadObjectsFromModifiedConfigSections (const class FConfigModificationTracker *ChangeTracker)
 
- Static Public Member Functions inherited from UObjectBase
static COREUOBJECT_API FString RemoveClassPrefix (const TCHAR *ClassName)
 
static void PrefetchClass (UObject *Object)
 
static void PrefetchOuter (UObject *Object)
 

Public Attributes

FUniqueNetIdRepl CachedUniqueNetId
 
TObjectPtr< class UGameViewportClientViewportClient
 
FVector2D Origin
 
FVector2D Size
 
FVector LastViewLocation
 
TEnumAsByte< enum EAspectRatioAxisConstraintAspectRatioAxisConstraint
 
TSubclassOf< class APlayerControllerPendingLevelPlayerControllerClass
 
uint32 bSentSplitJoin:1
 
bool bEmulateSplitscreen = false
 

Protected Member Functions

virtual ENGINE_API bool Exec_Editor (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar) override
 
virtual ENGINE_API void GetViewPoint (FMinimalViewInfo &OutViewInfo) const
 
ENGINE_API void ExecMacro (const TCHAR *Filename, FOutputDevice &Ar)
 
- Protected Member Functions inherited from UObject
virtual FString GetDetailedInfoInternal () const
 
COREUOBJECT_API bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 
virtual COREUOBJECT_API bool CheckDefaultSubobjectsInternal () const
 
- Protected Member Functions inherited from UObjectBase
 UObjectBase ()
 
COREUOBJECT_API UObjectBase (EObjectFlags InFlags)
 
COREUOBJECT_API void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 
virtual void RegisterDependencies ()
 
COREUOBJECT_API void Register (class UClass *(*StaticClassFn)(), const TCHAR *PackageName, const TCHAR *Name)
 
COREUOBJECT_API void Register (const TCHAR *PackageName, const TCHAR *Name)
 
virtual COREUOBJECT_API void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 
- Protected Member Functions inherited from FExec
virtual bool Exec_Runtime (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 
virtual bool Exec_Dev (UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Ar)
 

Protected Attributes

FReply SlateOperations
 

Friends

class FLockedViewState
 

Additional Inherited Members

- Public Types inherited from UObject
enum class  ENetFields_Private { NETFIELD_REP_START = 0 , NETFIELD_REP_END = -1 }
 
typedef UObject WithinClass
 

Detailed Description

Each player that is active on the current client/listen server has a LocalPlayer. It stays active across maps, and there may be several spawned in the case of splitscreen/coop. There will be 0 spawned on dedicated servers.

Examples
/work/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

Constructor & Destructor Documentation

◆ ULocalPlayer()

ULocalPlayer::ULocalPlayer ( FVTableHelper Helper)

DO NOT USE. This constructor is for internal usage only for hot-reload purposes.

Member Function Documentation

◆ AddReferencedObjects()

void ULocalPlayer::AddReferencedObjects ( UObject InThis,
FReferenceCollector Collector 
)
static

◆ CalcSceneView()

FSceneView * ULocalPlayer::CalcSceneView ( class FSceneViewFamily ViewFamily,
FVector OutViewLocation,
FRotator OutViewRotation,
FViewport Viewport,
class FViewElementDrawer ViewDrawer = NULL,
int32  StereoViewIndex = INDEX_NONE 
)
virtual

Calculate the view settings for drawing from this view actor

Parameters
View- output view struct
OutViewLocation- output actor location
OutViewRotation- output actor rotation
Viewport- current client viewport
ViewDrawer- optional drawing in the view
StereoViewIndex- index of the view when using stereoscopy

◆ CalcSceneViewInitOptions()

bool ULocalPlayer::CalcSceneViewInitOptions ( struct FSceneViewInitOptions OutInitOptions,
FViewport Viewport,
class FViewElementDrawer ViewDrawer = NULL,
int32  StereoViewIndex = INDEX_NONE 
)
virtual

Calculate the view init settings for drawing from this view actor

Parameters
OutInitOptions- output view struct. Not every field is initialized, some of them are only filled in by CalcSceneView
Viewport- current client viewport
ViewDrawer- optional drawing in the view
StereoViewIndex- index of the view when using stereoscopy
Returns
true if the view options were filled in. false in various fail conditions.

◆ CleanupViewState()

void ULocalPlayer::CleanupViewState ( FStringView  MidParentRootPath = {})
virtual

Clear cached view state. Suitable for calling when cleaning up the world but the view state has some references objects (usually mids) owned by the world (thus preventing GC)

◆ DECLARE_DELEGATE()

ULocalPlayer::DECLARE_DELEGATE ( FOnPreBeginHandshakeCompleteDelegate  )

◆ DECLARE_EVENT_OneParam()

ULocalPlayer::DECLARE_EVENT_OneParam ( ULocalPlayer  ,
FOnPlayerControllerChanged  ,
APlayerController  
)

Event called when this local player has had a new outer PlayerController set

◆ DECLARE_EVENT_TwoParams() [1/2]

ULocalPlayer::DECLARE_EVENT_TwoParams ( ULocalPlayer  ,
FOnControllerIdChanged  ,
int32  ,
int32   
)

◆ DECLARE_EVENT_TwoParams() [2/2]

ULocalPlayer::DECLARE_EVENT_TwoParams ( ULocalPlayer  ,
FOnPlatformUserIdChanged  ,
FPlatformUserId  ,
FPlatformUserId   
)

Event called when this local player has been assigned to a new platform-level user

◆ Exec_Editor()

bool ULocalPlayer::Exec_Editor ( UWorld InWorld,
const TCHAR Cmd,
FOutputDevice Ar 
)
overrideprotectedvirtual

Implementation of Exec that is only called in editor

Reimplemented from FExec.

◆ ExecMacro()

void ULocalPlayer::ExecMacro ( const TCHAR Filename,
FOutputDevice Ar 
)
protected

◆ ForEachSubsystem()

void ULocalPlayer::ForEachSubsystem ( TFunctionRef< void(TSubsystemClass *)>  Operation) const
inline

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

◆ GetCachedUniqueNetId()

FUniqueNetIdRepl ULocalPlayer::GetCachedUniqueNetId ( ) const

Retrieves this player's unique net ID that was previously cached

Returns
unique Id associated with this player

◆ GetConnectionIdentifier()

int32 ULocalPlayer::GetConnectionIdentifier ( ) const

Get the client connection identifier for this local user.

◆ GetControllerId()

int32 ULocalPlayer::GetControllerId ( ) const
inline

Returns the controller ID for the player. This is a legacy identifier corresponding to the primary physical controller used by the player. You may want to use GetPlatformUserIndex or GetLocalPlayerIndex instead.

◆ GetGameInstance()

UGameInstance * ULocalPlayer::GetGameInstance ( ) const

Get the game instance associated with this local player

Returns
GameInstance related to local player

◆ GetGameLoginOptions()

virtual FString ULocalPlayer::GetGameLoginOptions ( ) const
inlinevirtual

Retrieves any game-specific login options for this player if this function returns a non-empty string, the returned option or options be added passed in to the level loading and connection code. Options are in URL format, key=value, with multiple options concatenated together with an & between each key/value pair

Returns
URL Option or options for this game, Empty string otherwise

◆ GetIndexInGameInstance()

int32 ULocalPlayer::GetIndexInGameInstance ( ) const

Returns the index of this player in the Game instances local players array

Returns
Index in array, will be >= 0 if this is a fully registered player

◆ GetLocalPlayerIndex()

int32 ULocalPlayer::GetLocalPlayerIndex ( ) const
virtual

Returns the logical local player index where 0 is the first LocalPlayer that was created. By default, this uses index in the game instance array. This index is used for gameplay purposes but will not be correct for platform functions.

◆ GetNickname()

FString ULocalPlayer::GetNickname ( ) const
virtual

Retrieves this player's name/tag from the online subsystem if this function returns a non-empty string, the returned name will replace the "Name" URL parameter passed around in the level loading and connection code, which normally comes from DefaultEngine.ini

Returns
Name of player if specified (by onlinesubsystem or otherwise), Empty string otherwise

◆ GetPixelBoundingBox() [1/2]

bool ULocalPlayer::GetPixelBoundingBox ( const FBox ActorBox,
FVector2D OutLowerLeft,
FVector2D OutUpperRight,
const FVector2f OptionalAllotedSize = nullptr 
)

This function will give you two points in Pixel Space that surround the World Space box.

Parameters
ActorBoxThe World Space Box
OutLowerLeftThe Lower Left corner of the Pixel Space box
OutUpperRightThe Upper Right corner of the pixel space box
Returns
False if there is no viewport, or if the box is behind the camera completely

◆ GetPixelBoundingBox() [2/2]

bool ULocalPlayer::GetPixelBoundingBox ( const FSceneViewProjectionData ProjectionData,
const FBox ActorBox,
FVector2D OutLowerLeft,
FVector2D OutUpperRight,
const FVector2f OptionalAllotedSize = nullptr 
)
static

◆ GetPixelPoint() [1/2]

bool ULocalPlayer::GetPixelPoint ( const FSceneViewProjectionData ProjectionData,
const FVector InPoint,
FVector2D OutPoint,
const FVector2f OptionalAllotedSize = nullptr 
)
static

◆ GetPixelPoint() [2/2]

bool ULocalPlayer::GetPixelPoint ( const FVector InPoint,
FVector2D OutPoint,
const FVector2f OptionalAllotedSize = nullptr 
)

This function will give you a point in Pixel Space from a World Space position

Parameters
InPointThe point in world space
OutPointThe point in pixel space
Returns
False if there is no viewport, or if the box is behind the camera completely

◆ GetPlatformUserId()

FPlatformUserId ULocalPlayer::GetPlatformUserId ( ) const
inline

Returns the platform user that is assigned to this player

◆ GetPlatformUserIndex()

int32 ULocalPlayer::GetPlatformUserIndex ( ) const
virtual

Converts the platform user id to an index where 0 is the first logged in user. This index is used for platform functions like save games, user selection, and slate input.

◆ GetPreferredUniqueNetId()

FUniqueNetIdRepl ULocalPlayer::GetPreferredUniqueNetId ( ) const
virtual

Retrieves the preferred unique net id. This is for backwards compatibility for games that don't use the cached unique net id logic

Returns
unique Id associated with this player

◆ GetProjectionData()

bool ULocalPlayer::GetProjectionData ( FViewport Viewport,
FSceneViewProjectionData ProjectionData,
int32  StereoViewIndex = INDEX_NONE 
) const
virtual

Helper function for deriving various bits of data needed for projection

Parameters
ViewportThe ViewClient's viewport
ProjectionDataThe structure to be filled with projection data
StereoViewIndexThe index of the view when using stereoscopy
Returns
False if there is no viewport, or if the Actor is null

◆ GetSlateOperations() [1/2]

FReply & ULocalPlayer::GetSlateOperations ( )
inline

Getter for slate operations.

◆ GetSlateOperations() [2/2]

const FReply & ULocalPlayer::GetSlateOperations ( ) const
inline

◆ GetSlateUser() [1/2]

TSharedPtr< FSlateUser > ULocalPlayer::GetSlateUser ( )
virtual

Get the SlateUser that this LocalPlayer corresponds to

◆ GetSlateUser() [2/2]

TSharedPtr< const FSlateUser > ULocalPlayer::GetSlateUser ( ) const
virtual

◆ GetSubsystem() [1/2]

TSubsystemClass * ULocalPlayer::GetSubsystem ( ) const
inline

Get a Subsystem of specified type

◆ GetSubsystem() [2/2]

static TSubsystemClass * ULocalPlayer::GetSubsystem ( const ULocalPlayer LocalPlayer)
inlinestatic

Get a Subsystem of specified type from the provided LocalPlayer returns nullptr if the Subsystem cannot be found or the LocalPlayer is null

◆ GetSubsystemArrayCopy()

TArray< TSubsystemClass * > ULocalPlayer::GetSubsystemArrayCopy ( ) const
inline

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

◆ GetSubsystemBase()

ULocalPlayerSubsystem * ULocalPlayer::GetSubsystemBase ( TSubclassOf< ULocalPlayerSubsystem SubsystemClass) const
inline

Get a Subsystem of specified type

◆ GetSubsystemFromController()

static FORCEINLINE TSubsystemClass * ULocalPlayer::GetSubsystemFromController ( const APlayerController PC)
inlinestatic

Get a subsystem of the specificied type from the provided Player Controller's owning ULocalPlayer. Returns nullptr if the Subsystem cannot be found or the given controller or its local player are null.

◆ GetUniqueNetIdForPlatformUser()

FUniqueNetIdRepl ULocalPlayer::GetUniqueNetIdForPlatformUser ( ) const
virtual

Retrieves this player's unique net ID from the online subsystem using the platform user Id

Returns
unique Id associated with this player

◆ GetUniqueNetIdFromCachedControllerId()

FUniqueNetIdRepl ULocalPlayer::GetUniqueNetIdFromCachedControllerId ( ) const

◆ GetViewPoint()

void ULocalPlayer::GetViewPoint ( FMinimalViewInfo OutViewInfo) const
protectedvirtual

Retrieve the viewpoint of this player.

Parameters
OutViewInfo- Upon return contains the view information for the player.

◆ GetWorld()

UWorld * ULocalPlayer::GetWorld ( ) const
overridevirtual

Get the world the players actor belongs to

Returns
Returns the world of the LocalPlayer's PlayerController. NULL if the LocalPlayer does not have a PlayerController

◆ HandleDNCommand()

bool ULocalPlayer::HandleDNCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

Exec command handlers

◆ HandleExecCommand()

bool ULocalPlayer::HandleExecCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleExitCommand()

bool ULocalPlayer::HandleExitCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleListAwakeBodiesCommand()

bool ULocalPlayer::HandleListAwakeBodiesCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleListMoveBodyCommand()

bool ULocalPlayer::HandleListMoveBodyCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleListPawnComponentsCommand()

bool ULocalPlayer::HandleListPawnComponentsCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleListSimBodiesCommand()

bool ULocalPlayer::HandleListSimBodiesCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleListSkelMeshesCommand()

bool ULocalPlayer::HandleListSkelMeshesCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleMoveComponentTimesCommand()

bool ULocalPlayer::HandleMoveComponentTimesCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleToggleDrawEventsCommand()

bool ULocalPlayer::HandleToggleDrawEventsCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ HandleToggleStreamingVolumesCommand()

bool ULocalPlayer::HandleToggleStreamingVolumesCommand ( const TCHAR Cmd,
FOutputDevice Ar 
)

◆ InitOnlineSession()

void ULocalPlayer::InitOnlineSession ( )
virtual

Called to initialize the online delegates

◆ IsPrimaryPlayer()

bool ULocalPlayer::IsPrimaryPlayer ( ) const

Determines whether this player is the first and primary player on their machine.

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

◆ OnControllerIdChanged()

FOnControllerIdChanged & ULocalPlayer::OnControllerIdChanged ( ) const
inline

◆ OnPlatformUserIdChanged()

FOnPlatformUserIdChanged & ULocalPlayer::OnPlatformUserIdChanged ( )
inline

◆ OnPlayerControllerChanged()

FOnPlayerControllerChanged & ULocalPlayer::OnPlayerControllerChanged ( )
inline

◆ PlayerAdded() [1/2]

void ULocalPlayer::PlayerAdded ( class UGameViewportClient InViewportClient,
FPlatformUserId  InUserId 
)
virtual

Called at creation time for internal setup

◆ PlayerAdded() [2/2]

void ULocalPlayer::PlayerAdded ( class UGameViewportClient InViewportClient,
int32  InControllerID 
)
virtual

Called at creation time for internal setup

◆ PlayerRemoved()

void ULocalPlayer::PlayerRemoved ( )
virtual

Called when the player is removed from the viewport client

◆ PreBeginHandshake()

virtual void ULocalPlayer::PreBeginHandshake ( const FOnPreBeginHandshakeCompleteDelegate OnComplete)
inlinevirtual

Allow local player to run any async tasks needed before starting travel to a server.

◆ ReceivedPlayerController()

void ULocalPlayer::ReceivedPlayerController ( APlayerController NewController)
overridevirtual

Called when this player has had it's outer Player Controller set for remote net connections

Reimplemented from UPlayer.

◆ SendSplitJoin() [1/2]

void ULocalPlayer::SendSplitJoin ( TArray< FString > &  Options)
virtual

Send a splitscreen join command to the server to allow a splitscreen player to connect to the game the client must already be connected to a server for this function to work

Note
this happens automatically for all viewports that exist during the initial server connect so it's only necessary to manually call this for viewports created after that if the join fails (because the server was full, for example) all viewports on this client will be disconnected

This call will send the command using the current net driver associated with world.

Parameters
Optionsarray of URL options to append.

◆ SendSplitJoin() [2/2]

void ULocalPlayer::SendSplitJoin ( TArray< FString > &  Options,
UNetDriver NetDriver,
UE::Net::EJoinFlags  Flags 
)
virtual

Same as SendSplitJoin() above but with additional arguments.

Parameters
NetDriverUse this NetDriver to send the join request instead of the NetDriver associated with the world.
FlagsConfiguration flags used by the join request sent to the server.

◆ SetCachedUniqueNetId()

void ULocalPlayer::SetCachedUniqueNetId ( const FUniqueNetIdRepl NewUniqueNetId)

Sets the players current cached unique net id

◆ SetConnectionIdentifier()

void ULocalPlayer::SetConnectionIdentifier ( const int32  Id)

Set the connection identifier for this local user.

The connection identifier is a unique identifier for this local user on a client and is used to associate the local player that began a connection handshake with a player controller replicated to the client when the connection handshake is complete.

Only set this if you are connecting to a game server outside of the normal connection flow in the engine (e.g. you are sending NMT_Join manually to initiate a connection).

This is the expected flow for how the connection identifier should be used:

  • (Client) Set the connection identifier before sending NMT_Join, NMT_JoinSplit, NMT_JoinNoPawnSplit or NMT_JoinNoPawn.
    • (Client) The connection identifier is sent with the join message as a URL argument.
  • (Server) Set the connection identifier on the player controller spawned on the game server.
  • (Client) Match the player controller connection identifier to the correct local user connection identifier.

◆ SetControllerId()

void ULocalPlayer::SetControllerId ( int32  NewControllerId)
virtual

Change the physical ControllerId for this player; if the specified ControllerId is already taken by another player, changes the ControllerId for the other player to the ControllerId currently in use by this player.

Parameters
NewControllerIdthe ControllerId to assign to this player.

◆ SetPlatformUserId()

void ULocalPlayer::SetPlatformUserId ( FPlatformUserId  InPlatformUserId)
virtual

Changes the platform user that is assigned to this player

◆ SpawnPlayActor()

bool ULocalPlayer::SpawnPlayActor ( const FString &  URL,
FString &  OutError,
UWorld InWorld 
)
virtual

Create an actor for this player.

Parameters
URL- The URL the player joined with.
OutError- If an error occurred, returns the error description.
InWorld- World in which to spawn the play actor
Returns
False if an error occurred, true if the play actor was successfully spawned.

Friends And Related Symbol Documentation

◆ FLockedViewState

friend class FLockedViewState
friend

Locked view state needs access to GetViewPoint.

Member Data Documentation

◆ AspectRatioAxisConstraint

TEnumAsByte<enum EAspectRatioAxisConstraint> ULocalPlayer::AspectRatioAxisConstraint

How to constrain perspective viewport FOV

◆ bEmulateSplitscreen

bool ULocalPlayer::bEmulateSplitscreen = false

Whether or not we're emulating splitscreen with this player. Should only be set from screenshot functional tests.

◆ bSentSplitJoin

uint32 ULocalPlayer::bSentSplitJoin

set when we've sent a split join request

◆ CachedUniqueNetId

FUniqueNetIdRepl ULocalPlayer::CachedUniqueNetId

The FUniqueNetId which this player is associated with.

◆ LastViewLocation

FVector ULocalPlayer::LastViewLocation

The location of the player's view the previous frame.

◆ Origin

FVector2D ULocalPlayer::Origin

The coordinates for the upper left corner of the primary viewport subregion allocated to this player. 0-1

◆ PendingLevelPlayerControllerClass

TSubclassOf<class APlayerController> ULocalPlayer::PendingLevelPlayerControllerClass

The class of PlayerController to spawn for players logging in.

◆ Size

FVector2D ULocalPlayer::Size

The size of the primary viewport subregion allocated to this player. 0-1

◆ SlateOperations

FReply ULocalPlayer::SlateOperations
protected

FReply used to defer some slate operations.

◆ ViewportClient

TObjectPtr<class UGameViewportClient> ULocalPlayer::ViewportClient

The primary viewport containing this player's view.


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