Format
typescript
Prefab.Instance()class: Prefab
Description
Instantiate an entity object using a prefab resource.
Parameters
| param_name | type | description |
|---|
Return
| type | description |
|---|---|
GameObject | The instantiated GameObject entity object. |
Code Example
typescript
let uid = "******";
let prefab = Resources.Load<Prefab>(Prefab, uid);
if(prefab){
let object = prefab.Instance();
}