Add content deprecation system that auto-saves assets in Editor that use old data format
This commit is contained in:
@@ -13,6 +13,7 @@ class MaterialShader;
|
||||
API_CLASS(NoSpawn) class FLAXENGINE_API Material : public ShaderAssetTypeBase<MaterialBase>
|
||||
{
|
||||
DECLARE_BINARY_ASSET_HEADER(Material, ShadersSerializedVersion);
|
||||
|
||||
private:
|
||||
MaterialShader* _materialShader = nullptr;
|
||||
|
||||
@@ -25,7 +26,6 @@ public:
|
||||
API_FUNCTION() BytesContainer LoadSurface(bool createDefaultIfMissing);
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
/// <summary>
|
||||
/// Updates the material surface (save new one, discard cached data, reload asset).
|
||||
/// </summary>
|
||||
@@ -33,7 +33,6 @@ public:
|
||||
/// <param name="info">The material info structure.</param>
|
||||
/// <returns>True if cannot save it, otherwise false.</returns>
|
||||
API_FUNCTION() bool SaveSurface(const BytesContainer& data, const MaterialInfo& info);
|
||||
|
||||
#endif
|
||||
|
||||
public:
|
||||
@@ -52,6 +51,7 @@ public:
|
||||
// [ShaderAssetBase]
|
||||
#if USE_EDITOR
|
||||
void InitCompilationOptions(ShaderCompilationOptions& options) override;
|
||||
bool Save(const StringView& path = StringView::Empty) override;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user