mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-11-04 21:01:48 +00:00
TextureAsset properties, start of better asset pipeline detection
This commit is contained in:
@@ -23,13 +23,13 @@ abstract class Config
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract void ShowEditor();
|
||||
public abstract void ShowEditor(AssetFile assetFile);
|
||||
}
|
||||
|
||||
[BonTarget, BonPolyRegister]
|
||||
class AssetImporterConfig : Config
|
||||
{
|
||||
public override void ShowEditor()
|
||||
public override void ShowEditor(AssetFile assetFile)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class AssetImporterConfig : Config
|
||||
[BonTarget, BonPolyRegister]
|
||||
class AssetProcessorConfig : Config
|
||||
{
|
||||
public override void ShowEditor()
|
||||
public override void ShowEditor(AssetFile assetFile)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class AssetExporterConfig : Config
|
||||
set => SetIfChanged(ref _compression, value);
|
||||
}
|
||||
|
||||
public override void ShowEditor()
|
||||
public override void ShowEditor(AssetFile assetFile)
|
||||
{
|
||||
ImGui.PropertyTableStartNewProperty("Compression");
|
||||
ImGui.AttachTooltip("Specifies the compression method used to compress the processed asset.");
|
||||
|
||||
@@ -12,19 +12,28 @@ interface IAssetImporter
|
||||
|
||||
AssetImporterConfig CreateDefaultConfig();
|
||||
|
||||
/// The type that ImportedResource returns.
|
||||
static Type ProcessedAssetType { get; }
|
||||
|
||||
Result<ImportedResource> Import(StringView fullFileName, AssetIdentifier assetIdentifier, AssetImporterConfig config);
|
||||
}
|
||||
|
||||
interface IAssetProcessor
|
||||
{
|
||||
AssetProcessorConfig CreateDefaultConfig();
|
||||
|
||||
/// The asset type that this processor can process.
|
||||
static Type ProcessedAssetType { get; }
|
||||
|
||||
Result<ProcessedResource> Process(ImportedResource importedResource, AssetProcessorConfig config);
|
||||
Result<void> Process(ImportedResource importedResource, AssetProcessorConfig config, List<ProcessedResource> outProcessedResources);
|
||||
}
|
||||
|
||||
interface IAssetExporter
|
||||
{
|
||||
AssetExporterConfig CreateDefaultConfig();
|
||||
|
||||
/// The asset type that this exporter can export.
|
||||
static AssetType ExportedAssetType { get; }
|
||||
|
||||
Result<void> Export(Stream stream, ProcessedResource processedObject, AssetExporterConfig config);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class TextureImporterConfig : AssetImporterConfig
|
||||
set => SetIfChanged(ref _isSrgb, value);
|
||||
}
|
||||
|
||||
public override void ShowEditor()
|
||||
public override void ShowEditor(AssetFile assetFile)
|
||||
{
|
||||
ImGui.PropertyTableStartNewProperty("Is sRGB");
|
||||
ImGui.AttachTooltip("If checked, the texture will be forced to be imported as sRGB. Refer to the documentation for an detailed explanation what you should do here.");
|
||||
|
||||
Reference in New Issue
Block a user