devNotes 4-9-2017 Custom Editor – Palette Dropdown

[ExecuteInEditMode]
class Something {
    void Update() {
        if (Application.isPlaying) {
            // code executed in play mode
        } else {
            // code executed in edit mode
        }
    }
}
#if UNITY_EDITOR
using UnityEditor;
#endif

[ExecuteInEditMode]
class Something {
    void Update() {
#if UNITY_EDITOR
        Debug.Log("Current scene name: " + EditorApplication.currentScene);
#endif
    }
}

 

http://catlikecoding.com/unity/tutorials/editor/custom-list/

 

palette

Leave a Reply

Your email address will not be published. Required fields are marked *