eventGroupingAllowed
Controls if contact and trigger begin/end events for shapes assigned a group are marked as being the first or last event between the two groups involved. This allows the many events produced between two groups of shapes to be reduced to a single begin and end, such as when treating multiple shapes on one body as a single object. The marking is only calculated for shapes assigned a group and only when a begin or end event is produced, so the cost of leaving this enabled is minor.
阅读时间1 分钟最后更新于 24 天前
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public bool eventGroupingAllowed { get; set; }
Remarks
Every shape in a group must belong to the same body; see PhysicsWorld.PhysicsGroup for the limitations. See PhysicsShape.physicsGroup and PhysicsWorld.CreateGroup.