Editor Fix
This commit is contained in:
parent
c244ddeb98
commit
57790c4598
|
@ -142,8 +142,9 @@ namespace Syntriax.Modules.Movement.Editor
|
|||
string jsonText = JsonUtility.ToJson(definition, true);
|
||||
string path = $"Assets/Resources/{MovementDefinitionFactory.ResourceDirectoryToDefinitions}{definition.Name}.json";
|
||||
|
||||
if (!EditorUtility.DisplayDialog("Conflict", $"\"{path}\" already exists, do you want to overwrite?", "Overwrite", "Cancel"))
|
||||
return;
|
||||
if (System.IO.File.Exists($"{Application.dataPath}/Resources/{MovementDefinitionFactory.ResourceDirectoryToDefinitions}{definition.Name}.json"))
|
||||
if (!EditorUtility.DisplayDialog("Conflict", $"\"{path}\" already exists, do you want to overwrite?", "Overwrite", "Cancel"))
|
||||
return;
|
||||
|
||||
System.IO.File.WriteAllText(path, jsonText);
|
||||
AssetDatabase.Refresh();
|
||||
|
|
Loading…
Reference in New Issue