SpawnNetworkObject

Method

Spawns an instance of a networked prefab in the space.

Definition

SpawnNetworkObjectRequest SpawnNetworkObject(SpatialNetworkObject prefab, Vector3? position = null, Quaternion? rotation = null)
SpawnNetworkObjectRequest SpawnNetworkObject(SpatialNetworkObject prefab, Vector3? position = null, Quaternion? rotation = null)

Returns SpawnNetworkObjectRequest

Parameters

ParameterDescription
SpatialNetworkObject prefab

A prefab that has a SpatialNetworkObject component attached

Vector3? position

Optional initial position

Quaternion? rotation

Optional initial rotation