The Copy
method creates a duplicate of the current MapNode
instance. This is useful when you need to replicate a node with all its properties and potentially its children, without affecting the original node.
The Copy
method creates a duplicate of the current MapNode
instance. This is useful when you need to replicate a node with all its properties and potentially its children, without affecting the original node.
To use the Copy
method, simply call it on an instance of MapNode
. The method does not take any parameters and returns a new MapNode
object that is a copy of the original.
// Assume 'originalNode' is an instance of MapNode MapNode copiedNode = originalNode.Copy(); // You can now manipulate 'copiedNode' independently of 'originalNode' copiedNode.Position = new Vector3(10, 20, 30); copiedNode.Name = "Copied Node";