public GenericMenu(Rect newBoundingRect) { items = new ItemGroup(); controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size)); if (newBoundingRect != Rect.zero) { boundingRect = newBoundingRect; } }
public void TestHashCode() { var item = new ItemGroup { ID = 1, Name = "1" }; var item2 = new ItemGroup { ID = 1, Name = "1" }; Assert.Equal(item.GetHashCode(), item2.GetHashCode()); }
public GenericMenu() { items = new ItemGroup(); controlID = GUIUtility.GetControlID(items.GetHashCode(), FocusType.Keyboard, new Rect(CanvasGUI.GUItoWindowPosition(items.position.position), items.position.size)); }