mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 00:39:53 +00:00
run RuntimeInitializeOnLoad methods
This commit is contained in:
parent
c63f74fe29
commit
241b972dcd
@ -159,7 +159,7 @@ namespace Mirror
|
||||
|
||||
// hook into Unity runtime to actually add our custom functions
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
static void RuntimeInitializeOnLoad()
|
||||
public static void RuntimeInitializeOnLoad()
|
||||
{
|
||||
//Debug.Log("Mirror: adding Network[Early/Late]Update to Unity...");
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using kcp2k;
|
||||
using Mirror;
|
||||
using OWML.Common;
|
||||
using OWML.Utils;
|
||||
using QSB.Anglerfish.TransformSync;
|
||||
using QSB.AuthoritySync;
|
||||
using QSB.ClientServerStateSync;
|
||||
@ -22,6 +23,7 @@ using QSB.TornadoSync.TransformSync;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
@ -52,6 +54,9 @@ namespace QSB
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
NetworkLoop.RuntimeInitializeOnLoad();
|
||||
Assembly.GetExecutingAssembly().GetType("Mirror.GeneratedNetworkCode").Invoke<object>("InitReadWriters");
|
||||
|
||||
transport = gameObject.AddComponent<KcpTransport>();
|
||||
base.Awake();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user