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

Resolved WebGL matchWebGLToCanvasSize = false how to resize?!

Discussion in '2021.1 Beta' started by Laur3nt1u, Nov 22, 2020.

  1. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    25
    The new WebGL template when matchWebGLToCanvasSize = true, the default value, sets the canvas size without taking in consideration the devicePixelRatio so the game will be rendered at a very high resolution.
    I want to set the size myself so I make matchWebGLToCanvasSize = false but the problem is that when I set the canvas size the game is rendered correctly but the "touch/input layer" is smaller, is like the game is not scaled to 100% even though the rendered image is 100%
     
    Last edited: Nov 27, 2020
  2. Laur3nt1u

    Laur3nt1u

    Joined:
    Apr 30, 2014
    Posts:
    25
    Ok so it seems that it's fixed

    config.matchWebGLToCanvasSize = true and config.devicePixelRatio = 1
     
    Last edited: Mar 18, 2021