RaptorSuiteViewTags
Draws the small text tags the RAPTOR 3D view shows next to objects.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, 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 RaptorSuiteViewTagsFields
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.
| Parameter | Type | Description |
|---|---|---|
alpha | float | Opacity, 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
centre | Vector2 | The tag's centre. | |
text | string | The text. | |
ink | Color | The colour. | |
glyphs | List<string> | Icon names shown before the text, or null. | |
alpha | float | 1f | Opacity, 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
cam | Camera | The view's camera. | |
worldPoint | Vector3 | The world point. | |
gui | out Vector2 | The GUI point. | |
cullOutside | bool | true | Whether 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.
| Parameter | Type | Description |
|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. |
text | string | The text. |
ink | Color | The colour. |