Skip to main content

Class HasAuthorityAttribute

Prevents players without authority from running this method. Can only be used inside a NetworkBehaviour

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

Fields

error

If true, when the method is called from a client, it throws an error 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