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); } }
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()); } }