Photon Fusion 2.0.0

Public Member Functions | Properties | List of all members
NetworkedAttribute Class Reference

Inherits Attribute.

Public Member Functions

 NetworkedAttribute ()
 Default constructor for NetworkedAttribute.
 

Properties

string Default [get, set]
 Name of the field that holds the default value for this networked property.
 

Detailed Description

Flags a property of NetworkBehaviour for network state synchronization. The property should have empty get and set defines, which will automatically be replaced with networking code via IL Weaving.

Inside of INetworkStruct, do not use AutoProperties (get; set;), as these will introduce managed types into the struct, which are not allowed. Instead use '=> default'. | [Networked]
| public string StringProp { get => default; set { } }