示例#1
0
        public void OnDisabled()
        {
            // for hot reload
            if (LoadingComplete)
            {
                UninstallUI();

                LiveReload.Restore();
                LiveReload.RefreshRenderData();
            }

            Patcher.Revert();
            ResourcePackEditor.Uninstall();
            ResourceReplacer.Uninstall();
        }
示例#2
0
        public void OnEnabled()
        {
            ResourceReplacer.Ensure();
            ResourcePackEditor.Ensure();
            var devPack = ResourcePackEditor.GetOrCreateDevResourcePack();

            if (devPack != null)
            {
                ResourcePackEditor.instance.ActivePack = devPack;
                ResourceReplacer.instance.ActivePacks.Add(devPack);
            }

            Patcher.Apply();

            // for hot reload
            if (LoadingComplete)
            {
                InstallUI();

                LiveReload.Replace();
                LiveReload.RefreshRenderData();
            }
        }