- Home /
I am trying to change the model importer but it does not have the right formatting.
> using UnityEngine;
> using UnityEditor;
>
>
> [CustomEditor(typeof(ModelImporter))]
> public class testEditor : Editor
> {
> public override void OnInspectorGUI()
> {
> base.OnInspectorGUI();
>
> if (GUILayout.Button("lol"))
> {
> Debug.Log("lol");
> }
> }
> }
when I make look at the editor it just looks like this it does not have the right formatting
please help
I think you somehow have to get the correct editor for ModelImporter. I don't know off my head of any way to do that but maybe there is some API that let you get the default editor for a given type. Edit: A hacky wacky way to do it might be to use reflection to poke around in UnityEditor.dll to see if you find the editor and maybe use that. Not sure if it would work. I hope there are better ways, just thought I'd throw that in as a last ditch resort idea.
Your answer
Follow this Question
Related Questions
Custom Editor losing settings on Play 5 Answers
Custom Editor Window 2 Answers
Custom Editor not working :( 2 Answers
Extending ButtonEditor 1 Answer
how to know if the lightmap build button has been pressed? 0 Answers