Skip to content

Commit 94c95e2

Browse files
Site changes [skip-ci]
1 parent 27632e8 commit 94c95e2

File tree

4 files changed

+267
-15
lines changed

4 files changed

+267
-15
lines changed

_data/ref/beta/dmgameobject-cpp.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3396,6 +3396,36 @@
33963396
"tparams": [],
33973397
"type": "ENUM"
33983398
},
3399+
{
3400+
"brief": "Used for mapping instance ids from a collection de...",
3401+
"description": "Used for mapping instance ids from a collection definition to newly spawned instances",
3402+
"error": "",
3403+
"examples": "",
3404+
"language": "",
3405+
"members": [],
3406+
"name": "InstanceIdMap",
3407+
"notes": [],
3408+
"parameters": [],
3409+
"replaces": "",
3410+
"returnvalues": [],
3411+
"tparams": [],
3412+
"type": "TYPEDEF"
3413+
},
3414+
{
3415+
"brief": "Contains property containers for game objects to b...",
3416+
"description": "Contains property containers for game objects to be spawned",
3417+
"error": "",
3418+
"examples": "",
3419+
"language": "",
3420+
"members": [],
3421+
"name": "InstancePropertyContainers",
3422+
"notes": [],
3423+
"parameters": [],
3424+
"replaces": "",
3425+
"returnvalues": [],
3426+
"tparams": [],
3427+
"type": "TYPEDEF"
3428+
},
33993429
{
34003430
"brief": "Value for an invalid instance index, this must be ...",
34013431
"description": "Value for an invalid instance index, this must be the same as defined in gamesys_ddf.proto for Create#index.",
@@ -4574,6 +4604,36 @@
45744604
"name": "dmGameObject::RESULT_BUFFER_OVERFLOW",
45754605
"type": ""
45764606
},
4607+
{
4608+
"doc": "",
4609+
"name": "dmGameObject::RESULT_IDENTIFIER_INVALID",
4610+
"type": ""
4611+
},
4612+
{
4613+
"doc": "",
4614+
"name": "dmGameObject::RESULT_RESOURCE_ERROR",
4615+
"type": ""
4616+
},
4617+
{
4618+
"doc": "",
4619+
"name": "dmGameObject::RESULT_CHILD_NOT_FOUND",
4620+
"type": ""
4621+
},
4622+
{
4623+
"doc": "",
4624+
"name": "dmGameObject::RESULT_INVALID_PROPERTIES",
4625+
"type": ""
4626+
},
4627+
{
4628+
"doc": "",
4629+
"name": "dmGameObject::RESULT_UNABLE_TO_CREATE_COMPONENTS",
4630+
"type": ""
4631+
},
4632+
{
4633+
"doc": "",
4634+
"name": "dmGameObject::RESULT_UNABLE_TO_INIT_INSTANCE",
4635+
"type": ""
4636+
},
45774637
{
45784638
"doc": "",
45794639
"name": "dmGameObject::RESULT_UNKNOWN_ERROR",

_data/ref/beta/dmgamesystem-cpp.json

Lines changed: 197 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,198 @@
7272
"tparams": [],
7373
"type": "FUNCTION"
7474
},
75+
{
76+
"brief": "Spawns a collection of gameobjects in a collection...",
77+
"description": "Spawns a collection of gameobjects in a collection using a collection factory component.",
78+
"error": "",
79+
"examples": "",
80+
"language": "",
81+
"members": [],
82+
"name": "CompCollectionFactorySpawn",
83+
"notes": [],
84+
"parameters": [
85+
{
86+
"doc": "Collection factory world",
87+
"is_optional": "False",
88+
"name": "world",
89+
"types": [
90+
"HCollectionFactoryWorld"
91+
]
92+
},
93+
{
94+
"doc": "Collection factory component",
95+
"is_optional": "False",
96+
"name": "component",
97+
"types": [
98+
"HCollectionFactoryComponent"
99+
]
100+
},
101+
{
102+
"doc": "Gameobject collection to spawn into",
103+
"is_optional": "False",
104+
"name": "collection",
105+
"types": [
106+
"HCollection"
107+
]
108+
},
109+
{
110+
"doc": "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.).",
111+
"is_optional": "False",
112+
"name": "id_prefix",
113+
"types": [
114+
"const char*"
115+
]
116+
},
117+
{
118+
"doc": "Position of the spawned objects",
119+
"is_optional": "False",
120+
"name": "position",
121+
"types": [
122+
"dmVMath::Point3"
123+
]
124+
},
125+
{
126+
"doc": "Rotation of the spawned objects",
127+
"is_optional": "False",
128+
"name": "rotation",
129+
"types": [
130+
"dmVMath::Quat"
131+
]
132+
},
133+
{
134+
"doc": "Scale of the spawned objects",
135+
"is_optional": "False",
136+
"name": "scale",
137+
"types": [
138+
"dmVMath::Vector3"
139+
]
140+
},
141+
{
142+
"doc": "Property containers with override properties",
143+
"is_optional": "False",
144+
"name": "properties",
145+
"types": [
146+
"dmGameObject::InstancePropertyContainers"
147+
]
148+
},
149+
{
150+
"doc": "A map with the spawned instance id's",
151+
"is_optional": "False",
152+
"name": "out_instances",
153+
"types": [
154+
"dmGameObject::InstanceIdMap"
155+
]
156+
}
157+
],
158+
"replaces": "",
159+
"returnvalues": [
160+
{
161+
"doc": "Result of the operation",
162+
"name": "result",
163+
"types": [
164+
"dmGameObject::Result"
165+
]
166+
}
167+
],
168+
"tparams": [],
169+
"type": "FUNCTION"
170+
},
171+
{
172+
"brief": "Spawns a new gameobject instance in a collection u...",
173+
"description": "Spawns a new gameobject instance in a collection using a factory component.",
174+
"error": "",
175+
"examples": "",
176+
"language": "",
177+
"members": [],
178+
"name": "CompFactorySpawn",
179+
"notes": [],
180+
"parameters": [
181+
{
182+
"doc": "Factory world",
183+
"is_optional": "False",
184+
"name": "world",
185+
"types": [
186+
"HFactoryWorld"
187+
]
188+
},
189+
{
190+
"doc": "Factory component",
191+
"is_optional": "False",
192+
"name": "component",
193+
"types": [
194+
"HFactoryComponent"
195+
]
196+
},
197+
{
198+
"doc": "Gameobject collection to spawn into",
199+
"is_optional": "False",
200+
"name": "collection",
201+
"types": [
202+
"HCollection"
203+
]
204+
},
205+
{
206+
"doc": "Identifier for the new instance. Must be unique within the collection. Pass 0 to automatically generate a unique identifier (e.g. /instance1, /instance2 etc.).",
207+
"is_optional": "False",
208+
"name": "id",
209+
"types": [
210+
"dmhash_t"
211+
]
212+
},
213+
{
214+
"doc": "Position of the spawned object",
215+
"is_optional": "False",
216+
"name": "position",
217+
"types": [
218+
"dmVMath::Point3"
219+
]
220+
},
221+
{
222+
"doc": "Rotation of the spawned object",
223+
"is_optional": "False",
224+
"name": "rotation",
225+
"types": [
226+
"dmVMath::Quat"
227+
]
228+
},
229+
{
230+
"doc": "Scale of the spawned object",
231+
"is_optional": "False",
232+
"name": "scale",
233+
"types": [
234+
"dmVMath::Vector3"
235+
]
236+
},
237+
{
238+
"doc": "Property container with override properties",
239+
"is_optional": "False",
240+
"name": "properties",
241+
"types": [
242+
"dmGameObject::HPropertyContainer"
243+
]
244+
},
245+
{
246+
"doc": "Output parameter for the new instance",
247+
"is_optional": "False",
248+
"name": "out_instance",
249+
"types": [
250+
"dmGameObject::HInstance"
251+
]
252+
}
253+
],
254+
"replaces": "",
255+
"returnvalues": [
256+
{
257+
"doc": "Result of the operation",
258+
"name": "result",
259+
"types": [
260+
"dmGameObject::Result"
261+
]
262+
}
263+
],
264+
"tparams": [],
265+
"type": "FUNCTION"
266+
},
75267
{
76268
"brief": "Used in GetMaterialConstant to resolve a render co...",
77269
"description": "Used in GetMaterialConstant to resolve a render constant's value",
@@ -1380,14 +1572,14 @@
13801572
}
13811573
],
13821574
"info": {
1383-
"brief": "SDK Gui Component API documentation",
1384-
"description": "Built-in scripting functions.",
1385-
"file": "dmsdk/gamesys/gui.h",
1575+
"brief": "Collection factory component functions",
1576+
"description": "API for spawning collections from a collection factory component.",
1577+
"file": "dmsdk/gamesys/components/comp_collection_factory.h",
13861578
"language": "C++",
1387-
"name": "GameSystem Gui",
1579+
"name": "Collection factory",
13881580
"namespace": "dmGameSystem",
13891581
"notes": [],
1390-
"path": "dmsdk/gamesys/gui.h",
1582+
"path": "dmsdk/gamesys/components/comp_collection_factory.h",
13911583
"type": "Defold C++"
13921584
}
13931585
}

