Inspector extension - Katsuya100/SceneLayer-Trial GitHub Wiki

This section describes how to extend the inspector of LayerBehviour, TransitionBehaviour and LoaderBehaviour.
Only the properties of each Behaviour can be extended.
We will support the editor part on the system in the future upon request.

Inspector Class

Class Corresponding Behaviour
LayerInspector LayerBehaviour
TransitionInspector TransitionBehaviour
LoaderInspector LoaderBehaviour

Steps

  1. Select [Right-click > Create > SceneLayer] on the Project view.
  2. Select the inspector class you wish to create.
    image
  3. Enter the name of the editor script (Example:TitleEditor)
    image
  4. Fill in the CustomEditor argument with the derived type of the Behaviour you wish to edit. (Example:Title)
[CustomEditor(typeof(Title), true)]
public class TitleEditor : LayerInspector
  1. Override the OnPropertyInspectorGUI function and write the editor extension.

Note

Extending UnityEditor.Editor by direct inheritance may lead to problems.
Also, be careful not to use OnInspectorGUI.