DrawGUI.Icon.Sirenix.SDF
Static icon accessor that provides ~1500 cached Texture2D properties for Odin Inspector's SDF (Signed Distance Field) icon set. SDF icons are scalable vector icons that can be rendered at any size with custom colors and padding. Cached via IconCache<Cache, SdfIconType>.
Definition
Namespace: Paragon.Editor
Assembly: Editor assembly
public static partial class DrawGUI
{
public static partial class Icon
{
public static partial class Sirenix
{
public static class SDFNesting: DrawGUI → Icon → Sirenix → SDF
Dependencies: Sirenix.OdinInspector (SdfIconType, SdfIcons)
Quick Lookup
Get default cached icon
DrawGUI.Icon.Sirenix.SDF.Alarm
Custom color and size
DrawGUI.Icon.Sirenix.SDF.Create(SdfIconType.Alarm, Color.blue, 32, 32)
Custom with padding
DrawGUI.Icon.Sirenix.SDF.Create(SdfIconType.Alarm, Color.blue, 32, 32, 4)
Methods
Create
Creates a new SDF icon texture with custom color, dimensions, and optional padding. Not cached — creates a fresh Texture2D each call via SdfIcons.CreateTransparentIconTexture.
iconType
SdfIconType
—
The SDF icon to render
color
Color
—
Icon tint color
width
int
—
Output texture width in pixels
height
int
—
Output texture height in pixels
padding
int
0
Padding in pixels around the icon within the texture
Returns: A new Texture2D with the SDF icon rendered at the specified parameters.
Properties (Icon Accessors)
All ~1500 properties return Texture2D and follow the pattern Cache.Get(SdfIconType.EnumValue). The default cached version uses GUI.contentColor as the tint and 64×64 size.
The SDF icon set includes the full Bootstrap Icons library. Categories include:
Alarms & Time: Alarm, AlarmFill, Clock, ClockFill, ClockHistory, Hourglass, HourglassSplit, Stopwatch, StopwatchFill
Arrows: Arrow90degDown/Left/Right/Up, ArrowBarDown/Left/Right/Up, ArrowClockwise, ArrowCounterclockwise, ArrowDown/Left/Right/Up + Circle/Square/Short variants
Files & Folders: File, FileFill, FileEarmark, Folder, FolderFill, Folder2, Folder2Open, FolderCheck, FolderPlus, FolderMinus, FolderX
Media: Play, PlayFill, Pause, PauseFill, Stop, StopFill, SkipBackward, SkipForward, VolumeUp, VolumeMute, Mic, MicFill, Camera, CameraVideo
People: Person, PersonFill, PersonCircle, People, PeopleFill
Devices: Phone, Laptop, Display, Printer, Router, Ssd, UsbDrive, UsbMicro, UsbMini, DeviceHdd, DeviceSsd
UI Elements: Grid, List, Table, CardList, LayoutSidebar, Window, App, Pip
Shapes: Circle, CircleFill, Square, SquareFill, Triangle, TriangleFill, Diamond, DiamondFill, Heart, HeartFill, Star, StarFill
Weather: Clouds, CloudsFill, CloudHaze2, Sun, SunFill, Moon, MoonFill, Snow, Thermometer, Wind
And many more — the full Odin SdfIconType enum contains ~1500 icons covering virtually every common UI concept.
Internal Cache
The private Cache class extends IconCache and creates textures via:
The default cached icons use GUI.contentColor as their tint, which adapts to Unity's Pro (dark) and Personal (light) editor skins. This means cached icons automatically match the current editor theme.
Common Pitfalls
Create() is not cached
Create(iconType, color, width, height, padding) allocates a new Texture2D every call. Cache the result yourself if calling in draw loops. The property accessors (e.g., DrawGUI.Icon.Sirenix.SDF.Alarm) are cached automatically.
Default color is GUI.contentColor
The cached versions use GUI.contentColor at the time of first access. If GUI.contentColor is modified before first access, the cached icon will have that modified color permanently until assembly reload.
Large icon set impacts memory With ~1500 possible icons, accessing many at once can consume significant texture memory. Only access the icons you need — the lazy cache ensures unused icons are never created.
Examples
Using a cached SDF icon
Creating a custom-sized SDF icon
See Also
DrawGUI.Icon.Sirenix.Editor — Odin raster editor icons
Sirenix Icons README — Sirenix icons overview
Icons README — Overview of all icon providers
Last updated