示例#1
0
 public void LoadSpr(string path)
 {
     InitComponent();
     if (spr_path != path)
     {
         spr_path      = path;
         _image.sprite = UIEditorHelper.LoadSpriteInLocal(path);
         _image.SetNativeSize();
         gameObject.name = CommonHelper.GetFileNameByPath(path);
     }
 }
示例#2
0
 public void LoadSpr(string path)
 {
     InitComponent();
     //Debug.Log("path : " + path);
     if (spr_path != path)
     {
         spr_path      = path;
         _image.sprite = UIEditorHelper.LoadSpriteInLocal(path);
         _image.SetNativeSize();
         gameObject.name = CommonHelper.GetFileNameByPath(path);
         //Debug.Log("_image.sprite :" + (_image.sprite != null).ToString());
     }
 }