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

スクリプト言語

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

Material.mainTextureScale

public var mainTextureScale: Vector2;

Description

メインテクスチャのスケール

これは GetTextureScale"_MainTex" を使用しての SetTextureScale と同じ動作をします。 See Also: SetTextureScale, GetTextureScale.

	function Update () {
		// Animates main texture scale in a funky way!
		var scaleX : float = Mathf.Cos (Time.time) * 0.5 + 1;
		var scaleY : float = Mathf.Sin (Time.time) * 0.5 + 1;
		renderer.material.mainTextureScale = Vector2 (scaleX,scaleY);
	}