Photon Fusion 2.0.4

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

More...

Inherits Attribute.

Public Member Functions

 NetworkedAttribute ()
 Default constructor for NetworkedAttribute More...
 

Properties

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

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 { } }

Constructor & Destructor Documentation

◆ NetworkedAttribute()

Default constructor for NetworkedAttribute

Property Documentation

◆ Default

string Default
getset

Name of the field that holds the default value for this networked property.