StaticcameraStaticcameraGet the world space rotation of the camera that the gizmos are being rendered for.
StaticcolorStaticfarSets the distance at which gizmos start to fade out.
StaticgizmoStaticgizmoStaticisEnables or disables the depth fading for further draw calls.
StaticisDetermines if depth-testing is enabled (Default: Enabled)
StaticisEnables depth testing, and renders the occluded portion with a tinted color. (Default: False)
StaticlayerSets the layer bitfield that controls whether a handle is considered visible in a specific camera. Handle layer must match camera layer in order for the camera to render it
StaticnearSets the distance at which gizmos start to fade out near the camera.
StaticocclusionStaticscreenStaticspecialSet special rendering flags.
StaticworldStaticworldStaticworldGets the rotation of the transform that will be applied to further draw calls
StaticworldStaticworldStaticalignStaticdrawStaticdrawDraws a flat arrow.
Starting point of the arrow
End point of the arrow.
Normal of the arrow.
Width of the line of the arrow.
Length of the triangle tip. Does not influence overall length of the arrow (the line gets shorter instead)
Width of the triangle tip.
OptionaltipOffset: numberMoves the tip along the line of the arrow.
OptionaldoubleEnded: booleanWhether the arrow has tips on both ends.
StaticdrawDraws a mesh representing 2D text facing the camera with the specified properties.
Position to render the text at. Text will be centered around this point.
Text to draw.
Font to use for rendering the text's characters.
OptionalfontSize: numberSize of the characters, in points.
Optionalanchor: Immutable<Vector2>Anchor for placement. Vector2(0, 0) is the top left, Vector(1, 1) bottom right.
OptionalisUsingPixelPerfectLayout: booleanIf true, the actual size in pixels of the text is used to layout it relative to the anchor.
OptionalmaximumWidth: numberMaximum width of the text. If it is wider, it will be broken into multiple lines.
StaticdrawDraws a solid cone.
Position of the center of the base of the cone.
Orientation of the cone, pointing from center base to the tip of the cone.
Height of the cone (along the normal).
Radius of the base of the cone.
Scale applied to cone's disc width & height. Allows you to create elliptical cones.
Draws a solid cone.
StaticdrawStaticdrawStaticdrawDraws a solid cylinder.
Position of the center of the base of the cylinder.
Orientation of the cone, pointing from center base to the top of the cylinder.
Height of the cylinder (along the normal).
Radius of the cylinder.
Optionalscale: Immutable<Vector2>Scale applied to cylinder's disc width & height. Allows you to create elliptical cones.
StaticdrawStaticdrawStaticdrawDraws an icon Image at the specified scene position.
StaticdrawStaticdrawStaticdrawDraws a solid mesh.
The mesh to render.
Optional base color texture.
Optional normal texture.
The orientation of the axis.
StaticdrawStaticdrawStaticdrawStaticdrawStaticdrawDraws a solid skeleton bone.
The position of the joint (or start of the bone).
The radius of the bone.
If true, only lines will be drawn to the parent, and no cones
OptionaljointColor: Immutable<SRGBColor>OptionalparentColor: Immutable<SRGBColor>Color of the parent bone
StaticdrawStaticdrawDraws a mesh representing 2D text with the specified properties.
Position to render the text at. Text will be centered around this point.
Direction of the text baseline in 3D space.
Up direction of the text in 3D space.
Text to draw.
Font to use for rendering the text's characters.
OptionalfontSize: numberSize of the characters, in points.
Optionalanchor: Immutable<Vector2>Anchor for placement. Vector2(0, 0) is the top left, Vector(1, 1) bottom right.
OptionalisUsingPixelPerfectLayout: booleanIf true, the actual size in pixels of the text is used to layout it relative to the anchor.
OptionalmaximumWidth: numberStaticdrawDraws a solid torus.
The orientation of the torus.
The radius of the torus.
The tube radius of the torus.
The quality of subdivision of the torus.
StaticdrawStaticdrawStaticdrawStaticdrawDraws a wireframe cone.
Draws a wireframe cone.
Position of the center of the base of the cone.
Orientation of the cone, pointing from center base to the tip of the cone.
Height of the cone (along the normal).
Radius of the base of the cone.
Scale applied to cone's disc width & height. Allows you to create elliptical cones.
StaticdrawStaticdrawStaticdrawDraws a wireframe cylinder.
Position of the center of the base of the cylinder.
Orientation of the cylinder, pointing from center base to the top of the cylinder.
Height of the cylinder (along the normal).
Radius of the cylinder.
Optionalscale: Immutable<Vector2>Scale applied to cylinder's disc width & height. Allows you to create elliptical cones.
StaticdrawStaticdrawStaticdrawStaticdrawStaticdrawStaticdrawDraws a skeleton bone.
The position of the joint (or start of the bone).
The position of the parent bone.
The radius of the bone.
If true, only lines will be drawn to the parent, and no cones
OptionalboneColor: Immutable<SRGBColor>Color of the bone
OptionalparentColor: Immutable<SRGBColor>Color of the parent bone
StaticdrawStaticgetStaticgetStaticgetCalculates the size of the given text in world space.
The text to calculate the size of.
The font of the text.
OptionalfontSize: numberThe font size.
OptionalisPixelPerfect: booleanIf true will calculate only the size of the pixels actually affected. Otherwise line spacing and other empty space will be included in the size.
OptionalmaximumWidth: numberMaximum width of the text. If it is wider, it will be broken into multiple lines.
The size of the rectangle the text will occupy, in world space.
StaticgetCalculates the size of the given text in pixels. Assumes the text is facing the camera and located at the position set with
SetTransform.
The text to calculate the size for.
The font of the text.
OptionalfontSize: numberFont size of the text.
The exact size of the text on the screen, in pixels.
StatictoStaticto
The Gizmos class provides rendering and picking of gizmo elements.
Gizmos are icons and 3D objects usually rendered in scene view for various visualization purposes. For example a Camera component will have a gizmo that draws a camera icon since otherwise it has no visual representation. Aside from being rendered, gizmos can also be selected by the user as if they were normal scene elements.
To add a gizmo to a scene, apply the
@drawGizmodecorator to a static method.