Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Assertion errors silent in development build

Discussion in 'Editor & General Support' started by OneManEscapePlan, Apr 9, 2024.

  1. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    222
    Currently using Unity 2021.3.35f1:

    In development builds of our game on iOS, when a Unity assertion fails, the exception is thrown and the engine backs out of the current function. However, the developer console does not appear and no error message is displayed, so it's not obvious that an assertion error has occurred.

    1. Are Unity assertion errors supposed to appear in the developer console in development builds?
    2. If not, is there a way to disable assertion checks in development builds?
     
    Last edited: Apr 12, 2024
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    6,584
    Does the console appear when a "normal" exception is raised? I'm not sure this ingame console exists on mobile devices due to the illegibility of the text and the tiny buttons for a touch device. I can't recall whether I've seen it on mobile before.

    These errors should still be logged in the player log. And you can use the debugger to catch these assertions.

    Assertions should not simply be disabled, since whatever they assert may or may not represent an actual issue that can lead to subsequent failures that would then be even harder to track down. The manual mentions the scripting symbol but whether you can actively disable this in debug builds I don't know.
     
  3. OneManEscapePlan

    OneManEscapePlan

    Joined:
    Oct 14, 2015
    Posts:
    222
    Hmm, you're right that the console doesn't work at all on iOS. I could have sworn that it used to work on mobile; maybe that was on Android. Regardless, the Unity documentation doesn't say that this is a platform-specific feature, so I guess I'll file a bug report.