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
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%"});
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment