KROYSDOCS
HomeWhat's newv0.1.0

Hierarchy

Scene hierarchy helpers for parent and child traversal.

Kindclass
NamespaceKroys.EngineScripting
Members7
SourceHierarchy.cs
DECLARATION

Declaration

Namespace Kroys.EngineScripting.

Declaration
public static class Hierarchy
REFERENCE

Members

Methods
#public static Entity GetParent(Entity entity)
Returns the parent entity, or Entity.Invalid when the entity has no parent.
methodstatic
#public static void SetParent(Entity entity, Entity parent)
Parents the entity under parent. Pass Entity.Invalid to unparent.
methodstatic
#public static void ClearParent(Entity entity)
Removes the current parent from the entity.
methodstatic
#public static int GetChildCount(Entity entity)
Returns the number of direct children under the entity.
methodstatic
#public static Entity GetChild(Entity entity, int index)
Returns the direct child at index, or Entity.Invalid when the index is invalid.
methodstatic
#public static Entity FindChild(Entity entity, string name, bool recursive = false)
Finds a child by name. Set recursive to true to search all descendants.
methodstatic
#public static Entity FindAncestorWithComponent(Entity entity, ComponentType componentType)
Walks from the entity upward and returns the first entity with the requested component. Includes the start entity in the search.
methodstatic
Signatures
public static Entity GetParent(Entity entity)
public static void SetParent(Entity entity, Entity parent)
public static void ClearParent(Entity entity)
public static int GetChildCount(Entity entity)
public static Entity GetChild(Entity entity, int index)
public static Entity FindChild(Entity entity, string name, bool recursive = false)
public static Entity FindAncestorWithComponent(Entity entity, ComponentType componentType)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.