Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Custom Editor Cannot show Toggle

Discussion in 'Editor & General Support' started by vsprogramme_unity, Apr 7, 2020.

  1. vsprogramme_unity

    vsprogramme_unity

    Joined:
    Nov 17, 2019
    Posts:
    2
    Hello,
    I got a problem with my custom editor,
    I got a ReorderableList, I create in it some stuff and a toggle.
    I create my toggle like this :
    Code (CSharp):
    1. even.AttendreFin = EditorGUI.Toggle(
    2.             new Rect(rect.x, rect.y, rect.width - rect.x, EditorGUIUtility.singleLineHeight),
    3.             "Wait",
    4.             even.AttendreFin);
    It work well if i remove the label but when i put a label it doesn't show the box and the checkmark and you cannot know anymore if the checkbox is checked.

    I have tried change Rect size but it doesn't work.
    Any idea where can be the problem ?