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
- Select [Right-click > Create > SceneLayer] on the Project view.
- Select the inspector class you wish to create.
- Enter the name of the editor script (Example:
TitleEditor
)
- 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
- 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
.