Add content deprecation system that auto-saves assets in Editor that use old data format

This commit is contained in:
Wojtek Figat
2025-01-20 23:46:49 +01:00
parent 1497acef58
commit 8a7ceef288
67 changed files with 751 additions and 427 deletions

View File

@@ -77,7 +77,7 @@ public:
/// Tries to load surface graph from the asset.
/// </summary>
/// <returns>The surface data or empty if failed to load it.</returns>
API_FUNCTION() BytesContainer LoadSurface();
API_FUNCTION() BytesContainer LoadSurface() const;
#if USE_EDITOR
/// <summary>
@@ -85,7 +85,7 @@ public:
/// </summary>
/// <param name="data">Stream with graph data.</param>
/// <returns>True if cannot save it, otherwise false.</returns>
API_FUNCTION() bool SaveSurface(const BytesContainer& data);
API_FUNCTION() bool SaveSurface(const BytesContainer& data) const;
#endif
private:
@@ -99,6 +99,7 @@ public:
void OnScriptingDispose() override;
#if USE_EDITOR
void GetReferences(Array<Guid>& assets, Array<String>& files) const override;
bool Save(const StringView& path = StringView::Empty) override;
#endif
protected: