foxed file path
This commit is contained in:
parent
dfd4c498e1
commit
422dcc6f5b
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user