https://docs.unity3d.com/Manual/ExecutionOrder.html C# Script檔預設腳本程式碼如下: using UnityEngine; using System.Collections; public class ScriptFilename : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { } } 程式腳本 4 Wu, ShyiShiou Dept. of E.E., NKUT
在類別開頭宣告Sprite陣列及SpriteRenderer public class UI_Control : MonoBehaviour { public Sprite[] SpriteTexture = new Sprite[3]; private SpriteRenderer Sprite_Renderer; // Use this for initialization void Start () { } ... } 設計動態按鈕 3/12 7 Wu, ShyiShiou Dept. of E.E., NKUT