Get RAPTOR

RaptorSuiteIcons

Draws and loads Suite icons by name.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, 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 RaptorSuiteIcons

Methods

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.

ParameterTypeDefaultDescription
rectRectThe rect, in GUI coordinates of the current view.
glyphNamestringThe icon name. Null or empty draws nothing.
tintColorThe tint colour.
sizefloat20fThe 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.

ParameterTypeDefaultDescription
namestringThe icon name.
logicalSizefloat20fThe size, in points.

Returns: The texture, or null for an empty name or an invalid size.

  • RaptorSuiteIconSet: RAPTOR's icon set, made of a tinted ink layer and a coloured subject layer.