Commit 009a00e8 authored by mercury233's avatar mercury233

fix GetTexture2D (field picture)

parent 3f55e113
...@@ -734,7 +734,11 @@ public static class UIHelper ...@@ -734,7 +734,11 @@ public static class UIHelper
} }
public static Texture2D GetTexture2D(string path) public static Texture2D GetTexture2D(string path)
{ {
if (!File.Exists(path))
{
return null;
}
var pic = new Texture2D(0, 0); var pic = new Texture2D(0, 0);
pic.LoadImage(File.ReadAllBytes(path)); pic.LoadImage(File.ReadAllBytes(path));
return pic; return pic;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment