Universe Object is the base class for all objects within Zendir’s Simulation. The objects exist on a different backend to the Unreal Engine and require a different workflow to get a direct reference to objects in the simulation.


Getting Children

Universe Objects can be attached to other objects within the simulation. Objects that are attached are called children. These objects have their positions and rotations relative to their immediate parent. Zendir Editor exposes functions for returning the children, if they exist, of a particular type. The Get Children will function can be called to fetch all children of the type selected.

image 1.png

NOTE

Only the children of the type or subclass will be returned as an array of objects. For example, if the type is a ‘Battery’ and there exists a blueprint type of the battery on the spacecraft (BP_NS_Battery), then this object will be returned as it is a sub-type of the battery class.

The Recurse option will select whether to go down the behaviour tree. If this is set to false, only the immediate children will be queried. For example, if there exists a chassis attached to the spacecraft and a battery attached to the chassis, then getting the child from the spacecraft of the battery type will only return the battery if Recurse is set to true.


Getting one Child

The Get Child function returns the first child found on the hierarchy, if it exists, of a particular type. This is a Blueprint pure function and will return the cached type.

image.png