言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

Vector4.Vector2

Description

Vector4をVector2に変換します

Vector4は暗黙的にVector2に変換できます。(Z、W軸は無視されます)

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