📜  unity image - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:10.197000             🧑  作者: Mango

代码示例1
//Make sure you are using UnityEngine.UI
using UnityEngine.UI

//We can assign this image in the inspector
public Image image;
//Also assign this in the inspector
public Sprite mySprite;

public void ChangeImage () 
{
    image.sprite = mySprite;
}