Page 1 of 1
Vectors always showing as Vector4 in inspector
Posted:
Tue Nov 13, 2018 10:21 am
by AndrewMyriad
Not sure if this is a known issue, did a quick forum search but pretty common term. Is there a reason why regardless of if you create a Vector2, Vector3 or Vector4 node and make it a property, it always shows X, Y, Z and W values in the inspector?
Re: Vectors always showing as Vector4 in inspector
Posted:
Tue Nov 13, 2018 10:59 am
by Amplify_Borba
Hello, vector2 and vector3 properties displaying as a vector4 is an expected behavior, the reason behind this is due to the way that Unity handles shaders, as it only receives single float or float4 values.
This means that the last two values for the Vector2 and the last value for the Vector3 are ignored and do nothing.
Please let me know if you have any further questions, thanks!
Re: Vectors always showing as Vector4 in inspector
Posted:
Fri Nov 16, 2018 4:54 am
by AndrewMyriad
That makes sense! Thanks!
Re: Vectors always showing as Vector4 in inspector
Posted:
Fri Nov 16, 2018 9:20 am
by Amplify_Borba
Glad to help, don't hesitate to get back in touch if you have any further questions!