Next: , Previous: , Up: Network   [Contents][Index]


13.6 Photon Instantiator

Component: PhotonInstantiator

Photon Instantiator takes the ’Spawn’ message, with a string parameter representing the name of the prefab you want to spawn. The prefab must be in a ’Resources’ folder, or Photon will throw an error and the object will fail instantiation. Message To Spawned Entity is sent to the prefab after it spawns.

Field of PhotonInstantiator: bool asSceneObject

Should this be spawned as a scene object, and be owned by the Master Client? (Otherwise, this client is authoritative over it)

Default value: false

Field of PhotonInstantiator: bool inheritVelocity

Should the object we spawned have a relative velocity to ours?

Default value: true

Field of PhotonInstantiator: bool inheritTeam

If true, we will attempt to determine the team of this object, and send it to the spawned object by using ’SetTeam’ with an integer representing that team’s index.

Default value: true

Field of PhotonInstantiator: bool asSceneObject

Should this be spawned as a scene object, and be owned by the Master Client? (Otherwise, this client is authoritative over it)

Default value: false

Field of PhotonInstantiator: bool inheritVelocity

Should the object we spawned have a relative velocity to ours?

Default value: true

Field of PhotonInstantiator: bool inheritTeam

If true, we will attempt to determine the team of this object, and send it to the spawned object by using ’SetTeam’ with an integer representing that team’s index.

Default value: true