public void addNewNode() { Debug.Log ("added new node from menu"); // Create a new node prefab and attach it to the mouse cursor NodePrefab instance = Instantiate<NodePrefab>(prefab); instance.tag = "SFNode"; nodes.Add (instance); instance.updateState (NodePrefab.NodeState.DraggingNode); }