- Home /
Custom inspector for MonoScript
Hi!
I want to extend Inspector for MonoScript (any script in Assets folder) and display some information below standart script conter preview.
The problem is I can't find any MonoScriptEditor to inherit from and inheriting from Editor
removes MonoScript GUI (script preview, script name, Assembly information and so on).
using UnityEditor;
[CustomEditor(typeof(MonoScript))]
public class CustomMonoScriptInspector : /* ----> */ Editor // <---- What to put here?
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.PrefixLabel("My additional info");
}
}
Answer by Prastiwar · Aug 11, 2018 at 07:32 PM
This is not possible. I'm not sure why would you do this, but maybe you should try ScriptableObjects.
Your answer
Follow this Question
Related Questions
Can not you change the default GUI style of EditorGUI in OnInspectorGUI? 1 Answer
How can i get SerializedProperty from UnityEvent which in List. Sorry for my Eng. 2 Answers
Questions Regarding Images in Custom Inspector/Editor 1 Answer
Make a custom inspector that shows a group of variables in form of list 2 Answers
How to Hide/Show List or Array in the inspector based on a variable? 0 Answers