Esempio n. 1
0
    static public void CreateAnimationNodeOfMenu( )
    {
        Transform parentNodeTra = (Selection.activeGameObject != null) ? Selection.activeGameObject.transform : null;

        AnimationNode animNode = ViNoToolUtil.AddViNodeGameObject <AnimationNode>("Animation", parentNodeTra);

        EditorGUIUtility.PingObject(animNode.gameObject);
    }
Esempio n. 2
0
    static public void CreateViNodeOfMenu( )
    {
        Transform parentNodeTra = (Selection.activeGameObject != null) ? Selection.activeGameObject.transform : null;

        ViNode node = ViNoToolUtil.AddViNodeGameObject <ViNode>("ViNode", parentNodeTra);

        EditorGUIUtility.PingObject(node.gameObject);
    }
Esempio n. 3
0
    static public DialogPartNode AddDialogPartNode(Transform parent)
    {
        DialogPartNode dlgNode    = ViNoToolUtil.AddViNodeGameObject <DialogPartNode>("Dialog", parent);       //selection.transform );
        GameObject     textBoxObj = GameObject.Find("TextBox");

        if (textBoxObj != null)
        {
            dlgNode.m_ViNoTextBox = textBoxObj.GetComponent <ViNoTextBox>();
            Transform nameTextTra = textBoxObj.transform.FindChild("TextBox_Name");
            if (nameTextTra != null)
            {
                dlgNode.m_NameTextBox = nameTextTra.GetComponent <ViNoTextBox>();
            }
        }
        return(dlgNode);
    }
Esempio n. 4
0
    static public void CreateSelectionsNodeOfMenu( )
    {
        ISelectionsCtrl sel = GameObject.FindObjectOfType(typeof(ISelectionsCtrl)) as ISelectionsCtrl;

        if (sel == null)
        {
            DrawObjectsTab.CreateGUISelectionsCtrl();
        }

        Transform parentNodeTra = (Selection.activeGameObject != null) ? Selection.activeGameObject.transform : null;

        SelectionsNode node       = ViNoToolUtil.AddViNodeGameObject <SelectionsNode>("Selections", parentNodeTra);
        ViNode         childNode1 = ViNoToolUtil.AddViNodeGameObject <ViNode>("Selected1", node.transform);
        ViNode         childNode2 = ViNoToolUtil.AddViNodeGameObject <ViNode>("Selected2", node.transform);

        DialogPartNode dlg1 = CreateDialogNode("name", "Selected 1");           //ViNoToolUtil.AddViNodeGameObject<DialogPartNode>( "Dialog" , childNode1.transform );

        dlg1.transform.parent = childNode1.transform;

        DialogPartNode dlg2 = CreateDialogNode("name", "Selected 2");           //ViNoToolUtil.AddViNodeGameObject<DialogPartNode>( "Dialog" , childNode2.transform );

        dlg2.transform.parent = childNode2.transform;

        node.units               = new SelectionsNode.SelectUnit [2];
        node.units[0]            = new SelectionsNode.SelectUnit();
        node.units[0].targetNode = childNode1;
        node.units[0].text       = "Selection 1";
        node.units[0].index      = 0;

        node.units[1]            = new SelectionsNode.SelectUnit();
        node.units[1].targetNode = childNode2;
        node.units[1].text       = "Selection 2";
        node.units[1].index      = 1;

        EditorGUIUtility.PingObject(node.gameObject);
    }