기술 자료

Unity Engine

Unity Engine

DrawQueryCastRay

Draw the PhysicsWorld.CastRay query input.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

DrawQueryCastRay(CastRayInput, Color, float, bool)

Draw the PhysicsWorld.CastRay query input.
public void DrawQueryCastRay(PhysicsQuery.CastRayInput input, Color color, float lifetime = 0, bool drawEnd = false)

Parameters

The query input to draw.

color

The color to draw with.

lifetime

How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.

drawEnd

Whether to draw the arrow at the end of the translation or not.

DrawQueryCastRay(ReadOnlySpan<CastRayInput>, Color, float, bool)

Draw the PhysicsWorld.CastRay query inputs.
public void DrawQueryCastRay(ReadOnlySpan<PhysicsQuery.CastRayInput> inputs, Color color, float lifetime = 0, bool drawEnd = false)

Parameters

The query inputs to draw.

color

The color to draw with.

lifetime

How long the element should be drawn for, in seconds. The default is zero indicating that it should only be drawn once. Lifetime is only used when the world is playing.

drawEnd

Whether to draw the arrow at the end of the translation or not.