MCPcopy Create free account
hub / github.com/defold/defold / SpawnFromCollection

Function SpawnFromCollection

engine/gameobject/src/gameobject/gameobject.cpp:1718–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716 }
1717
1718 Result SpawnFromCollection(HCollection hcollection, HCollectionDesc collection_desc, const char* id_prefix,
1719 InstancePropertyContainers *property_containers,
1720 const Point3& position, const Quat& rotation, const Vector3& scale,
1721 InstanceIdMap *out_instances)
1722 {
1723 dmTransform::Transform transform;
1724 transform.SetTranslation(Vector3(position));
1725 transform.SetRotation(rotation);
1726 transform.SetScale(scale);
1727
1728 return CollectionSpawnFromDescInternal(hcollection->m_Collection, (dmGameObjectDDF::CollectionDesc*)collection_desc, id_prefix, property_containers, out_instances, transform);
1729 }
1730
1731 HInstance Spawn(HCollection hcollection, HPrototype proto, const char* prototype_name, dmhash_t id, HPropertyContainer property_container, const Point3& position, const Quat& rotation, const Vector3& scale)
1732 {

Callers 2

SpawnFunction · 0.85

Calls 5

Vector3Class · 0.50
SetTranslationMethod · 0.45
SetRotationMethod · 0.45
SetScaleMethod · 0.45

Tested by 1

SpawnFunction · 0.68