Skip to main content

ObjectManager.InstantiateObject

Declaration#

public virtual T InstantiateObject(T original, bool playerOwned, bool allowNetworked)

Parameters#

NameDescription
originalOriginal object to instantiate
playerOwnedRegister object as belonging to player
allowNetworkedRegister 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#

NameDescription
originalOriginal object to instantiate
parentTransform to use as object parent
playerOwnedRegister object as belonging to player
allowNetworkedRegister 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#

NameDescription
originalOriginal object to instantiate
positionPosition to apply to object
rotationRotation to apply to object
playerOwnedRegister object as belonging to player
allowNetworkedRegister 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#

NameDescription
originalOriginal object to instantiate
positionPosition to apply to object
rotationRotation to apply to object
parentTransform to use as object parent
playerOwnedRegister object as belonging to player
allowNetworkedRegister 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);    }
}