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

How to show additional content after enum option selected?

Discussion in 'Editor & General Support' started by alex_hajdu, Feb 25, 2015.

  1. alex_hajdu

    alex_hajdu

    Joined:
    Nov 10, 2013
    Posts:
    32
    Hi guys, I'm new to Editor scripting and my goal is to make custom editor for my class.

    In my class there is an enum. If I select one of its options - "changeSprite", I want to custom editor shows default Sprite editor layout. When I select "changeColor" I want to editor shows color selecting editor. I think you got my point now..

    It's better to be done via property drawers or custom editor? And how?

    Thank you very much for the help or direction.
    Alex
     
    Last edited: Feb 25, 2015