Files
FlaxEngine/Source/Engine/Scripting/Attributes/NetworkRpcAttribute.cs
Wojciech Figat a7e428a21c Merge branch 'master' into 1.5
# Conflicts:
#	Content/Shaders/GI/DDGI.flax
#	Content/Shaders/GI/GlobalSurfaceAtlas.flax
#	Content/Shaders/TAA.flax
#	Content/Shaders/VolumetricFog.flax
#	Source/Editor/CustomEditors/Editors/ActorTagEditor.cs
#	Source/Engine/Core/Config/GraphicsSettings.cpp
#	Source/Engine/Engine/PostProcessEffect.cs
#	Source/Engine/Graphics/GPUResourcesCollection.cpp
#	Source/Engine/Graphics/GPUResourcesCollection.h
#	Source/Engine/Graphics/PostProcessBase.h
#	Source/FlaxEngine.Gen.cs
2023-01-10 15:37:55 +01:00

43 lines
1.5 KiB
C#

// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine.Networking;
namespace FlaxEngine
{
/// <summary>
/// Indicates that a method is Remote Procedure Call which can be invoked on client and executed on server or invoked on server and executed on clients.
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public sealed class NetworkRpcAttribute : Attribute
{
/// <summary>
/// True if RPC should be executed on server.
/// </summary>
public bool Server;
/// <summary>
/// True if RPC should be executed on client.
/// </summary>
public bool Client;
/// <summary>
/// Network channel using which RPC should be send.
/// </summary>
public NetworkChannelType Channel;
/// <summary>
/// Initializes a new instance of the <see cref="NetworkRpcAttribute"/> class.
/// </summary>
/// <param name="server">True if RPC should be executed on server.</param>
/// <param name="client">True if RPC should be executed on client.</param>
/// <param name="channel">Network channel using which RPC should be send.</param>
public NetworkRpcAttribute(bool server = false, bool client = false, NetworkChannelType channel = NetworkChannelType.ReliableOrdered)
{
Server = server;
Client = client;
Channel = channel;
}
}
}