SyncObject
Jump To Parameters
Jump To Function Definitions
Parameter Definitions
Select the parameter name from below to jump directly to it on this page.
isLeftHanded
isWeaponHolder
syncDestroy
syncDisable
syncEnable
syncImmediateChildren
view
isLeftHanded
NOTE: This only matters when "syncImmediateChildren" is enabled \n\nIs a left handed weapon? If the correct one is not selected could produce incorrect positioning when syncing across the network.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | false |
isWeaponHolder
NOTE: This only matters when "syncImmediateChildren" is enabled \n\nIs this a weapon holder? If the correct one is not selected could produce incorrect positioning when syncing across the network.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | false |
syncDestroy
When this object is destroyed, sync across the network using the selected PhotonView.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | true |
syncDisable
When this object is disabled, sync across the network using the selected PhotonView.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | true |
syncEnable
When this object is enabled, sync across the network using the selected PhotonView.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | true |
syncImmediateChildren
Important Note: Used ONLY for items! \n\n When child objects are added or removed, sync across the network using the selected PhotonView. This will only sync immediate child transforms of this object, no nested transforms. This is a limitation of the unity engine.\n\n Will sync: Enables, Destorys, Disables, and Instantiate items from the item data.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | bool | true |
view
The photon view to use when making rpc calls. If not populated will use the root object or if this object contains a photonview component will use it.
| Exposed Value | Type | Default Value |
|---|---|---|
| public | PhotonView | null |
Function Definitions
Select the function name from below to jump directly to it on this page.
AddThisComponent
Awake
GOInList
IsInChildrenStatsList
OnDestroy
OnDisable
OnEnable
OnTransformChildrenChanged
protected virtual void AddThisComponent(GameObject child)
Calls to add the
SyncObjectcomponent to the passed in gameobject. Also sets the settings as though this is a child of this component.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
| Parameter Name | Description |
|---|---|
| child | The GameObject to add the SyncObject component to |
protected virtual void Awake()
Builds the index tree to the root of this tree and finds the parent
PhotonViewcomponent.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual bool GOInList(GameObject go, List children)
Checks to see if the passed in GameObject is is currently in this components known list of gameObjects.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | True or False, is already in the known list. |
| Parameter Name | Description |
|---|---|
| go | The gameobject to check if its in the list |
protected virtual bool IsInChildrenStatsList(GameObject go)
Checks to see if the passed in GameObject is is currently in this components known list of gameObjects.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | True or False, is already in the known list. |
| Parameter Name | Description |
|---|---|
| go | The gameobject to check if its in the list |
protected virtual void OnDestroy()
Calls the
Item_NetworkDestroyRPC which destroys this object for everyone on the network, not including yourself.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual void OnDisable()
Will call the
NetworkSetActiveRPC which will disable this object for everyone on the network, not including yourself.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual void OnEnable()
Will call the
NetworkSetActiveRPC which will enable this object for everyone on the network, not including yourself.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters
protected virtual void OnTransformChildrenChanged()
Called when a child object is added or removed from this object. Will detect if the object is added or removed and call the
Item_NetworkDestroyorNetworkSetActiveRPC to enable/disable or destroy this object over the network. This makes the networked players mimic what the owner’s state currently is.
| Expose Value | Overrideable | Returns |
|---|---|---|
| protected | True | Does not return anything |
No parameters