Skip to content

MaterialIcons

Namespace: SideXP.UI.EditorOnly | Inherits from: ScriptableObject

public class MaterialIcons : ScriptableObject

Contains the references to the Material Icons atlases and mappings, so you can get these icons easily.

Fields

MaterialIconsURL

public const string MaterialIconsURL = "https://fonts.google.com/icons?icon.set=Material+Icons"

External URL to the Material Icons browser from Google Fonts.

Properties

IconSize

public int IconSize

Inherited documentation.

IconSize2x

public int IconSize2x

Inherited documentation.

IconCategories

public string[] IconCategories

Gets the list of all icon categories.

IconNames

public string[] IconNames

Gets all the icons names.

Methods

GetIcon(string, bool, bool)

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

Gets a Material Icon by its name. You can browse the icons at https://fonts.google.com/icons?icon.set=Material+Icons

Parameters

  • name: The name of the icon you want to get.
  • white: Do you want to get the white version of the icon?
  • x2: Do you want the doubled size of the icon?

Returns

Returns the found icon.

GetIconNamesInCategory(string)

public string[] GetIconNamesInCategory(string categoryName)

Gets all the icon names for the named category.

Parameters

  • categoryName: The name of the category of which you want to get the icon names.

Returns

Returns the found icons names.

GetIconCategoryName(string)

public string GetIconCategoryName(string iconName)

Gets the named icon's category.

Parameters

  • iconName: The name of the icon of which you want to get the category name.

Returns

Returns the found category name.