Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

Collider.GetGeometry

Declaration

public T GetGeometry();

Returns

T Type of geometrical shape.

Description

Returns the geometric shape of the collider of the requested type.

Throws an InvalidOperationException if you request a shape that is not present in the collider. Additional resources: BoxGeometry, SphereGeometry, CapsuleGeometry, ConvexMeshGeometry, TriangleMeshGeometry, TerrainGeometry.