static public void AddCustomToggle(MenuCommand menuCommand) { GameObject go = UICreateTool.CreateUIElementRoot("toggle", new Vector2(100, 100)); Image image = go.AddComponent <Image>(); UIToggle toggle = go.AddComponent <UIToggle>(); UICreateTool.PlaceUIElementRoot(go, menuCommand); Selection.activeGameObject = go; }
static public void AddLoopVerticalScrollRect(MenuCommand menuCommand) { GameObject go = UICreateTool.CreateLoopVerticalScrollRect(); UICreateTool.PlaceUIElementRoot(go, menuCommand); }