Method LoadIcon
LoadIcon(string, string, string)
Load an icon regarding skin and editor resolution. Icon should be stored as legacy icon resources:
- "d_" prefix for Professional theme
- "@2x" suffix for high resolution
Declaration
public static Texture2D LoadIcon(string path, string name, string extention = ".png")
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | Path to seek the icon from Assets/ folder |
| string | name | Icon name without suffix, prefix or extention |
| string | extention | [Optional] Extention of file (png per default) |
Returns
| Type | Description |
|---|---|
| Texture2D | The loaded texture |