// ------------------------------------------------------------------------- public static Texture2D GetDefaultNodeIconFor(DefaultNodeIcons iconType) { Texture2D icon = null; switch (iconType) { case DefaultNodeIcons.iCanScript: icon = TextureCache.GetIcon(kiCanScriptIcon); break; case DefaultNodeIcons.Unity: icon = TextureCache.GetIcon(kUnityIcon); break; case DefaultNodeIcons.DotNet: icon = TextureCache.GetIcon(kDotNetIcon); break; case DefaultNodeIcons.Company: icon = TextureCache.GetIcon(kCompanyIcon); break; case DefaultNodeIcons.Package: icon = TextureCache.GetIcon(kPackageIcon); break; case DefaultNodeIcons.Message: icon = TextureCache.GetIcon(kEventHandlerIcon); break; case DefaultNodeIcons.ObjectInstance: icon = TextureCache.GetIcon(kTypeIcon); break; case DefaultNodeIcons.Function: icon = TextureCache.GetIcon(kFunctionIcon); break; case DefaultNodeIcons.Variable: icon = TextureCache.GetIcon(kVariableIcon); break; case DefaultNodeIcons.Builder: icon = TextureCache.GetIcon(kConstructorIcon); break; case DefaultNodeIcons.StateChart: icon = TextureCache.GetIcon(kStateChartIcon); break; case DefaultNodeIcons.State: icon = TextureCache.GetIcon(kStateIcon); break; case DefaultNodeIcons.EntryState: icon = TextureCache.GetIcon(kEntryStateIcon); break; case DefaultNodeIcons.OnStateEntry: icon = TextureCache.GetIcon(kOnStateEntryIcon); break; case DefaultNodeIcons.OnStateUpdate: icon = TextureCache.GetIcon(kOnStateUpdateIcon); break; case DefaultNodeIcons.OnStateExit: icon = TextureCache.GetIcon(kOnStateExitIcon); break; } return(icon == null?TextureCache.GetIcon(kDefaultIcon) : icon); }
// ------------------------------------------------------------------------- public static Texture2D GetLibraryIconFor(DefaultNodeIcons iconType) { Texture2D icon = null; switch (iconType) { case DefaultNodeIcons.iCanScript: icon = TextureCache.GetIcon(kiCanScriptLibraryIcon); break; case DefaultNodeIcons.Unity: icon = TextureCache.GetIcon(kUnityLibraryIcon); break; case DefaultNodeIcons.DotNet: icon = TextureCache.GetIcon(kDotNetLibraryIcon); break; case DefaultNodeIcons.Company: icon = TextureCache.GetIcon(kCompanyLibraryIcon); break; case DefaultNodeIcons.Library: icon = TextureCache.GetIcon(kLibraryIcon); break; case DefaultNodeIcons.Package: icon = TextureCache.GetIcon(kPackageLibraryIcon); break; case DefaultNodeIcons.Message: icon = TextureCache.GetIcon(kMessageLibraryIcon); break; case DefaultNodeIcons.ObjectInstance: icon = TextureCache.GetIcon(kObjectInstanceLibraryIcon); break; case DefaultNodeIcons.Function: icon = TextureCache.GetIcon(kFunctionLibraryIcon); break; case DefaultNodeIcons.Variable: icon = TextureCache.GetIcon(kVariableLibraryIcon); break; case DefaultNodeIcons.Builder: icon = TextureCache.GetIcon(kBuilderLibraryIcon); break; case DefaultNodeIcons.StateChart: icon = TextureCache.GetIcon(kStateChartLibraryIcon); break; case DefaultNodeIcons.State: icon = TextureCache.GetIcon(kStateLibraryIcon); break; case DefaultNodeIcons.EntryState: icon = TextureCache.GetIcon(kEntryStateLibraryIcon); break; } return(icon == null?TextureCache.GetIcon(kPackageLibraryIcon) : icon); }