Example #1
0
    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;
    }
Example #2
0
    static public void AddLoopVerticalScrollRect(MenuCommand menuCommand)
    {
        GameObject go = UICreateTool.CreateLoopVerticalScrollRect();

        UICreateTool.PlaceUIElementRoot(go, menuCommand);
    }