Network total reforge. Team-List and Race-Data handled

This commit is contained in:
2025-06-29 19:04:36 +02:00
parent 3a45d4c3b7
commit 81bf37639b
92 changed files with 3736 additions and 4202 deletions

View File

@ -0,0 +1,29 @@
using UnrealBuildTool;
public class DTFluxAssetsEditor : ModuleRules
{
public DTFluxAssetsEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"AssetTools",
"SlateCore",
"UnrealEd",
"DTFluxCore",
}
);
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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);
}

View File

@ -0,0 +1,24 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AssetTypeActions_Base.h"
/**
*
*/
class FDTFluxAssetModelTypeActions : public FAssetTypeActions_Base
{
public:
FDTFluxAssetModelTypeActions(EAssetTypeCategories::Type InCategory): Category(InCategory){};
public:
virtual UClass* GetSupportedClass() const override;
virtual FText GetName() const override;
virtual FColor GetTypeColor() const override;
virtual uint32 GetCategories() override;
virtual void OpenAssetEditor(const TArray<UObject*>& InObjects, TSharedPtr<IToolkitHost> EditWithinLevelEditor = TSharedPtr<IToolkitHost>()) override;
private:
EAssetTypeCategories::Type Category;
};

View File

@ -0,0 +1,29 @@
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
/**
* @module DTFluxAssetsEditorModule
* @details DTFlux Project is a framework to integrate all kind of events data from
* multiple API (stopwatch servers, etc...) or manually to unreal motion design platform
* to create live audiovisual shows.
* @brief This module provides all editor and ui tools.
* @license See LICENSE.TXT at the of DTFluxAPI plugin folder or at
* @see https://github.com/A2MSystemes/DTFluxAPI/blob/main/LICENSE
* @author Ange-Marie MAURIN
*/
class FDTFluxAssetModelTypeActions;
DTFLUXASSETSEDITOR_API DECLARE_LOG_CATEGORY_EXTERN(logDTFluxAssetEditor, Log, All);
class FDTFluxAssetsEditorModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
private:
TSharedPtr<FDTFluxAssetModelTypeActions> DTFluxAssetModelActions;
};

View File

@ -0,0 +1,19 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "DTFluxModelAssetFactory.generated.h"
/**
*
*/
UCLASS()
class DTFLUXASSETSEDITOR_API UDTFluxModelAssetFactory : public UFactory
{
GENERATED_BODY()
public:
UDTFluxModelAssetFactory(const FObjectInitializer& ObjectInitializer);
virtual UObject* FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
};