RaptorSuiteIcons
Draws and loads Suite icons by name.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Icons come from RaptorSuiteIconSet, plus two brand marks the Settings page names: RAPTOR's R mark and Unity's own logo (Unity's built-in editor icon). A name with no art draws a missing-icon placeholder (a crossed box) and logs a warning once per name.
public static class RaptorSuiteIconsMethods
Draw
public static void Draw(Rect rect, string glyphName, Color tint, float size = 20f)Draws an icon. The tint is used as given, so include any disabled or selection alpha in it. Other GUI colours are restored afterwards.
| Parameter | Type | Default | Description |
|---|---|---|---|
rect | Rect | The rect, in GUI coordinates of the current view. | |
glyphName | string | The icon name. Null or empty draws nothing. | |
tint | Color | The tint colour. | |
size | float | 20f | The size, in points. |
Get
public static Texture2D Get(string name, float logicalSize = 20f)Returns a white mask with the icon's alpha. The texture is cached at logicalSize * pixelsPerPoint, so small icons are not downscaled from a large image. A name with no art returns the missing-icon placeholder. Use RaptorSuiteIconSet.Has to check whether a name has art.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | The icon name. | |
logicalSize | float | 20f | The size, in points. |
Returns: The texture, or null for an empty name or an invalid size.
Related types
- RaptorSuiteIconSet: RAPTOR's icon set, made of a tinted ink layer and a coloured subject layer.