Exemplo n.º 1
0
 public Texture GetTextureFromName()
 {
     if (loaded_texture == null)
     {
         string path = FileHelper.FindFile(name, "texture");
         if (path != null)
         {
             loaded_texture = AssetDatabase.LoadAssetAtPath <Texture>(path);
         }
         else
         {
             loaded_texture = new Texture2D(1, 1);
         }
     }
     return(loaded_texture);
 }