using System;
using UnityEngine;
namespace Mirror
{
///
/// SyncVars are used to synchronize a variable from the server to all clients automatically.
/// Value must be changed on server, not directly by clients. Hook parameter allows you to define a client-side method to be invoked when the client gets an update from the server.
///
[AttributeUsage(AttributeTargets.Field)]
public class SyncVarAttribute : PropertyAttribute
{
public string hook;
}
///
/// Call this from a client to run this function on the server.
/// Make sure to validate input etc. It's not possible to call this from a server.
///
[AttributeUsage(AttributeTargets.Method)]
public class CommandAttribute : Attribute
{
public int channel = Channels.Reliable;
public bool requiresAuthority = true;
}
///
/// The server uses a Remote Procedure Call (RPC) to run this function on clients.
///
[AttributeUsage(AttributeTargets.Method)]
public class ClientRpcAttribute : Attribute
{
public int channel = Channels.Reliable;
public bool includeOwner = true;
}
///
/// The server uses a Remote Procedure Call (RPC) to run this function on a specific client.
///
[AttributeUsage(AttributeTargets.Method)]
public class TargetRpcAttribute : Attribute
{
public int channel = Channels.Reliable;
}
///
/// Prevents clients from running this method.
/// Prints a warning if a client tries to execute this method.
///
[AttributeUsage(AttributeTargets.Method)]
public class ServerAttribute : Attribute {}
///
/// Prevents clients from running this method.
/// No warning is thrown.
///
[AttributeUsage(AttributeTargets.Method)]
public class ServerCallbackAttribute : Attribute {}
///
/// Prevents the server from running this method.
/// Prints a warning if the server tries to execute this method.
///
[AttributeUsage(AttributeTargets.Method)]
public class ClientAttribute : Attribute {}
///
/// Prevents the server from running this method.
/// No warning is printed.
///
[AttributeUsage(AttributeTargets.Method)]
public class ClientCallbackAttribute : Attribute {}
///
/// Converts a string property into a Scene property in the inspector
///
public class SceneAttribute : PropertyAttribute {}
///
/// Used to show private SyncList in the inspector,
/// Use instead of SerializeField for non Serializable types
///
[AttributeUsage(AttributeTargets.Field)]
public class ShowInInspectorAttribute : Attribute {}
}