how would i say gui.matrix in c#?
in js:
GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3 (Screen.width / 600.0, Screen.height / 400.0, 1));
for example…
help pls ![]()
how would i say gui.matrix in c#?
in js:
GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, Vector3 (Screen.width / 600.0, Screen.height / 400.0, 1));
for example…
help pls ![]()
Are you getting an error message? If so, can you post it?
One thing I notice is that you have ‘Vector3’ where you want ‘new Vector3’, so you might try making that change and see if it fixes whatever problem you’re having.
ok here we go
before your idea:
Assets/login_gui.cs(77,80): error CS0119: Expression denotes a type', where a variable’, value' or method group’ was expected
after:
Assets/login_gui.cs(77,45): error CS1526: A new expression requires () or [ ] after type
so…?
Then you made the change incorrectly. I think you were supposed to add the “new” keyword before Vector3 (the second one) and not change/remove anything else. If you added it before Vector3.zero, I don’t think that’s what Jesse meant.
next error::
GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, new Vector3 (Screen.width / 600.0, Screen.height / 400.0, 1));
error:
Assets/login_gui.cs(77,80): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
error2::
Assets/login_gui.cs(77,80): error CS1503: Argument 1: Cannot convert type `double' to `float'
help?
Decimal values in C# default to the type “double”, which is basically a float but it takes up more memory.
Putting an “f” after the variables should help (i.e. 100.0f).
May I ask why you’re using C#? You don’t seem to know it very well.
thanks that worked ![]()
im using the login sript from smartfox… it c# ![]()
i wanted tohave a gui like in another scene so…
thanks:)
Robert