Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. 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

Project Tiny - Wasm - free aspect ratio to fill browser width and height

Discussion in 'Project Tiny' started by newguy123, Apr 8, 2020.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Hi Guys

    With the samples when building to Wasm, it appears to be locked to a certain resolution or screen aspect ratio. Is this a limitation of Tiny?
    or.......
    1) is there a way to fill the browser window
    2) and be responsive when the user rotates their device landscape or portrait?
     
  2. JonasMumm

    JonasMumm

    Joined:
    Feb 22, 2019
    Posts:
    23
    Hello :)
    Generally you can set up the resolution used for rendering in your BuildConfiguration-Assets, but I'm certain rendering itself is currently restricted to a 16:9 aspect ratio.

    As to stretching the game to fill the entire window or reacting to device orientation, I don't think there is anything available in Project Tiny right now to achieve that. But you could probably embed the html generated from the wasm build inside an iframe into a custom html wrapper template, in which you could resize/stretch/fullscreen the iframe to your liking using javascript.
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    You've lost me, could you explain in a different way ot perhaps add more detail please?
     
  4. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    So to change the rendering resolusion in tiny there is a component in the build configuration
    for instance if you check Assets/BuildConfigurations/CommonTiny3D.buildconfiguration in Tiny3D sample
    you will see Tiny Rendering Settings
    change the screen resolution there and to get auto-size, enable Auto Resize Frame
    but as @JonasMumm said we are rendering in 16:9 aspect ratio
    upload_2020-4-9_12-58-22.png
     
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Yeah I saw those. I thought maybe if I delete the numbers it would auto fit the entire screen.

    Are there plans to remove the 16:9 limitation and enable a real auto resize to fit the browser window?
     
  6. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Yes, we are working on that and mostly will be in Tiny version 0.26
     
    newguy123 likes this.
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,183
  8. EduardDraude

    EduardDraude

    Joined:
    Mar 8, 2019
    Posts:
    60
    Any news to this topic? I guess it did not get in to 0.26