1. Model(模型):APlayerState 2. View(视图):APawn 3. Controller(控制器):APlayerController 和 AAIController 适用的场景 Pawn APawn 是Unreal Engine (UE) 中一个非常重要的类,通常代表 游戏中的可控制角色 或AI 驱动的对象。Pawn 是AActor 的一个子类,是 Actor 中最常见的用于表示可以被玩家或AI控制...
APlayerState AActor::PostInitializeComponents() APlayerState::PostInitializeComponents()ReferencesModule Engine Header /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerState.h Include #include "GameFramework/PlayerState.h" Source /Engine/Source/Runtime/Engine/Private/PlayerState.cpp...
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework > APlayerStateReferencesModule Engine Header /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerState.h Include #include "GameFramework/PlayerState.h" Source /Engine/Source/Runtime/Engine/Private/PlayerState.cpp...
APlayerState::OnSetUniqueId Called on both the client and server when unique ID has been modified NavigationUnreal Engine C++ API Reference > Runtime > Engine > GameFramework > APlayerStateReferencesModule Engine Header /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerState.h Include #include...
APlayerState::SetIsFromPreviousLevel Sets the value of bFromPreviousLevel without causing other side effects to this instance. NavigationUnreal Engine C++ API Reference > Runtime > Engine > GameFramework > APlayerStateReferencesModule Engine Header /Engine/Source/Runtime/Engine/Classes/GameFramework/...
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework > APlayerStateReferencesModule Engine Header /Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerState.h Include #include "GameFramework/PlayerState.h" Source /Engine/Source/Runtime/Engine/Private/PlayerState.cpp...
APlayerState classAPlayerState Remarks A PlayerState is created for every player on a server (or in a standalone game). PlayerStates are replicated to all clients, and contain network game relevant information about the player, such as playername, score, etc....