文档

Unity Engine

Unity Engine

SetSelectedDrawing(ReadOnlySpan<PhysicsJoint>, bool)

Set the selected drawing state on a batch of joints.
阅读时间1 分钟最后更新于 22 天前

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public static int SetSelectedDrawing(ReadOnlySpan<PhysicsJoint> joints, bool selected)

Parameters

The joints to set the selected drawing state on.

selected

The selected drawing state to set on every joint.

Returns

Type

Description

intThe number of joints that were ignored (not set because the joint was invalid). A single warning is logged when any are ignored.

Remarks

The joints can belong to different worlds; the world of each joint is locked only when it changes across the batch, so joints should be ordered by world for the fewest locks. Any invalid joint in the batch is ignored. See PhysicsJoint.selectedDrawing for what the state controls.