Merge branch 'loceditor_fix' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-loceditor_fix
This commit is contained in:
@@ -137,7 +137,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
table.Entries = entries;
|
||||
if (!table.Save(path))
|
||||
{
|
||||
Object.Destroy(table);
|
||||
Object.DestroyNow(table);
|
||||
newTables.Add(FlaxEngine.Content.LoadAsync<LocalizedStringTable>(path));
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
|
||||
table.Locale = culture.Name;
|
||||
if (!table.Save(path))
|
||||
{
|
||||
Object.Destroy(table);
|
||||
Object.DestroyNow(table);
|
||||
newTables.Add(FlaxEngine.Content.LoadAsync<LocalizedStringTable>(path));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ bool JsonAssetBase::Save(const StringView& path)
|
||||
rapidjson_flax::StringBuffer buffer;
|
||||
PrettyJsonWriter writerObj(buffer);
|
||||
_isResaving = true;
|
||||
Save(writerObj);
|
||||
saveInternal(writerObj);
|
||||
_isResaving = false;
|
||||
|
||||
// Save json to file
|
||||
@@ -189,6 +189,12 @@ bool JsonAssetBase::Save(JsonWriter& writer) const
|
||||
{
|
||||
if (OnCheckSave())
|
||||
return true;
|
||||
|
||||
return saveInternal(writer);
|
||||
}
|
||||
|
||||
bool JsonAssetBase::saveInternal(JsonWriter& writer) const
|
||||
{
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
writer.StartObject();
|
||||
|
||||
@@ -101,6 +101,7 @@ protected:
|
||||
void unload(bool isReloading) override;
|
||||
#if USE_EDITOR
|
||||
void onRename(const StringView& newPath) override;
|
||||
bool saveInternal(JsonWriter& writer) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user