forked from Unity-Technologies/EntityComponentSystemSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetRpcSystemDynamicAssemblyListSystem.cs
More file actions
25 lines (22 loc) · 963 Bytes
/
Copy pathSetRpcSystemDynamicAssemblyListSystem.cs
File metadata and controls
25 lines (22 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using Unity.Entities;
namespace Unity.NetCode.Samples.Common
{
/// <summary>
/// We use a dynamic assembly list so we can build a server with a subset of the assemblies
/// (only including one of the samples instead of all).
/// If you only have a single game in the project you generally do not need to enable DynamicAssemblyList.
/// </summary>
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation | WorldSystemFilterFlags.ServerSimulation | WorldSystemFilterFlags.ThinClientSimulation)]
[UpdateInGroup(typeof(InitializationSystemGroup))]
[CreateAfter(typeof(RpcSystem))]
public partial class SetRpcSystemDynamicAssemblyListSystem : SystemBase
{
protected override void OnCreate()
{
SystemAPI.GetSingletonRW<RpcCollection>().ValueRW.DynamicAssemblyList = true;
Enabled = false;
}
protected override void OnUpdate() { }
}
}