private void SelectShelf(int index) { int numShelves = HEU_ShelfTools.GetNumShelves(); if(index >= 0 && index < numShelves) { HEU_Shelf shelf = HEU_ShelfTools.GetShelf(index); if (shelf != null) { int numTools = shelf._tools.Count; _guiContents = new GUIContent[numTools]; for (int i = 0; i < numTools; ++i) { _guiContents[i] = new GUIContent(); _guiContents[i].text = shelf._tools[i]._name; if (HEU_HAPIUtility.DoesMappedPathExist(shelf._tools[i]._iconPath)) { string realPath = HEU_PluginStorage.Instance.ConvertEnvKeyedPathToReal(shelf._tools[i]._iconPath); _guiContents[i].image = HEU_GeneralUtility.LoadTextureFromFile(realPath); } _guiContents[i].tooltip = shelf._tools[i]._toolTip; } } } }