Method CreateLocationContainer
| Improve this Doc View SourceCreateLocationContainer(string)
Create an empty GameObject that is disabled, so any Components in instantiated GameObjects will not start their lifecycle.
Declaration
public GameObject CreateLocationContainer(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the location |
Returns
Type | Description |
---|---|
GameObject | Empty and hierarchy disabled GameObject |
CreateLocationContainer(GameObject)
Create a copy that is disabled, so any Components in instantiated child GameObjects will not start their lifecycle.
Use this if you plan to alter your location prefab in code after importing it.
Don't create a separate container if you won't alter the prefab afterwards as it creates a new instance for the container.
Use this if you plan to alter your location prefab in code after importing it.
Don't create a separate container if you won't alter the prefab afterwards as it creates a new instance for the container.
Declaration
public GameObject CreateLocationContainer(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | gameObject | Instantiated and hierarchy disabled location prefab |
Returns
Type | Description |
---|---|
GameObject |
CreateLocationContainer(AssetBundle, string)
Loads and spawns a GameObject from an AssetBundle as a location container.
The copy is disabled, so any Components in instantiated child GameObjects will not start their lifecycle.
Use this if you plan to alter your location prefab in code after importing it.
Don't create a separate container if you won't alter the prefab afterwards as it creates a new instance for the container.
The copy is disabled, so any Components in instantiated child GameObjects will not start their lifecycle.
Use this if you plan to alter your location prefab in code after importing it.
Don't create a separate container if you won't alter the prefab afterwards as it creates a new instance for the container.
Declaration
public GameObject CreateLocationContainer(AssetBundle assetBundle, string assetName)
Parameters
Type | Name | Description |
---|---|---|
AssetBundle | assetBundle | A preloaded AssetBundle |
string | assetName | Name of the prefab in the bundle to be instantiated as the location cotainer |
Returns
Type | Description |
---|---|
GameObject |