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

Bug Modal windows don't work for MacOS as intended

Discussion in 'Editor & General Support' started by ItsGonnaBeOk, Jun 23, 2022.

  1. ItsGonnaBeOk

    ItsGonnaBeOk

    Joined:
    Jul 14, 2016
    Posts:
    21
    EditorGUILayout.Popup method does not work for EditorWindows that are called with window.ShowModal() for MacOS platform.

    To reproduce the bug, you have to use MacOS:

    1. Create custom EditorWindow.
    2. Add EditorGUILayout.Popup method to the OnGUI.
    2. Open window with window.ShowModal() method.
    3. Try to change value for the popup. It will be grayed out.
     
  2. vanderFeest

    vanderFeest

    Joined:
    Apr 12, 2017
    Posts:
    8
    Can I ask: the content of your modal window is showing then?
    Because on my Mac (MacBook Air M1 2020, macOS 12.6, Unity 2021.3.8f1) the window only gets painted after a click. Very annoying, but maybe it's a local issue, so thought I'd ask you first.
    (Sorry this isn't a solution to your issue)
     
  3. airaolagoitia

    airaolagoitia

    Joined:
    Oct 18, 2019
    Posts:
    2
    @ItsGonnaBeOk were you able to find a solution or workaround?

    I see the same thing in 2021.3.21 and 2022.2.12 on a PropertyField bound to an enum property that gets rendered as a PopupField.
     
  4. ItsGonnaBeOk

    ItsGonnaBeOk

    Joined:
    Jul 14, 2016
    Posts:
    21
    Unfortunately no, I had to switch to regular window instead of modal. Its Unitys internal bug, so I guess unless they fix it - we won't have a proper solution.