ObjectManager.InstantiateObject
Declaration#
public virtual T InstantiateObject(T original, bool playerOwned, bool allowNetworked)Parameters#
| Name | Description |
|---|---|
| original | Original object to instantiate |
| playerOwned | Register object as belonging to player |
| allowNetworked | Register as networked object |
Description#
Instantiate an object
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GameObject prefab) { InterfaceManager.ObjectManagement.InstantiateObject(prefab); }
}Declaration#
public virtual T InstantiateObject(T original, Transform parent, bool playerOwned, bool allowNetworked)Parameters#
| Name | Description |
|---|---|
| original | Original object to instantiate |
| parent | Transform to use as object parent |
| playerOwned | Register object as belonging to player |
| allowNetworked | Register as networked object |
Description#
Instantiate an object
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GameObject prefab) { InterfaceManager.ObjectManagement.InstantiateObject(prefab, transform); }
}Declaration#
public virtual T InstantiateObject(T original, Vector3 position, Quaternion rotation, bool playerOwned, bool allowNetworked)Parameters#
| Name | Description |
|---|---|
| original | Original object to instantiate |
| position | Position to apply to object |
| rotation | Rotation to apply to object |
| playerOwned | Register object as belonging to player |
| allowNetworked | Register as networked object |
Description#
Instantiate an object
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GameObject prefab) { InterfaceManager.ObjectManagement.InstantiateObject(prefab, new Vector3(0, 1, 0), Quaternion.Euler(0, 180, 0)); }
}Declaration#
public virtual T InstantiateObject(T original, Vector3 position, Quaternion rotation, Transform parent, bool playerOwned, bool allowNetworked)Parameters#
| Name | Description |
|---|---|
| original | Original object to instantiate |
| position | Position to apply to object |
| rotation | Rotation to apply to object |
| parent | Transform to use as object parent |
| playerOwned | Register object as belonging to player |
| allowNetworked | Register as networked object |
Description#
Instantiate an object
Usage#
Example
using NullSave.GDTK;using UnityEngine;
public class Example : MonoBehaviour{
public void ExampleMethod(GameObject prefab) { InterfaceManager.ObjectManagement.InstantiateObject(prefab, new Vector3(0, 1, 0), Quaternion.Euler(0, 180, 0), transform); }
}