Vector4.operator Vector3 Manual     Reference     Scripting  
Scripting > Runtime Classes > Vector4
Vector4.operator Vector3

static implicit function Vector3 (v : Vector4) : Vector3


Converts a Vector4 to a Vector3.

Vector4s can be implicitly converted to Vector3 (w is discarded).

function Start ()
// Shader vectors are always Vector4s.
// But the value here is converted to a Vector3.
var value : Vector3 = renderer.material.GetVector("_SomeVariable");