Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,296
    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?