Start of asset management 2.0

This commit is contained in:
Simon Lübeß
2024-05-19 01:35:52 +02:00
parent 989ad4a5bd
commit 2725801db8
21 changed files with 2192 additions and 52 deletions
@@ -0,0 +1,49 @@
using Bon;
using GlitchyEngine.Content;
namespace GlitchyEditor.Assets.Importers;
[BonTarget, BonPolyRegister]
abstract class Config
{
[BonIgnore]
protected bool _changed;
public bool Changed => _changed;
protected bool SetIfChanged<T>(ref T field, T value)
{
if (field == value)
return false;
field = value;
_changed = true;
return true;
}
}
[BonTarget, BonPolyRegister]
class AssetImporterConfig : Config
{
}
[BonTarget, BonPolyRegister]
class AssetProcessorConfig : Config
{
}
[BonTarget, BonPolyRegister]
class AssetExporterConfig : Config
{
[BonInclude]
private AssetCompression _compression;
public AssetCompression Compression
{
get => _compression;
set => SetIfChanged(ref _compression, value);
}
}