Unity3D 使用脚本来控制 UI 的 Image 显示的图片。

记录一下这个问题。

原文地址:http://tieba.baidu.com/p/3561719701

object obj = Resources.Load(资源名, typeof(Sprite));
Sprite sp = obj as Sprite;
img.sprite = sp;
原文地址:https://www.cnblogs.com/cjnmy36723/p/4483787.html