コード例 #1
0
    public void OnEnable()
    {
        behaviour = target as LevelItemBehaviour;

        behaviour.UpdateMaterial();
        prevType = behaviour.Type;
    }
コード例 #2
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        if (behaviour.Type != prevType)
        {
            behaviour.UpdateMaterial();
        }

        prevType = behaviour.Type;
    }