|
Payback 0.0.1
CK Graduation Project
|
#include <DataAssetManager.h>


Public 멤버 함수 | |
| UDataAssetManager () | |
| template<typename AssetType > | |
| AssetType * | GetAsset (const TSoftObjectPtr< AssetType > &AssetPointer, bool bKeepInMemory) |
| template<typename AssetType > | |
| TSubclassOf< AssetType > | GetSubclass (const TSoftClassPtr< AssetType > &AssetPointer, bool bKeepInMemory) |
| template<typename GameDataClass > | |
| const GameDataClass & | GetOrLoadTypedGameData (const TSoftObjectPtr< GameDataClass > &DataPath) |
| template<typename GameDataClass > | |
| TArray< const GameDataClass * > | GetAllTypedGameData () const |
정적 Public 멤버 함수 | |
| static UDataAssetManager & | GetInstance () |
| UDataAssetManager 싱글턴 인스턴스를 반환합니다. | |
| static void | DumpLoadedAssets () |
| 현재 GC 방지 풀에 등록된 모든 에셋 정보를 로그로 출력합니다. | |
| static void | RegisterBundleAssets (const TArray< UObject * > &InAssets) |
| 번들 로드 완료 후 에셋들을 GC 방지 풀에 등록합니다. | |
| static void | UnregisterBundleAssets (const TArray< UObject * > &InAssets) |
| 번들 언로드 시 GC 방지 풀에서 에셋들을 제거합니다. | |
| template<typename TData > | |
| static TData * | GetAsset (const TSoftObjectPtr< TData > &AssetPointer, bool bKeepInMemory=true) |
| template<typename TData > | |
| static TSubclassOf< TData > | GetSubclass (const TSoftClassPtr< TData > &AssetPointer, bool bKeepInMemory=true) |
| static void | LoadAsyncByPath (const FSoftObjectPath &AssetPath, FAsyncLoadCompletedDelegate CompletedDelegate=FAsyncLoadCompletedDelegate()) |
| 소프트 오브젝트 경로로 에셋을 비동기 로드합니다. | |
| static void | LoadAsyncByName (const FName &AssetName, FAsyncLoadCompletedDelegate CompletedDelegate=FAsyncLoadCompletedDelegate()) |
| Primary Asset 이름으로 에셋을 비동기 로드합니다. | |
Protected 멤버 함수 | |
| template<typename TData > | |
| const TData & | GetOrLoadTypedGameData (const TSoftObjectPtr< TData > &DataPath) |
| template<typename TData > | |
| TArray< const TData * > | GetAllTypedGameData () const |
| void | InitializeOnManager () |
| void | OnUpdateLoadPercentage (float Percentage) |
| void | OnAllDataLoadCompleted () |
| virtual void | TryCreateLoadJobForDataAsset (TSoftObjectPtr< UPrimaryDataAsset > DataPath, FString JobName) |
| virtual void | StartInitialLoading () override |
| 엔진 시작 시 초기 에셋 로딩을 수행합니다. | |
| UPrimaryDataAsset * | LoadGameDataOfClass (TSubclassOf< UPrimaryDataAsset > DataClass, const TSoftObjectPtr< UPrimaryDataAsset > &DataClassPath, FPrimaryAssetType PrimaryAssetType) |
| 지정한 클래스 타입의 게임 데이터 에셋을 동기 로드하고 GameDataMap에 등록합니다. | |
정적 Protected 멤버 함수 | |
| static UObject * | SynchronousLoadAsset (const FSoftObjectPath &AssetPath) |
| 소프트 오브젝트 경로로 에셋을 동기 로드합니다. | |
| static bool | ShouldLogAssetLoads () |
| 에셋 로드 로깅 여부를 반환합니다. | |
Protected 속성 | |
| TMap< TObjectPtr< UClass >, FGameDataAssetList > | GameDataMap |
| TArray< TSoftObjectPtr< UPrimaryDataAsset > > | InitialGameDataPaths |
| FDataAssetJobManager | JobManager |
Private 속성 | |
| TSet< TObjectPtr< UObject > > | LoadedAssets |
| UDataAssetManager::UDataAssetManager | ( | ) |
|
static |
현재 GC 방지 풀에 등록된 모든 에셋 정보를 로그로 출력합니다.

