diff --git a/Editor/Scripts/Editor/Data Types/ImageData.cs b/Editor/Scripts/Editor/Data Types/ImageData.cs index 590b36b..8e89e4b 100644 --- a/Editor/Scripts/Editor/Data Types/ImageData.cs +++ b/Editor/Scripts/Editor/Data Types/ImageData.cs @@ -70,22 +70,10 @@ public struct ImageData { Texture2D texture = this.ToTexture2D(); byte[] data = texture.EncodeToPNG(); - string thePath; - - if (path.StartsWith("Assets/")) - { - thePath = path.Substring("Assets/".Length); - } - else - { - thePath = path; - } - - thePath.Replace("/", "\\"); if (data != null) { - System.IO.File.WriteAllBytes(Path.Combine(Application.dataPath, thePath), data); + System.IO.File.WriteAllBytes(path, data); } } }