protected ObjectNode CreateNode(Vector3 pos, int numControls) { GameObject g = new GameObject(); g.name = "Node"; ObjectNode node = g.AddComponent <ObjectNode>(); node.SetPosition(pos); node.CreateHandles(numControls); node.SetTerrain(this); // Make the node be a child of the terrain object g.transform.parent = this.transform; return(node); }