From 422dcc6f5b0431176dc9e1597b76872171a19283 Mon Sep 17 00:00:00 2001 From: Chromium <62724067+Chromum@users.noreply.github.com> Date: Mon, 28 Apr 2025 04:46:57 +0100 Subject: [PATCH] foxed file path --- Editor/Scripts/Editor/Data Types/ImageData.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) 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); } } }