Top of Inspector does not seem to have correct layout

Hello,

I have a problem with Unity 2019.1.14f1 editor where the top part of the inspector does not display the buttons correctly.

Here is an image of this:

Instead of having a checkbox for static, I can set the numerical value.

How can this be fixed?

Thank you!

does that happen with all gameobjects? maybe some editor script is doing that…

does that happen in empty new project also?

1 Like

See this thread: I have a problem with inspector window in unity

@mgear @Valjuin ,

It indeed seems to be an editor script that is causing this. It is happening for every gameobject. I was following the tutorial here:

. One of the very first things is writing an editor scrip that looks a little like this:
Editor code

using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(GameObject))]
public class CubeEditor : Editor
{
    GameObject selectedCube;
    Cube cubeComponent;
    float radius = 4f;

    private void OnEnable()
    {
        selectedCube = (GameObject) target;
        cubeComponent = selectedCube.GetComponent<Cube>();
        SceneView.duringSceneGui += CustomUpdate;
    }

    private void CustomUpdate(SceneView obj)
    {
        // Debug.Log("CustomUpdate subscribed to the editor application's update delegate.");

        Event e = Event.current;
        if (e.isKey && e.character =='g')
        {
            GameObject instantiatedCube = (GameObject) PrefabUtility.InstantiatePrefab(Resources.Load("Cube"));

            instantiatedCube.transform.position = selectedCube.transform.position +
                (Quaternion.Euler(Random.Range(-180, 180), Random.Range(-180, 180), Random.Range(-180, 180))) * Vector3.forward * Random.Range(0.1f, radius);
        }
    }

    private void OnDisable()
    {
        SceneView.duringSceneGui -= CustomUpdate;
    }

    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        // Debug.Log(selectedCube.name);
    }
}

Commenting this whole file fixed the issue. So it must be this script.