| @ -0,0 +1,49 @@ | ||||
| // Fill out your copyright notice in the Description page of Project Settings. | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "CoreMinimal.h" | ||||
| #include "CSGlueGenerator.h" | ||||
| #include "CSAssetManagerGlueGenerator.generated.h" | ||||
|  | ||||
| UCLASS(DisplayName="Asset Manager Glue Generator", NotBlueprintable, NotBlueprintType) | ||||
| class UCSAssetManagerGlueGenerator : public UCSGlueGenerator | ||||
| { | ||||
| 	GENERATED_BODY() | ||||
| private: | ||||
| 	// UCSGlueGenerator interface | ||||
| 	virtual void Initialize() override; | ||||
| 	virtual void ForceRefresh() override | ||||
| 	{ | ||||
| 		ProcessAssetIds(); | ||||
| 		ProcessAssetTypes(); | ||||
| 	} | ||||
| 	// End of UCSGlueGenerator interface | ||||
|  | ||||
| 	void TryRegisterAssetTypes(); | ||||
| 	 | ||||
| 	void OnModulesChanged(FName InModuleName, EModuleChangeReason InModuleChangeReason); | ||||
| 	void OnCompletedInitialScan(); | ||||
|  | ||||
| 	void OnAssetRemoved(const FAssetData& AssetData); | ||||
| 	void OnAssetRenamed(const FAssetData& AssetData, const FString& OldObjectPath); | ||||
| 	void OnInMemoryAssetCreated(UObject* Object); | ||||
| 	void OnInMemoryAssetDeleted(UObject* Object); | ||||
|  | ||||
| 	void OnAssetSearchRootAdded(const FString& RootPath); | ||||
|  | ||||
| 	void OnAssetManagerSettingsChanged(UObject* Object, FPropertyChangedEvent& PropertyChangedEvent); | ||||
|  | ||||
| 	bool IsRegisteredAssetType(const FAssetData& AssetData) { return IsRegisteredAssetType(AssetData.GetClass()); } | ||||
| 	bool IsRegisteredAssetType(UClass* Class); | ||||
|  | ||||
| 	void WaitUpdateAssetTypes() | ||||
| 	{ | ||||
| 		GEditor->GetTimerManager()->SetTimerForNextTick(FTimerDelegate::CreateUObject(this, &ThisClass::ProcessAssetIds)); | ||||
| 	} | ||||
|  | ||||
| 	void ProcessAssetIds(); | ||||
| 	void ProcessAssetTypes(); | ||||
|  | ||||
| 	bool bHasRegisteredAssetTypes = false; | ||||
| }; | ||||
| @ -0,0 +1,20 @@ | ||||
| // Fill out your copyright notice in the Description page of Project Settings. | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "CoreMinimal.h" | ||||
| #include "CSGlueGenerator.h" | ||||
| #include "CSGameplayTagsGlueGenerator.generated.h" | ||||
|  | ||||
| UCLASS(DisplayName="Gameplay Tags Glue Generator", NotBlueprintable, NotBlueprintType) | ||||
| class UCSGameplayTagsGlueGenerator : public UCSGlueGenerator | ||||
| { | ||||
| 	GENERATED_BODY() | ||||
| private: | ||||
| 	// UCSGlueGenerator interface | ||||
| 	virtual void Initialize() override; | ||||
| 	virtual void ForceRefresh() override { ProcessGameplayTags(); } | ||||
| 	// End of UCSGlueGenerator interface | ||||
|  | ||||
| 	void ProcessGameplayTags(); | ||||
| }; | ||||
| @ -0,0 +1,22 @@ | ||||
| // Fill out your copyright notice in the Description page of Project Settings. | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #include "CoreMinimal.h" | ||||
| #include "CSGlueGenerator.h" | ||||
| #include "CSTraceTypeQueryGlueGenerator.generated.h" | ||||
|  | ||||
| UCLASS(DisplayName="Trace Type Query Glue Generator", NotBlueprintable, NotBlueprintType) | ||||
| class UCSTraceTypeQueryGlueGenerator : public UCSGlueGenerator | ||||
| { | ||||
| 	GENERATED_BODY() | ||||
| private: | ||||
| 	// UCSGlueGenerator interface | ||||
| 	virtual void Initialize() override; | ||||
| 	virtual void ForceRefresh() override { ProcessTraceTypeQuery(); } | ||||
| 	// End of UCSGlueGenerator interface | ||||
|  | ||||
| 	void OnCollisionProfileChanged(UCollisionProfile* CollisionProfile); | ||||
| 	 | ||||
| 	void ProcessTraceTypeQuery(); | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user