Description
The Copy
method of the MapNode
class creates a duplicate of the current map node instance. This method is useful when you need to replicate a node with all its properties and potentially its children, allowing for modifications without affecting the original node.
Usage
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.
Example
// Assume 'node' is an instance of MapNode
MapNode copiedNode = node.Copy();
// You can now modify 'copiedNode' without affecting 'node'
copiedNode.Name = "New Node Name";
copiedNode.Position = new Vector3(10, 20, 30);