This piece of code gives the errors:
GUI.matrix = Matrix4x4.TRS( Vector3.zero, Quaternion.identity, Vector3( (float)Screen.width / nativeWidth, (float)Screen.height / nativeHeight, 1f) );
" Assets/Scripts/UI-MAP/GUIMain.cs(46,40): error CS1503: Argument #3' cannot convert
object’ expression to type `UnityEngine.Vector3’"
“Assets/Scripts/UI-MAP/GUIMain.cs(46,80): error CS0119: Expression denotes a type', where a
variable’, value' or
method group’ was expected”
Whereas this one doesn’t: I couldn’t figure what this is about, hope you can help me thanks.
float rx = (float)Screen.width / nativeWidth;
float ry = (float)Screen.height / nativeHeight;
Vector3 vect = new Vector3(rx, ry, 1f);
GUI.matrix = Matrix4x4.TRS( Vector3.zero, Quaternion.identity, vect );