Note
[Note/Unity] Sprite Resource Load
령호
2015. 4. 30. 01:03
- nice -
Resources.Load<Sprite>(path); // success
- bad -
Resources.Load(path) as Sprite; // fail
or
Texture2D tex = Resources.Load(path) as Texture2D;
Sprite.Create(tex, rc, pivot); // success (instance sprite)