A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Project Tiny' started by BaspooGameDev, Nov 27, 2020.
How To Get Screen Size Width Height.
or i need example code to get DisplayInfo pls.
Remember that you can only use the DisplayInfo class when not testing in the editor. Here is a simple example how to get the screen witdth and height:
var di = GetSingleton<DisplayInfo>();
var height = di.height;
var width = di.width;
It rarely returns wrong values for me but it seems to be a problem with the DisplayInfo class and my dynamic window size. But for testing and prototyping this works just fine