Minor tweaks

This commit is contained in:
Wojtek Figat
2023-08-01 10:27:31 +02:00
parent ce16debabd
commit 94386d24ab
6 changed files with 7 additions and 7 deletions

View File

@@ -322,13 +322,13 @@ namespace FlaxEditor.Windows.Assets
{
if (value == null)
{
Editor.LogError("Failed to save animation graph surface");
Editor.LogError("Failed to save surface data");
return;
}
if (_asset.SaveSurface(value))
{
_surface.MarkAsEdited();
Editor.LogError("Failed to save animation graph surface data");
Editor.LogError("Failed to save surface data");
return;
}
_asset.Reload();

View File

@@ -349,7 +349,7 @@ namespace FlaxEditor.Windows.Assets
if (_asset.SaveSurface(value, info))
{
_surface.MarkAsEdited();
Editor.LogError("Failed to save material surface data");
Editor.LogError("Failed to save surface data");
}
_asset.Reload();
_asset.WaitForLoaded();

View File

@@ -223,7 +223,7 @@ namespace FlaxEditor.Windows.Assets
if (_asset.SaveSurface(value))
{
_surface.MarkAsEdited();
Editor.LogError("Failed to save Particle Emitter surface data");
Editor.LogError("Failed to save surface data");
}
_asset.Reload();
_asset.WaitForLoaded();

View File

@@ -1133,7 +1133,7 @@ namespace FlaxEditor.Windows.Assets
{
// Error
_surface.MarkAsEdited();
Editor.LogError("Failed to save Visual Script surface data");
Editor.LogError("Failed to save surface data");
}
_asset.Reload();
SaveBreakpoints();

View File

@@ -2143,7 +2143,7 @@ BytesContainer VisualScript::LoadSurface()
#if USE_EDITOR
bool VisualScript::SaveSurface(BytesContainer& data, const Metadata& meta)
bool VisualScript::SaveSurface(const BytesContainer& data, const Metadata& meta)
{
// Wait for asset to be loaded or don't if last load failed
if (LastLoadFailed())

View File

@@ -255,7 +255,7 @@ public:
/// <param name="data">Stream with graph data.</param>
/// <param name="meta">Script metadata.</param>
/// <returns>True if cannot save it, otherwise false.</returns>
API_FUNCTION() bool SaveSurface(BytesContainer& data, API_PARAM(Ref) const Metadata& meta);
API_FUNCTION() bool SaveSurface(const BytesContainer& data, API_PARAM(Ref) const Metadata& meta);
// Returns the amount of methods in the script.
API_FUNCTION() int32 GetMethodsCount() const