Skip to content

EditorIcons

Namespace: SideXP.UI.EditorOnly

public static class EditorIcons

Utility for getting icon resources.

Properties

MaterialIconsAsset

public static MaterialIcons MaterialIconsAsset

Gets the MaterialIcons asset used by this utility.

Methods

GetIcon(string, bool, bool)

public static Texture2D GetIcon(string name, bool black = false, bool x2 = false)

Gets the texture of a named icon alone.

Parameters

Returns

Returns the found icon.

IconContent(string, string, string, bool, bool)

public static GUIContent IconContent(string iconName, string text, string tooltip, bool black = false, bool x2 = false)

Creates a GUIContent, using the named icon as content's icon.

Parameters

  • iconName
  • text: The text of the output GUIContent.
  • tooltip: The tooltip of the output GUIContent.
  • black: Do you want to get the black version of the icon?
  • x2: Do you want the doubled size of the icon?

Returns

Returns the generated GUIContent.

IconContent(string, string, bool, bool)

public static GUIContent IconContent(string iconName, string tooltip, bool black = false, bool x2 = false)

Creates a GUIContent, using the named icon as content's icon.

Parameters

  • iconName
  • tooltip: The tooltip of the output GUIContent.

Returns

Returns the generated GUIContent.

IconContent(string, bool, bool)

public static GUIContent IconContent(string iconName, bool black = false, bool x2 = false)

Creates a GUIContent, using the named icon as content's icon.

Parameters

  • iconName

Returns

Returns the generated GUIContent.

IconButton(Rect, string, GUIContent)

public static bool IconButton(Rect position, string iconName, GUIContent label)

Draws a button on GUI with the named icon in the label.

Parameters

  • position: Rectangle on the screen to use for the button.
  • label: Text and tooltip for this button.
  • iconName

Returns

Returns true if the user clicks the button.

IconButton(Rect, string, string, string)

public static bool IconButton(Rect position, string iconName, string label, string tooltip)

Draws a button on GUI with the named icon in the label.

Parameters

  • label: Text for this button
  • tooltip: Tooltip for this button.
  • position: Rectangle on the screen to use for the button.

Returns

Returns true if the user clicks the button.

IconButton(Rect, string, string)

public static bool IconButton(Rect position, string iconName, string label)

Parameters

  • label: Text for this button

IconButton(Rect, string)

public static bool IconButton(Rect position, string iconName)

Draws a button on GUI with the named icon in the label.

Parameters

  • position: Rectangle on the screen to use for the button.

Returns

Returns true if the user clicks the button.

IconButton(string, GUIContent, GUILayoutOption[])

public static bool IconButton(string iconName, GUIContent label, params GUILayoutOption[] options)

Draws a button on GUI with the named icon in the label.

Parameters

  • options: Options for the rectangle on the screen to use for the button.
  • label: Text and tooltip for this button.

Returns

Returns true if the user clicks the button.

Remarks

Uses layout GUI.

IconButton(string, string, string, GUILayoutOption[])

public static bool IconButton(string iconName, string label, string tooltip, params GUILayoutOption[] options)

Parameters

  • label: Text for this button
  • tooltip: Tooltip for this button.

IconButton(string, string, GUILayoutOption[])

public static bool IconButton(string iconName, string label, params GUILayoutOption[] options)

Inherited documentation.

IconButton(string, GUILayoutOption[])

public static bool IconButton(string iconName, params GUILayoutOption[] options)

Inherited documentation.