最常見的有
1. 輸入數值,如 int float等
2. 變更顏色
3. 輸入座標或向量
4. 勾選
5. 下拉式選單
效果如下圖
其實要達到非常簡單,
只需將想要在inspector也能更改的數值,設為public即可。
程式碼如下
using UnityEngine;
using System.Collections;
public class inputInGame : MonoBehaviour {
public int editNum;
public Color color;
public Vector3 position;
public bool check;
public enum customExpand {choose1, choose2 }
public customExpand expand;
// Update is called once per frame
void Update () {
}
}

沒有留言:
張貼留言