기술 자료

Unity Engine

Unity Engine

SetSelectedDrawing(ReadOnlySpan<PhysicsShape>, bool)

Set the selected drawing state on a batch of shapes.
읽는 시간 1분최근 업데이트: 23일 전

Definition

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

Parameters

The shapes to set the selected drawing state on.

selected

The selected drawing state to set on every shape.

Returns

Type

Description

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

Remarks

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