public void OnDisabled() { // for hot reload if (LoadingComplete) { UninstallUI(); LiveReload.Restore(); LiveReload.RefreshRenderData(); } Patcher.Revert(); ResourcePackEditor.Uninstall(); ResourceReplacer.Uninstall(); }
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(); } }