Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Custom Editor - Move Input Field

Discussion in 'Scripting' started by Dextozz, Jul 6, 2020.

  1. Dextozz

    Dextozz

    Joined:
    Apr 8, 2018
    Posts:
    493
    I'm creating a custom editor for scriptable object data. I managed to get everything working, however, when I expand the fields of one object, some variable names are too long to fit. I would like to somehow move these input fields a bit to the right so "ReallyLongParamName" and similar can fit. This can get quite messy if I have nested variables as variable names get indented and input fields stay in line. At a certain depth, I can't even read the name of the variable.

    I'm drawing a single field with the simple:
    EditorGUI.PropertyField(fieldRect, property, label, true);


    upload_2020-7-6_12-29-23.png
     
  2. Dextozz

    Dextozz

    Joined:
    Apr 8, 2018
    Posts:
    493