Collection factory

API for spawning collections from a collection factory component.

Namespace: dmGameSystem
Include: #include <dmsdk/gamesys/components/comp_collection_factory.h>
FUNCTIONS
dmGameObject::Result CompCollectionFactorySpawn(HCollectionFactoryWorld world, HCollectionFactoryComponent component, HCollection collection, const char* id_prefix, dmVMath::Point3 position, dmVMath::Quat rotation, dmVMath::Vector3 scale, dmGameObject::InstancePropertyContainers properties, dmGameObject::InstanceIdMap out_instances) Spawns a collection of gameobjects in a collection...

Functions

CompCollectionFactorySpawn

dmGameObject::Result CompCollectionFactorySpawn(HCollectionFactoryWorld world, HCollectionFactoryComponent component, HCollection collection, const char* id_prefix, dmVMath::Point3 position, dmVMath::Quat rotation, dmVMath::Vector3 scale, dmGameObject::InstancePropertyContainers properties, dmGameObject::InstanceIdMap out_instances)

Spawns a collection of gameobjects in a collection using a collection factory component.

PARAMETERS

HCollectionFactoryWorld world Collection factory world
HCollectionFactoryComponent component Collection factory component
HCollection collection Gameobject collection to spawn into
const char* id_prefix Prefix for the spawned instance identifiers. Must start with a forward slash (/). Must be unique within the collection. Pass nullptr to automatically generate a unique identifier prefix (e.g. /collection1, /collection2 etc.).
dmVMath::Point3 position Position of the spawned objects
dmVMath::Quat rotation Rotation of the spawned objects
dmVMath::Vector3 scale Scale of the spawned objects
dmGameObject::InstancePropertyContainers properties Property containers with override properties
dmGameObject::InstanceIdMap out_instances A map with the spawned instance id's

RETURNS

dmGameObject::Result Result of the operation