Exemple #1
0
            private void Update()
            {
                Coroutines.Process();

                if (Plugin.RegionInfoWatcher.Reload)
                {
                    Plugin.RegionInfoWatcher.Reload = false;
                    ServerManager.Instance.LoadServers();
                    Plugin.Log.LogInfo("Region file reloaded");
                }

                if (Input.GetKeyDown(KeyCode.F5))
                {
                    Plugin.Log.LogInfo("Reloading all configs");

                    foreach (var pluginInfo in IL2CPPChainloader.Instance.Plugins.Values)
                    {
                        var config = ((BasePlugin)pluginInfo.Instance).Config;
                        if (!config.Any())
                        {
                            continue;
                        }

                        try
                        {
                            config.Reload();
                        }
                        catch (Exception e)
                        {
                            Plugin.Log.LogWarning($"Exception occured during reload of {pluginInfo.Metadata.Name}: {e}");
                        }
                    }
                }
            }
Exemple #2
0
            private static void OnPostRenderM(Camera camera)
            {
                if (OnPostRenderCam == null)
                {
                    OnPostRenderCam = camera;
                }

                if (OnPostRenderCam == camera)
                {
                    Coroutines.ProcessWaitForEndOfFrame();
                }
            }
Exemple #3
0
 private void FixedUpdate()
 {
     Coroutines.ProcessWaitForFixedUpdate();
 }