文档

Unity Engine

Unity Engine

GetSegmentIndex(PhysicsShape)

Get the index of the specified Chain Segment PhysicsShape.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public int GetSegmentIndex(PhysicsShape chainSegmentShape)

Parameters

chainSegmentShape

The chain segment shape to find the index of.

Returns

Type

Description

intThe index of the chain segment shape in its parent chain. This is a value of zero to the number of chain segment shapes - 1.