protected override void UnloadData() { Instance = null; Networking?.Unregister(); Networking = null; HUD?.Unload(); HudApi?.Unload(); PlayerList?.Clear(); PlayerStatsDict?.Clear(); }
public void Unload() { hud.Unload(); if (category != null) { config.OnBlockBuildTimeChanged -= Config_OnBlockBuildTimeChanged; config.OnComponentCostModifierChanged -= Config_OnComponentCostModifierChanged; config.OnMinBlocksChanged -= Config_OnMinBlocksChanged; config.OnMaxBlocksChanged -= Config_OnMaxBlocksChanged; config.OnPowerModifierChanged -= Config_OnPowerModifierChanged; config.OnSubgridsChanged -= Config_OnSubgridsChanged; config.OnExtraComponentChanged -= Config_OnExtraComponentChanged; config.OnExtraCompCostChanged -= Config_OnExtraCompCostChanged; } }