Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

EditorGUILayout button?

Discussion in 'Scripting' started by Joselito123, Oct 21, 2020.

  1. Joselito123

    Joselito123

    Joined:
    Aug 12, 2014
    Posts:
    8
    Hi, I've made a custom editor using some EditorGUILayout elements with indentation set through EditorGUI.indentLevel. I need to add a button with the same indentation. There doesn't seem to be an EditorGUILayout.Button element, so I tried using GUILayout.Button, but this obviously doesn't take the indentation from EditorGUI.indentLevel. Is there a way to create a button through EditorGUILayout?
    Thanks in advance!
     
    ANONIM93, sisF, Novack and 1 other person like this.