Photon Fusion 2.1.1

NetworkedAttribute Class Referencesealed

Public Member Functions

 NetworkedAttribute ()
 Default constructor for NetworkedAttribute.

Properties

bool AllowPrediction = true [get, set]
 If false, only state authority can write to the property. Writes from input authority and proxies are ignored (value will not be changed). If set to true, any peer can write to a property, but for non-state auth clients the value gets reset as soon as any object update arrives.
string Default [get, set]
 Name of the field that holds the default value for this networked property.
bool PluginAuthority [get, set]
 Is this property read only if custom shared mode plugin is used?

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]<br></br>
| public string StringProp { get => default; set { } }