完善鱼信息配置类
This commit is contained in:
parent
a07bf2a19c
commit
220ea3a481
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "AssetActions/FishInfoAssetAction.h"
|
||||
|
||||
#include "ProjectFish/DataAsset/FishInfoConfigAsset.h"
|
||||
|
||||
|
||||
UClass* FFishInfoAssetAction::GetSupportedClass() const
|
||||
{
|
||||
return UFishInfoConfigAsset::StaticClass();
|
||||
}
|
||||
|
||||
uint32 FFishInfoAssetAction::GetCategories()
|
||||
{
|
||||
return MyAssetCategory;
|
||||
}
|
||||
@ -11,6 +11,7 @@
|
||||
#include "ProjectFish/DataAsset/BagConfigAsset.h"
|
||||
#include "../Public/Thumbnail/ShapeAssetThumbnailRenderer.h"
|
||||
#include "../Public/Thumbnail/BagConfigThumbnailRenderer.h"
|
||||
#include "AssetActions/FishInfoAssetAction.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FProjectFishEditorModule"
|
||||
|
||||
@ -64,6 +65,11 @@ void FProjectFishEditorModule::RegisterAssetTypeActions()
|
||||
TSharedRef<FAssetTypeActions_Base> QuestAssetAction = MakeShareable(new FQuestAssetTypeAction(BogShapeAssetCategory));
|
||||
AssetTools.RegisterAssetTypeActions(QuestAssetAction);
|
||||
CreatedAssetTypeActions.Add(QuestAssetAction);
|
||||
|
||||
//注册鱼类配置资源菜单
|
||||
TSharedRef<FAssetTypeActions_Base> FishInfoAssetAction = MakeShareable(new FFishInfoAssetAction(BogShapeAssetCategory));
|
||||
AssetTools.RegisterAssetTypeActions(FishInfoAssetAction);
|
||||
CreatedAssetTypeActions.Add(FishInfoAssetAction);
|
||||
}
|
||||
|
||||
void FProjectFishEditorModule::UnregisterAssetTypeActions()
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "AssetTypeActions_Base.h"
|
||||
|
||||
/**
|
||||
* 任务资产类型动作
|
||||
*/
|
||||
class PROJECTFISHEDITOR_API FFishInfoAssetAction : public FAssetTypeActions_Base
|
||||
{
|
||||
public:
|
||||
FFishInfoAssetAction(EAssetTypeCategories::Type InAssetCategory)
|
||||
: MyAssetCategory(InAssetCategory)
|
||||
{
|
||||
}
|
||||
|
||||
virtual FText GetName() const override { return FText::FromString("FishInfo Asset"); }
|
||||
virtual FColor GetTypeColor() const override { return FColor(255, 215, 0); } // 金色
|
||||
virtual UClass* GetSupportedClass() const override;
|
||||
virtual uint32 GetCategories() override;
|
||||
virtual bool CanFilter() override { return true; }
|
||||
|
||||
private:
|
||||
EAssetTypeCategories::Type MyAssetCategory;
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user