Network total reforge. Team-List and Race-Data handled
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxAssetModelTypeActions.h"
|
||||
|
||||
#include "Assets/DTFluxModelAsset.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void FDTFluxAssetModelTypeActions::OpenAssetEditor(const TArray<UObject*>& InObjects,
|
||||
TSharedPtr<IToolkitHost> EditWithinLevelEditor)
|
||||
{
|
||||
FAssetTypeActions_Base::OpenAssetEditor(InObjects, EditWithinLevelEditor);
|
||||
}
|
||||
|
||||
UClass* FDTFluxAssetModelTypeActions::GetSupportedClass() const
|
||||
{
|
||||
return UDTFluxModelAsset::StaticClass();
|
||||
}
|
||||
|
||||
FText FDTFluxAssetModelTypeActions::GetName() const
|
||||
{
|
||||
return INVTEXT("DTFluxModelAsset");
|
||||
}
|
||||
|
||||
FColor FDTFluxAssetModelTypeActions::GetTypeColor() const
|
||||
{
|
||||
return FColor(231, 81, 67);
|
||||
}
|
||||
|
||||
uint32 FDTFluxAssetModelTypeActions::GetCategories()
|
||||
{
|
||||
return Category;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
#include "DTFluxAssetsEditorModule.h"
|
||||
#include "IAssetTools.h"
|
||||
#include "DTFluxAssetModelTypeActions.h"
|
||||
#include "IAssetTools.h"
|
||||
#include "AssetToolsModule.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FDTFluxAssetsEditorModule"
|
||||
|
||||
|
||||
DTFLUXASSETSEDITOR_API DEFINE_LOG_CATEGORY(logDTFluxAssetEditor)
|
||||
void FDTFluxAssetsEditorModule::StartupModule()
|
||||
{
|
||||
IAssetTools& AssetToolsModule = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
||||
EAssetTypeCategories::Type Category = AssetToolsModule.RegisterAdvancedAssetCategory("DTFlux", INVTEXT("DTFlux"));
|
||||
DTFluxAssetModelActions = MakeShareable(new FDTFluxAssetModelTypeActions(Category));
|
||||
AssetToolsModule.RegisterAssetTypeActions(DTFluxAssetModelActions.ToSharedRef());
|
||||
}
|
||||
|
||||
void FDTFluxAssetsEditorModule::ShutdownModule()
|
||||
{
|
||||
if(DTFluxAssetModelActions.IsValid() && FModuleManager::Get().IsModuleLoaded("AssetTools"))
|
||||
{
|
||||
IAssetTools& AssetToolsModule = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
||||
AssetToolsModule.UnregisterAssetTypeActions(DTFluxAssetModelActions.ToSharedRef());
|
||||
}
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FDTFluxAssetsEditorModule, DTFluxAssetsEditor)
|
||||
@ -0,0 +1,27 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxModelAssetFactory.h"
|
||||
|
||||
#include "DTFluxAssetsEditorModule.h"
|
||||
#include "Assets/DTFluxModelAsset.h"
|
||||
|
||||
|
||||
|
||||
UDTFluxModelAssetFactory::UDTFluxModelAssetFactory(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
|
||||
{
|
||||
SupportedClass = UDTFluxModelAsset::StaticClass();
|
||||
bCreateNew = true;
|
||||
}
|
||||
|
||||
// bool UDTFluxModelAssetFactory::CanCreateNew() const
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
UObject* UDTFluxModelAssetFactory::FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName,
|
||||
EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn)
|
||||
{
|
||||
UE_LOG(logDTFluxAssetEditor, Warning, TEXT("InParent Name %s"), InParent != nullptr ? *InParent->GetName() : TEXT("Parent is null !!!"))
|
||||
return NewObject<UDTFluxModelAsset>(InParent, InClass, InName, Flags, Context);
|
||||
}
|
||||
Reference in New Issue
Block a user