|
protected |
| TArray< const GameDataClass * > UDataAssetManager::GetAllTypedGameData | ( | ) | const |
| AssetType * UDataAssetManager::GetAsset | ( | const TSoftObjectPtr< AssetType > & | AssetPointer, |
| bool | bKeepInMemory | ||
| ) |

|
static |
|
static |
UDataAssetManager 싱글턴 인스턴스를 반환합니다.
GEngine->AssetManager를 UDataAssetManager로 캐스팅하여 반환합니다. DefaultEngine.ini에 AssetManagerClassName이 올바르게 설정되어 있어야 합니다.

| const GameDataClass & UDataAssetManager::GetOrLoadTypedGameData | ( | const TSoftObjectPtr< GameDataClass > & | DataPath | ) |

|
protected |
| TSubclassOf< AssetType > UDataAssetManager::GetSubclass | ( | const TSoftClassPtr< AssetType > & | AssetPointer, |
| bool | bKeepInMemory | ||
| ) |

|
static |
|
protected |
|
static |
Primary Asset 이름으로 에셋을 비동기 로드합니다.
Asset Manager에 등록된 모든 Primary Asset 중 이름이 일치하는 항목을 탐색한 뒤 LoadAsyncByPath에 위임합니다. 동일한 이름이 여러 타입에 등록된 경우 첫 번째 매칭만 로드됩니다.
| AssetName | 로드할 에셋의 PrimaryAssetName |
| CompletedDelegate | 로드 완료 시 호출될 델리게이트 (에셋 이름, 로드된 UObject 전달) |

|
static |
소프트 오브젝트 경로로 에셋을 비동기 로드합니다.
JobManager에 로드 작업을 등록하고 실행합니다. 내부적으로 WaitUntilComplete를 사용하므로 실제로는 블로킹 방식으로 동작합니다.
| AssetPath | 로드할 에셋의 소프트 오브젝트 경로 |
| CompletedDelegate | 로드 완료 시 호출될 델리게이트 (에셋 이름, 로드된 UObject 전달) |


|
protected |
지정한 클래스 타입의 게임 데이터 에셋을 동기 로드하고 GameDataMap에 등록합니다.
에디터 환경에서는 LoadSynchronous()를 사용하고, 런타임에서는 LoadPrimaryAssetsWithType()으로 스트리밍 후 WaitUntilComplete()로 대기합니다.
| DataClass | 로드할 게임 데이터의 UClass |
| DataClassPath | 로드할 에셋의 소프트 오브젝트 포인터 |
| PrimaryAssetType | Asset Manager에 등록된 Primary Asset 타입 |

|
protected |
|
protected |

|
static |
번들 로드 완료 후 에셋들을 GC 방지 풀에 등록합니다.
DataBundleRegistry::OnAssetsLoaded에서 호출됩니다.
| InAssets | FStreamableHandle에서 수집한 UObject 포인터 목록 |


|
staticprotected |
에셋 로드 로깅 여부를 반환합니다.
커맨드라인에 -LogAssetLoads 인자가 있을 때 true를 반환합니다.

|
overrideprotectedvirtual |
엔진 시작 시 초기 에셋 로딩을 수행합니다.
UAssetManager::StartInitialLoading을 호출한 뒤, GameDataPath에 지정된 Primary Data Asset을 JobManager를 통해 로드합니다.

|
staticprotected |
소프트 오브젝트 경로로 에셋을 동기 로드합니다.
Asset Manager가 초기화된 경우 StreamableManager를 통해 로드하고, 그렇지 않은 경우 TryLoad()로 폴백합니다.
| AssetPath | 로드할 에셋의 소프트 오브젝트 경로 |


|
protectedvirtual |


|
static |
번들 언로드 시 GC 방지 풀에서 에셋들을 제거합니다.
DataBundleRegistry::Release에서 호출됩니다.
| InAssets | 제거할 UObject 포인터 목록 |


|
protected |
|
protected |
|
protected |
|
private |