Skip to main content

Class NetworkMethodAttribute

Prevents this method from running unless the NetworkFlags match the current state Can only be used inside a NetworkBehaviour

Inheritance
System.Object
System.Attribute
Inherited Members
Show
Syntax
[AttributeUsage(AttributeTargets.Method)]
public class NetworkMethodAttribute : Attribute, _Attribute

Constructors

NetworkMethodAttribute(NetworkFlags)

Declaration
public NetworkMethodAttribute(NetworkFlags flags)
Parameters
TypeNameDescription
Mirage.NetworkFlagsflags

Fields

error

If true, if called incorrectly method will throw. If false, no error is thrown, but the method won't execute.

useful for unity built in methods such as Await, Update, Start, etc.

Declaration
public bool error