private static void HierarchyItemCB(int instanceID, Rect selectionRect) { if (selectionRect.width < 265) { return; } // place the icoon to the right of the list: Rect r = new Rect(selectionRect); r.x = r.width - 80; r.width = 75; r.height = 16; if (instanceID == managerId) { if (textureGameManager != null) { GUI.DrawTexture(r, textureGameManager); } //GUI.Label(r, textureGameManager); } if (markedGames.Contains(instanceID)) { if (textureSceneManager != null) { GUI.DrawTexture(r, textureSceneManager); } // Draw the texture if it's a light (e.g.) //GUI.Label(r, textureSceneManager); } if (markedViews.Contains(instanceID)) { if (textureViewMI != null && textureViewSI != null) { //GUI.DrawTexture(r, textureView); try { var viewBase = SceneViews.FirstOrDefault(p => p.gameObject.GetInstanceID() == instanceID); if (viewBase != null) { GUI.DrawTexture(r, textureViewSI); } } catch (Exception ex) { Supress(ex); } } // Draw the texture if it's a light (e.g.) //GUI.Label(r, textureView); } }
public static void NavigateToFirstView(Type type) { if (SceneViews == null) { return; } var first = SceneViews.FirstOrDefault(p => p.GetType() == type); if (first != null) { NavigateToView(first); } }