Search Issue Tracker

By Design

Votes

0

Found in

5.6.0f3

Issue ID

900595

Regression

No

[WebGL] UnityLoader.instantiate width and height parameters do not resize canvas

WebGL

-

To reproduce:

1. Open the project, attached by user
2. Build & Run for WebGL
3. Observe the size of the canvas

Expected: specifying width and height parameters in UnityLoader.instantiate should resize the canvas by the specified values
Actual: specifying width and height parameters in UnityLoader.instantiate does not resize the canvas by the specified values

Reproduced in 5.6.0f1, 5.6.0f2, 5.6.0f3, 5.6.0p1, 2017.1.0b1
Could not reproduce in 5.5 or lower, because this feature does not exist

By design: you need to specify whether width and height are pixel, percent values, etc.. for example:
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/test.json", {width: "200px", height: "200px"});
or
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/test.json", {width: "50%", height: "50%"});

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.