Summary
This script handles the creation of a PC player. Having an instance of this script on a GameObject will instantiate a PC player
and then delete the GameObject afterwards. Primarily intended to be used through ASL Player prefab.
- Namespace
- ASL
.PlayerSystem - Base Types
-
- Photon
.PunBehaviour - LocalEventHandler
- Photon
graph TD
Base0["LocalEventHandler"]-->Type
click Base0 "/2019.CRCS-WebSite/Documentation/api/ASL.LocalEventSystem/LocalEventHandler"
Base1["Photon.PunBehaviour"]-->Base0
Type["ControllerInstantiation"]
class Type type-node
Syntax
public class ControllerInstantiation : LocalEventHandler
Fields
Name | Constant Value | Summary |
---|---|---|
avatarMaterial |
Material to be used locally for the PC Player avatar. Could be
reworked to the photon event system to better sync between clients.
|
|
initialPosition |
Initial position the PC player will be moved to.
|
|
initialScale |
Initial scale the PC player will be set to.
|
Methods
Name | Value | Summary |
---|---|---|
OnDestroy |
void |
Unsubscribes from the lcal events system to prevent a memory leak.
Inherited from LocalEventHandler
|
OnEnable |
void |
Subscribes to Local event system, when a local event is trigger the OnLocalEvent function will be called.
Inherited from LocalEventHandler
|
OnJoinedRoom |
void |
Attempts to create a PC player for this user upon connecting to the ASL room.
|
OnLocalEvent |
void |
Event handler for local events relating to the creation of a PC player.
|
OnPhotonInstantiate |
void |
Callback function that is triggered when an object is created via photon.
Inherited from LocalEventHandler
|