Mirror Networking
Attributes.cs
1using System;
2using UnityEngine;
3
4namespace Mirror
5{
10 [AttributeUsage(AttributeTargets.Field)]
11 public class SyncVarAttribute : PropertyAttribute
12 {
13 public string hook;
14 }
15
20 [AttributeUsage(AttributeTargets.Method)]
21 public class CommandAttribute : Attribute
22 {
23 public int channel = Channels.Reliable;
24 public bool requiresAuthority = true;
25 }
26
30 [AttributeUsage(AttributeTargets.Method)]
31 public class ClientRpcAttribute : Attribute
32 {
33 public int channel = Channels.Reliable;
34 public bool includeOwner = true;
35 }
36
40 [AttributeUsage(AttributeTargets.Method)]
41 public class TargetRpcAttribute : Attribute
42 {
43 public int channel = Channels.Reliable;
44 }
45
50 [AttributeUsage(AttributeTargets.Method)]
51 public class ServerAttribute : Attribute {}
52
57 [AttributeUsage(AttributeTargets.Method)]
58 public class ServerCallbackAttribute : Attribute {}
59
64 [AttributeUsage(AttributeTargets.Method)]
65 public class ClientAttribute : Attribute {}
66
71 [AttributeUsage(AttributeTargets.Method)]
72 public class ClientCallbackAttribute : Attribute {}
73
77 public class SceneAttribute : PropertyAttribute {}
78
83 [AttributeUsage(AttributeTargets.Field)]
84 public class ShowInInspectorAttribute : Attribute {}
85}
Prevents the server from running this method.
Definition: Attributes.cs:65
Prevents the server from running this method.
Definition: Attributes.cs:72
The server uses a Remote Procedure Call (RPC) to run this function on clients.
Definition: Attributes.cs:32
Call this from a client to run this function on the server.
Definition: Attributes.cs:22
Converts a string property into a Scene property in the inspector
Definition: Attributes.cs:77
Prevents clients from running this method.
Definition: Attributes.cs:51
Prevents clients from running this method.
Definition: Attributes.cs:58
Used to show private SyncList in the inspector,
Definition: Attributes.cs:84
SyncVars are used to synchronize a variable from the server to all clients automatically.
Definition: Attributes.cs:12
The server uses a Remote Procedure Call (RPC) to run this function on a specific client.
Definition: Attributes.cs:42