文档

Unity Engine

Unity Engine

GetGeometry<T>()

Returns the geometric shape of the collider of the requested type.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public T GetGeometry<T>() where T : struct, IGeometry

Returns

Type

Description

TType of geometrical shape.

Remarks

Throws an InvalidOperationException if you request a shape that is not present in the collider.