27 lines
639 B
C#
27 lines
639 B
C#
using UnityEngine;
|
|
|
|
namespace ShrinkNetwork
|
|
{
|
|
public static class ShrinkNetworkRuntime
|
|
{
|
|
public static ShrinkNetworkService Default { get; private set; }
|
|
|
|
static ShrinkNetworkRuntime()
|
|
{
|
|
RebuildDefault();
|
|
}
|
|
|
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
|
private static void ResetOnPlayModeEnter()
|
|
{
|
|
RebuildDefault();
|
|
}
|
|
|
|
private static void RebuildDefault()
|
|
{
|
|
Default = new ShrinkNetworkService();
|
|
ShrinkNetworkGeneratedRegistry.RegisterAll(Default);
|
|
}
|
|
}
|
|
}
|