Answers for "get the dimentions of the canvas unity"

C#
0

get the dimentions of the canvas unity

Canvas canvas = FindObjectOfType<Canvas>();  
 float h = canvas.GetComponent<RectTransform>().rect.height; 
 float w = canvas.GetComponent<RectTransform>().rect.width;
Posted by: Guest on September-14-2021

Code answers related to "get the dimentions of the canvas unity"

C# Answers by Framework

Browse Popular Code Answers by Language