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

EditorGUI.MaskField to array

Discussion in 'Scripting' started by SlayerOfGod, Nov 11, 2015.

  1. SlayerOfGod

    SlayerOfGod

    Joined:
    Sep 22, 2012
    Posts:
    8
    I'm making a property drawer and i'm using the EditorGUI.MaskField.

    Code :

    string[] values = new string[] { "v1", "v2", "v3" };
    flags = EditorGUI.MaskField(position, label, flags, values);

    I can't find the way to convert my flags back to an array of the values i selected.

    Example :

    string[] valuesSelected = Magic(flags)

    Please help :)
     
  2. SlayerOfGod

    SlayerOfGod

    Joined:
    Sep 22, 2012
    Posts:
    8
  3. adarshmapbox

    adarshmapbox

    Joined:
    Oct 31, 2017
    Posts:
    1