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. Dismiss Notice

Bug EditorUtility.OpenFilePanel causes build crash !

Discussion in 'Editor & General Support' started by David69, Dec 21, 2022.

  1. David69

    David69

    Joined:
    Oct 2, 2018
    Posts:
    31
    Hi, I'm using Unity 2019.2.0f1

    When I use EditorUtility.OpenFilePanel to open a png file it works fine in the Unity application, but when I try and build it crashes every time. This is definitely the cause of the crash as when I comment it out it builds fine.

    Is this a known bug/issue ? I searched this forum but not found it or any potential fixes ? Is there an alternative to using EditorUtility.OpenFilePanel ? I can't change the Unity version as am restricted to company version.

    Thanks

    David
     
  2. Sebioff

    Sebioff

    Joined:
    Dec 22, 2013
    Posts:
    218
    EditorUtility is only available within the Editor, it's not possible to create a build that's using it.

    There's no alternative that's built into Unity. You would have to look for one on the Asset Store or some other 3rd-party solution, or build your own.
     
  3. David69

    David69

    Joined:
    Oct 2, 2018
    Posts:
    31
     
  4. David69

    David69

    Joined:
    Oct 2, 2018
    Posts:
    31
    Ok thanks for the reply, I wasn't aware of that. Good to know !.

    David