Editor Fix

This commit is contained in:
Syntriax 2022-12-18 23:51:27 +03:00
parent c244ddeb98
commit 57790c4598
1 changed files with 3 additions and 2 deletions

View File

@ -142,6 +142,7 @@ namespace Syntriax.Modules.Movement.Editor
string jsonText = JsonUtility.ToJson(definition, true); string jsonText = JsonUtility.ToJson(definition, true);
string path = $"Assets/Resources/{MovementDefinitionFactory.ResourceDirectoryToDefinitions}{definition.Name}.json"; string path = $"Assets/Resources/{MovementDefinitionFactory.ResourceDirectoryToDefinitions}{definition.Name}.json";
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")) if (!EditorUtility.DisplayDialog("Conflict", $"\"{path}\" already exists, do you want to overwrite?", "Overwrite", "Cancel"))
return; return;