Search Unity

Unite Now - Using the Device Simulator to Fireproof Your Mobile App’s UI

Discussion in 'General Discussion' started by AskCarol, Jul 20, 2020.

  1. AskCarol

    AskCarol

    Joined:
    Nov 12, 2019
    Posts:
    234
    Unite Now Session
    Leverage the Device Simulator (Preview) to see what your project/app looks like and how it runs across various mobile devices, all within the Unity Editor. We show you how to adjust an existing UI for various device resolutions, use uGUI, and make simple tweaks with code.

    When
    Wed, July 30, 9:00 AM PT


    Where
    You can watch the session here!
    Make sure to sign up to get access to all Unite Now content.


    ______________________


    A team of product experts from across Unity will be available during and after the session. Our Community team will continue to field questions to foster an ongoing discussion with the community. Please feel free to ask your questions in this thread. Only questions related to the topics of the session are permitted.

    We really look forward to hearing from the community.

    Thank you!
     
  2. Elliott_Twinkl

    Elliott_Twinkl

    Joined:
    Sep 21, 2020
    Posts:
    1
    @AskCarol I'm enjoying the device simulator so far! I have a few questions regarding accessing the device simulator programatically. I think it would be powerful for developers to be able to change the active device through code, and to access fields.

    I've been trying to write an extension which will allow me to gather an active instance of the device simulator and access the friendly device name of the currently selected device, however the methods and variables underpinning the device simulator do not appear to be accessible.

    As a work around I am searching the device definitions (json files) and comparing the reported SystemInfo.DeviceModel to that in the device definitions. I think I've discovered an error with the device simulator reporting system info incorrectly from a prefab instantiated from a package. I have included the package. Looking forward to your reply.

    Thanks,
    Elliott
     

    Attached Files:

  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Simulator is great, previously it was pretty much impossible to get mobile layouts to look the same on device as in editor, now its a breeze.

    It would be cool to get the nintendo switch screen added to this (obviously only accessible if you have a nintendo license ofcourse) as I think this is useful not just to mobile
     
  4. Havyx

    Havyx

    Joined:
    Oct 20, 2020
    Posts:
    140
    The device simulator is amazing but my main concern is the slow progress to stable tech. September 2019 - December 2020 makes it 1 year 3 months in preview.

    Last document revision was December 2019 (so an entire year ago) for the 2.0.0-preview... but the latest version is 2.2.4-preview. So I wonder if it's because:

    1) The device simulator has been updated since 2.0.0-preview but the related documentation has not been updated.

    2) There have been no significant changes/updates between 2.0.0-preview and 2.2.4-preview - hence no updated docs.

    In either case it's not great. The remote app is unusable and trying to develop for mobile without stable tech just makes everything more difficult.

    Even Unity basically say "don't use preview packages in production" yet doing exactly that is almost unavoidable in this case.

    I just hope the device simulator isn't low priority and that we might see a stable release by 2022 (or it will have been in preview for 3 years by that point).

    Also, I believe packages marked "preview" are "something Unity might discontinue in the future" - hence why they recommend not using them in production (amongst other reasons) which makes it less than ideal to use.

    upload_2020-12-5_22-0-53.png