扩大BoxCollider

时间:2016-03-14 02:13:13

标签: c# unity3d

我想扩大BoxCollider。首先,我想获得一个Boxcollider并设置它的大小,然后进行放大(在指定的时间段内)

我停下来设定尺寸。我不知道如何制作它。

我有3个错误:

  
      
  • 类,结构或接口成员声明中的令牌'='无效
  •   
  • 方法必须具有返回类型
  •   
  • 预期类型
  •   

代码:

<base href="http://example.com/SUB-FOLDER">

}

1 个答案:

答案 0 :(得分:0)

您尝试使用3个参数而不是Vector3创建Vector2。

BoxCollider myCollider = transform.GetComponent<BoxCollider> ();
myCollider.size = new Vector3(3,3,3); // here are these errors