_data/refindex.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,15 @@
341341
"type": "Defold Lua",
342342
"url": "/ref/alpha/collectionfactory-lua"
343343
},
344+
{
345+
"branch": "beta",
346+
"filename": "dmgamesystem-cpp",
347+
"language": "C++",
348+
"name": "Collection factory",
349+
"namespace": "dmGameSystem",
350+
"type": "Defold C++",
351+
"url": "/ref/beta/dmgamesystem-cpp"
352+
},
344353
{
345354
"branch": "beta",
346355
"filename": "collectionfactory-lua",
@@ -1709,15 +1718,6 @@
17091718
"type": "Defold Lua",
17101719
"url": "/ref/stable/go-lua"
17111720
},
1712-
{
1713-
"branch": "beta",
1714-
"filename": "dmgamesystem-cpp",
1715-
"language": "C++",
1716-
"name": "GameSystem Gui",
1717-
"namespace": "dmGameSystem",
1718-
"type": "Defold C++",
1719-
"url": "/ref/beta/dmgamesystem-cpp"
1720-
},
17211721
{
17221722
"branch": "stable",
17231723
"filename": "dmgamesystem-cpp",

ref/beta/dmgamesystem-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: api
33
branch: beta
44
ref: dmgamesystem-cpp
55
language: C++
6-
title: API reference (GameSystem Gui)
6+
title: API reference (Collection factory)
77
type: Defold C++
88
---
99
{% include anchor_headings.html html=content %}

0 commit comments

Comments
 (0)