Add method to retrieve player Pawn from actor

This commit is contained in:
2026-03-19 19:00:00 +01:00
parent a983681ee8
commit 411dd30323
3 changed files with 46 additions and 49 deletions

View File

@@ -9,6 +9,7 @@ namespace SDK {
class UObject;
class UWorld;
class UWidget;
class AActor;
class APawn;
class UGameplayStatics;
class UConsole;
@@ -35,6 +36,13 @@ void GetResolution(int& outWidth, int& outHeight, float& outAspectRatio);
*/
SDK::APawn* GetPawnFromWorld(SDK::UWorld* world = nullptr);
/**
* @brief Gets the current player Pawn from an actor object.
* @param object pointer (must be an UObject at least).
* @return Player Pawn or nullptr.
*/
SDK::APawn* GetPawnFromObject(SDK::UObject* object);
/**
* @brief Reactivate the development console.
* @param logger spdlog.