Get RAPTOR

RaptorSuiteViewTags

Draws the small text tags the RAPTOR 3D view shows next to objects.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

The 3D view uses these tags for a link's label, a guide's name and the Player Reference's eye height. Any tool can draw tags from SceneView.duringSceneGui. Call Tag between Handles.BeginGUI and EndGUI; it draws on Repaint only.

public static class RaptorSuiteViewTags

Fields

GlyphGap

public const float GlyphGap;

The gap after a tag glyph, in GUI points.

SmallGlyph

public const float SmallGlyph;

The size of a tag glyph, in GUI points.

Methods

Back

public static Color Back(float alpha)

Gets the view's tag background colour at alpha.

ParameterTypeDescription
alphafloatOpacity, 0 to 1.

Returns: The colour.

Tag

public static void Tag(Vector2 centre, string text, Color ink, List<string> glyphs, float alpha = 1f)

Draws a tag centred on centre, with optional glyphs before the text. Call inside Handles.BeginGUI.

ParameterTypeDefaultDescription
centreVector2The tag's centre.
textstringThe text.
inkColorThe colour.
glyphsList<string>Icon names shown before the text, or null.
alphafloat1fOpacity, 0 to 1.

ToGui

public static bool ToGui(Camera cam, Vector3 worldPoint, out Vector2 gui, bool cullOutside = true)

Converts a world point to a GUI point in the current Scene view GUI.

ParameterTypeDefaultDescription
camCameraThe view's camera.
worldPointVector3The world point.
guiout Vector2The GUI point.
cullOutsidebooltrueWhether to also return false for points off screen.

Returns: False when the point is behind the camera, or off screen while cullOutside is true.

Words

public static void Words(Rect r, string text, Color ink)

Draws small text in an exact colour, without the grey tint of the Small style.

ParameterTypeDescription
rRectThe rect in GUI coordinates of the current view.
textstringThe text.
inkColorThe colour.