Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

LayerMask PropertyField not calling GUI.changed

Discussion in 'Immediate Mode GUI (IMGUI)' started by CDF, Sep 11, 2015.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,329
    Hi, I'm having some trouble getting a changed event from a LayerMask property. None of these work:

    Code (CSharp):
    1. GUI.changed = false;
    2. EditorGUI.BeginChangeCheck();
    3. EditorGUILayout.PropertyField(layerMaskProperty);
    4. if (EditorGUI.EndChangeCheck() || GUI.changed) {
    5. //doesn't get called
    6. }
    any ideas how to listen for a change on a LayerMask field?
     
  2. StuwuStudio

    StuwuStudio

    Joined:
    Feb 4, 2015
    Posts:
    165
    Bump 8 years later. Is this a bug? Should I report it? Or am I missing something?