sm.terrainTile.getContentFromPrefab
Returns the content of a prefab.
Kind: Function
Environments: Terrain
Terrain
sm.terrainTile.getContentFromPrefab( prefabPath, loadFlags )
Open the full Terrain reference
Return value 1: A table of creations in the prefab. { { name = string, pos = Vec3, rot = Quat, sortingIndex = integer, tags = { string, ... } }, ... }
Return value 2: A table of prefabs in the prefab. { { name = string, pos = Vec3, rot = Vec3, scale = Vec3, tags = { string, ... }, flags = integer }, ... }
Return value 3: A table of nodes in the prefab. { { pos = Vec3, rot = Quat, scale = Vec3, tags = { string, ... }, params = table } }
Return value 4: A table of assets in the prefab. { { uuid = Uuid, pos = Vec3, rot = Quat, slopeNormal = Vec3, colors = { string = Color, ...}, tags = { string, ... } }, ... }
Return value 5: A table of decals in the prefab. { { pos = Vec3, rot = Vec3, scale = Vec3, decalId = integer, color = Color, layer = integer, tags = { string, ... } }, ... }
Return value 6: A table of harvestables in the prefab. { {uuid = Uuid, pos = Vec3, rot = Quat, color = Color, params = table, tags = { string, ... } }, ... }
Return value 7: A table of kinematics in the prefab. { {uuid = Uuid, pos = Vec3, rot = Quat, scale = Vec3, color = Color, params = table, tags = { string, ... } }, .. }
Return value 8: A table containing the min and max bounds of the prefab. { min = Vec3, max = Vec3 }
Parameters:
| Name | Type | Description |
|---|---|---|
prefabPath |
string | The path to the prefab file. |
loadFlags (optional) |
integer | A mask of content to load. Defaults to all objects (optional) |
Returns:
| Type | Description |
|---|---|
| table table table table table table table table |
Prefab content tables. |