Description
The Parent
property of the MapNode
class provides access to the parent node of the current map node. This property is particularly useful for navigating the hierarchy of map nodes within a world. At the top level, the parent node will be an instance of MapWorld
, which represents the entire map or scene.
Usage
To access the parent node of a MapNode
, simply use the Parent
property. This can be useful for operations that require knowledge of the node's position within the hierarchy, such as transformations or visibility checks.
Example
// Example of accessing the Parent property of a MapNode
MapNode currentNode = GetSomeMapNode();
MapNode parentNode = currentNode.Parent;
if (parentNode != null)
{
// Perform operations with the parent node
Console.WriteLine($"Parent Node Name: {parentNode.Name}");
}