public void GenerateNewNode(string name) { GameObject newNode = Instantiate(nodeObj); newNode.transform.SetParent(content.transform); PlayerNode newPlayerNode = newNode.GetComponent <PlayerNode> (); newPlayerNode.Initialize(this, playerNodeList.Count + 1, name); playerNodeList.Add(newPlayerNode); }