📜  更改对象统一的比例 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:42.154000             🧑  作者: Mango

代码示例2
public GameObject cube;
    public Vector3 sizeChange; // This has to be set for (x,y,z) in the editor
    //public float cubeSize = 0.2f;

    void OnMouseDown()
    {
        cube.transform.localScale = cube.transform.localScale - sizeChange;    
    }