Search Unity

Feedback Improve debugging

Discussion in 'Editor & General Support' started by xtdiwd, Jan 26, 2021.

  1. xtdiwd

    xtdiwd

    Joined:
    Jul 25, 2020
    Posts:
    135
    I need, in the Unity Editor, to emulate features of physical devices such as battery charge, if it is charging or discharging, system time, GPS coordinates, orientation, use an mp3 to simulate a microphone input, so as to have it the same every time, or an mp4 as a virtual camera.
    In another thread I was advised to use a wrapper but it is added code (which slows down), also I think that in that way the response of the program would be less accurate.

    I know that some of these things can be done in Android Studio but it's complicated to compile the apk and then launch it in the emulator. Moreover in this way I lose the possibility to debug. It would be much easier if you could emulate these features directly in Unity!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    You can debug right on device. Look it up, check it out. You can also get logs fresh off the device in real time.

    I disagree.

    Google can barely keep up with the stream of bugs they introduce in their new features.

    Apple can barely keep up with their stream of bugs in their hardware and software.

    Unity can barely keep up with its own stream of bugs for actual platform agnostic game features that everybody wants and uses.

    The last thing I want Unity to worry about is tracking down battery life and other weird edge-case features in every platform known to man!
     
    Marc-Saubion likes this.
  3. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    I also disagree.

    Making that feature yourself is quite easy. Juste make a script that get these value into variables that your game is going to use. You can then add functions to override them in the editor so you can make any test scenarios you need.

    Doing that yourself isn't just faster, it also gives you control on what you actually need instead of being stuck with a bug or a feature designed by someone who didn't understand your needs.

    Like @Kurt-Dekker, I'd rather have Unity concentrate their efforts on the game engine itself instead of accessories features that we'd rather make ourselves if they didn't prevent us to.
     
    Kurt-Dekker likes this.