用户工具

站点工具


侧边栏

script:unityengine:classes:transform:transform.localscale

Transform.localScale 局部缩放

JavaScript ⇒ var localScale: Vector3;
C# ⇒ Vector3 localScale;

Description 描述

The scale of the transform relative to the parent.

相对于父级变换的缩放。

JavaScript:

	 // Widen the object by 0.1
	transform.localScale += Vector3(0.1,0,0);

C#:

using UnityEngine;
using System.Collections;
 
public class ExampleClass : MonoBehaviour {
    void Example() {
        transform.localScale += new Vector3(0.1F, 0, 0);
    }
}

Transform

script/unityengine/classes/transform/transform.localscale.txt · 最后更改: 2016/08/02 05:37 (外部编辑)