Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DrawQueryCastRay

Draw the PhysicsWorld.CastRay query input.
Read time 1 minuteLast updated 13 days ago

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.