关于unity3d动态设置图片我找了相关的函数,我试了下,确实有用。如果你也需要,可以试试。
public class MenuUIController : MonoBehaviour {
public Image Background;
public Sprite sprite;
// Use this for initialization
void Start () {
Background.sprite = sprite;
}
// Update is called once per frame
void Update () {
}
}
public class MenuUIController : MonoBehaviour {
public Image Background;
public Sprite sprite;
// Use this for initialization
void Start () {
Background.sprite = sprite;
}
// Update is called once per frame
void Update () {
}
}