기술 자료

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.