KITASENJU DESIGN BLOG

memo, html, javascript, unity

inspectorに独自の型を表示する

インスペクタに独自の型

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

[System.Serializable]
public class HogeClass {
    public string name;
    public int index2;
    public int index3;

}

public class UITest : MonoBehaviour {

    public List<HogeClass> hogeData;

}

enumもさらに使ってみた

[System.Serializable]
public class MotionData {

    public enum MotionType
    {
        MOTION_Z,
        MOTION_X
    }

    public MotionType type;
    public Motion motion;

}
"FOOTER"