public void AddNewEditorNode() { Debug.Log ("added new node from menu"); // Create a new node prefab and attach it to the mouse cursor EditorNodeSelectionNode p = Resources.Load<EditorNodeSelectionNode>("EditorNodeSelectionNode"); EditorNodeSelectionNode instance = Instantiate<EditorNodeSelectionNode>(p); instance.gameObject.SetActive(true); instance.ChangeState(EditorNodeBase.EditorNodeState.DraggingStarted); }
public void AddNewNode() { // Create a new selector/variable editor node. // TODO use anchor points Debug.Log("Adding new EditorNode"); EditorNodeSelectionNode prefab = Resources.Load <EditorNodeSelectionNode>("EditorNodeSelectionNode"); EditorNodeSelectionNode node = Instantiate <EditorNodeSelectionNode>(prefab); node.gameObject.transform.position = this.transform.position; node.gameObject.transform.SetParent(this.transform.parent); node.gameObject.SetActive(true); node.StartDragging(); // TODO line renderer to the new node }