文档

Unity Engine

Unity Engine

center

The center point of the collider in local space.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
警告
Removed. BoxCollider2D.center has been obsolete. Use BoxCollider2D.offset instead
Upgrade to offset
public Vector2 center { get; set; }