Next: Photon Destructible, Previous: Network.Inventory, Up: Network [Contents][Index]
Allows selection of an avatar prefab by the player. When spawning players using this, their current avatar will despawn. Great for instant respawn games. —Messages— ’SetAvatarString’ takes a string parameter representing the name of the new prefab you want to use for this player. Prefab must be directly inside a ’Resources’ folder.’Spawn’ takes no parameter. It will first destroy the player’s current avatar, if any, then will instantiate a new one using the string assigned as the avatar. Make sure to call ’SetAvatarString’ before spawning or you will get an error.
bool
destroyOldPlayerShould we destroy the old player, if it still exists?
Default value: true
Sets the Resource name of the Player avatar object we want to spawn, change this to change the player prefab.
Argument: Name of the new Player prefab
Spawns the Player’s Avatar immediately.
bool
destroyOldPlayerShould we destroy the old player, if it still exists?
Default value: true
Sets the Resource name of the Player avatar object we want to spawn, change this to change the player prefab.
Argument: Name of the new Player prefab
Spawns the Player’s Avatar immediately.