Method GetPrefab
| Improve this Doc View SourceGetPrefab(string)
Get a prefab by its name.
Search hierarchy:
Search hierarchy:
- Custom prefab with the exact name
- Vanilla prefab with the exact name from ZNetScene if already instantiated
- Vanilla prefab from the prefab cache
Declaration
public GameObject GetPrefab(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the prefab to search for. |
Returns
Type | Description |
---|---|
GameObject | The existing prefab, or null if none exists with given name |