привет, у меня есть несколько скриптов в unity связанных между собой, помоги с рефакторингом 
 public class MainMenuWindow : UIWindowBase, IMainMenuWindow
 {
     [SerializeField]
     private SectionPanelMenu sectionPanelMenu;
     [SerializeField]
     private SectionPanelMenu applicationPanelMenu;
     [SerializeField]
     private PanelParameters panelParameters;
     [SerializeField]
     private TrackerPanel trackerPanel;
     [SerializeField]
     private ModalWindow modalWindow;
     [SerializeField] 
     private InteractiveElements cameraViewDefaultButton;
     [SerializeField] 
     private InteractiveElements cameraViewTopButton;
     [SerializeField] 
     private InteractiveElements cameraViewSideButton;

     private CreateMenu createMenu;
     private CameraController cameraController;
     private ConstructorCameraRotator cameraRotator;
     private MapEditorContainer mapEditorContainer;
     private SmokeGenerator smokeGenerator;
     private SimulatorDevice simulatorDevice;
     private const string DesignerMenuPrefabPath = "ui/designerMenu/prefabs/designerMenu";
     private const string CameraMenuPrefabPath = "ui/cameraMenu/prefabs/cameraMenu";

     public IPanelParameters PanelParameters => panelParameters;

     private void Start()
     {
         createMenu = container.Resolve<CreateMenu>();
         cameraController = container.Resolve<CameraController>();

         cameraRotator = new ConstructorCameraRotator(cameraController);
         cameraRotator.Initialize(container.Resolve<GridConfig>().CameraPositions.CameraPositions.ToList());

         InitializeSectionPanelMenu(sectionPanelMenu, SwitchCameraMenu, SwitchDesignerMenu);
         InitializeSectionPanelMenu(applicationPanelMenu, TurnOffControlSystem, ShowModalWindowExitApplication);

         panelParameters.Initialize();

         modalWindow.Initialize();
         modalWindow.OnExitApplication += ExitApplication;
         modalWindow.OnCancelSelection += HideModalWindow;
         modalWindow.OnOffComplex += OffComplex;
         
         cameraViewDefaultButton.OnClick += () => { cameraController.SetDefaultView(); cameraRotator.Reset(); };
         cameraViewTopButton.OnClick += () => { cameraController.SetTopView(); cameraRotator.Reset(); };
         cameraViewSideButton.OnClick += () => cameraRotator.ChangeCameraPosition(true);

         //временное колличенство трекеров
         trackerPanel.InitializeTrackers(6);

         mapEditorContainer = container.Resolve<ContainerFacade>().View as MapEditorContainer;
         var smokeGeneratorObject = mapEditorContainer.GetElement(ModuleType.Smoke_generator);
         if (smokeGeneratorObject != null)
         {
             smokeGenerator = smokeGeneratorObject.gameObject.GetComponent<SmokeGenerator>();

             panelParameters.OnSwitchingSmoke += SwitchingSmoke;
             SwitchingSmoke(smokeGenerator.GetStatusGenerator());
         }
         if (smokeGeneratorObject != null)
         {
             panelParameters.SmokeButtonActive(true, smokeGenerator.GetStatusGenerator());
         }
         else
         {
             panelParameters.SmokeButtonActive(false, false);
         }
         //
         var SimulatorDeviceObject = mapEditorContainer.GetElement(ModuleType.Simulator_device);
         if (SimulatorDeviceObject != null)
         {
             simulatorDevice = SimulatorDeviceObject.gameObject.GetComponent<SimulatorDevice>();

             panelParameters.OnSwitchingLight += SwitchingLight;
             SwitchingLight(simulatorDevice.GetStatusDevice());
         }
         if (SimulatorDeviceObject != null)
         {
             panelParameters.LightButtonActive(true, simulatorDevice.GetStatusDevice());
         }
         else
         {
             panelParameters.LightButtonActive(false, false);
         }

     }

     private void SwitchingLight(bool status)
     {
         simulatorDevice.SetDeviceActive(status);
     }

     private void SwitchingSmoke(bool status)
     {
         smokeGenerator.SetGeneratorActive(status);
     }

     private void InitializeSectionPanelMenu(SectionPanelMenu menu, Action onSwitchOne, Action onSwitchTwo)
     {
         menu.Initialize();
         menu.OnSwitchOneMode += onSwitchOne;
         menu.OnSwitchTwoMode += onSwitchTwo;
     }

     private void OffComplex()
     {
         // выключает всю системы света, дыма, звуков и взаимодействия препятствий.
     }

     private void ExitApplication()
     {
         Debug.Log("ExitApp");
     }

     private void SwitchDesignerMenu()
     {
         createMenu.CreateMenuWindow<DesignerMenuWindow>(DesignerMenuPrefabPath);
         cameraController.SwitchToMapEditorView(true); 
     }

     private void SwitchCameraMenu()
     {
         cameraController.SwitchToMapEditorView(false); 
         createMenu.CreateMenuWindow<CameraMenuWindow>(CameraMenuPrefabPath);
     }

     private void TurnOffControlSystem()
     {
         modalWindow.gameObject.SetActive(true);
         modalWindow.ActivateOffComplexMenu();
     }

     private void ShowModalWindowExitApplication()
     {
         modalWindow.gameObject.SetActive(true);
         modalWindow.ActivateExitMenu();
     }

     private void HideModalWindow()
     {
         modalWindow.gameObject.SetActive(false);
     }

     protected override void OnRemove()
     {
         base.OnRemove();

         sectionPanelMenu.OnSwitchOneMode -= SwitchCameraMenu;
         sectionPanelMenu.OnSwitchTwoMode -= SwitchDesignerMenu;
         sectionPanelMenu.Remove();

         applicationPanelMenu.OnSwitchOneMode -= TurnOffControlSystem;
         applicationPanelMenu.OnSwitchTwoMode -= ShowModalWindowExitApplication;
         applicationPanelMenu.Remove();

         panelParameters.OnSwitchingSmoke -= SwitchingSmoke;
         panelParameters.OnSwitchingLight -= SwitchingLight;
         panelParameters.Remove();

         modalWindow.Remove();
         modalWindow.OnExitApplication -= ExitApplication;
         modalWindow.OnCancelSelection -= HideModalWindow;
         modalWindow.OnOffComplex -= OffComplex;

         cameraViewDefaultButton.OnClick -= () => { cameraController.SetDefaultView(); cameraRotator.Reset(); };
         cameraViewTopButton.OnClick -= () => { cameraController.SetTopView(); cameraRotator.Reset(); };
         cameraViewSideButton.OnClick -= () => cameraRotator.ChangeCameraPosition(true);
     }
 }
public class SimulatorDevice : MonoBehaviour
{
    [SerializeField]
    private Animator _animator;

    private bool isStatusSimulatorDevice;

    public void SetDeviceActive(bool isActive)
    {
        isStatusSimulatorDevice = isActive;

        if (isActive)
        {
            _animator.Play("BeaconFlash");
        }
        else
        {
            _animator.Play("BeaconIdle");
        }
    }

    public bool GetStatusDevice()
    {
        return isStatusSimulatorDevice;
    }
}
public class SmokeGenerator : MonoBehaviour
{
    [SerializeField]
    private ParticleSystem mainNozzle;
    [SerializeField]
    private ParticleSystem secondarySmoke;

    private bool isStatusGenerator;

    public void SetGeneratorActive(bool isActive)
    {
        isStatusGenerator = isActive;
        mainNozzle.gameObject.SetActive(isActive);
        secondarySmoke.gameObject.SetActive(isActive);
    }

    public bool GetStatusGenerator()
    { 
        return isStatusGenerator;
    }
}
 public class ControlMenu : MonoBehaviour
 {
     [SerializeField]
     private InteractiveElements switchingTextVisibility;
     [SerializeField]
     private InteractiveElements switchingLight;
     [SerializeField]
     private InteractiveElements switchingSmoke;
     [SerializeField]
     private InteractiveElements switchingHeating;
     [SerializeField]
     private InteractiveElements switchingSounds;

     [SerializeField]
     private PanelSwitchingTextVisibility panelSwitchingTextVisibility;

     public event Action OnSwitchingTextVisibility;
     public event Action<bool> OnSwitchingLight;
     public event Action<bool> OnSwitchingSmoke;
     public event Action<bool> OnSwitchingHeating;
     public event Action OnSwitchingSounds;

     public void Initialize()
     {
         panelSwitchingTextVisibility.Initialize();

         switchingTextVisibility.OnClick += SwitchingTextVisibility;

         switchingLight.OnToggleClick += SwitchingLight;
         switchingSmoke.OnToggleClick += SwitchingSmoke;
         switchingHeating.OnToggleClick += SwitchingHeating;
         switchingSounds.OnClick += SwitchingSounds;
     }

     public void SwitchingButtonSmokeMode(bool isInteractable, bool status)
     {
         switchingSmoke.SetInteractable(isInteractable);
         switchingSmoke.UpdateStatusExternal(status);
     }

     public void SwitchingButtonLightMode(bool isInteractable, bool status)
     {
         switchingLight.SetInteractable(isInteractable);
         switchingLight.UpdateStatusExternal(status);
     }

     public void SwitchingButtonLightMode(bool status)
     {
         switchingLight.SetInteractable(status);
     }

     private void SwitchingTextVisibility()
     {
         panelSwitchingTextVisibility.SwitchingText();
         OnSwitchingTextVisibility?.Invoke();
     }

     private void SwitchingLight(bool status)
     {
         OnSwitchingLight?.Invoke(status);
     }

     private void SwitchingSmoke(bool status)
     {
         OnSwitchingSmoke?.Invoke(status);
     }

     private void SwitchingHeating(bool status)
     {
         OnSwitchingHeating?.Invoke(status);
     }

     private void SwitchingSounds()
     {
         OnSwitchingSounds?.Invoke();
     }

     public void Remove()
     {
         switchingTextVisibility.OnClick -= SwitchingTextVisibility;

         switchingLight.OnToggleClick = null;
         switchingSmoke.OnToggleClick = null;
         switchingHeating.OnToggleClick = null;
         switchingSounds.OnClick -= SwitchingSounds;
         
     }
 }
public class PanelParameters : MonoBehaviour, IPanelParameters
{
    [SerializeField]
    private SoundSettings soundSettings;
    [SerializeField]
    private ControlMenu controlMenu;

    private RectTransform rect;

    private bool isSoundsPanelActive = false;

    private static readonly Vector2 DefaultRectVector = new Vector2(0, 0.5f);

    public event Action<bool> OnSwitchingSmoke;
    public event Action<bool> OnSwitchingLight;

    public ControlMenu ControlMenu => controlMenu;

    public void Initialize()
    {
        rect = GetComponent<RectTransform>();

        soundSettings.Initialize();
        controlMenu.Initialize();

        soundSettings.gameObject.SetActive(isSoundsPanelActive);
        RebuildLayout();

        controlMenu.OnSwitchingTextVisibility += HandleSwitchingTextVisibility;
        controlMenu.OnSwitchingSounds += SwitchingSounds;
        controlMenu.OnSwitchingSmoke += SwitchingSmoke;
        controlMenu.OnSwitchingLight += SwitchingLight;
    }

    public void SmokeButtonActive(bool isInteractable, bool status)
    {
        controlMenu.SwitchingButtonSmokeMode(isInteractable, status);
    }

    public void LightButtonActive(bool isInteractable, bool status)
    {
        controlMenu.SwitchingButtonLightMode(isInteractable, status);
    }

    private void SwitchingLight(bool status)
    {
        OnSwitchingLight?.Invoke(status);
    }

    private void SwitchingSmoke(bool status)
    {
        OnSwitchingSmoke?.Invoke(status);
    }

    private void SwitchingSounds()
    {
        isSoundsPanelActive = !isSoundsPanelActive;
        soundSettings.gameObject.SetActive(isSoundsPanelActive);

        RebuildLayout();
    }

    private void HandleSwitchingTextVisibility()
    {
        RebuildLayout();
    }

    public void Remove()
    {
        soundSettings.Remove();
        controlMenu.Remove();
        controlMenu.OnSwitchingSounds -= SwitchingSounds;
        controlMenu.OnSwitchingSmoke -= SwitchingSmoke;
        controlMenu.OnSwitchingLight -= SwitchingLight;
        controlMenu.OnSwitchingTextVisibility -= HandleSwitchingTextVisibility;
    }

    private void RebuildLayout()
    {
        LayoutRebuilder.ForceRebuildLayoutImmediate(rect);

        rect.anchorMin = DefaultRectVector;
        rect.anchorMax = DefaultRectVector;
        rect.pivot = DefaultRectVector;
        rect.anchoredPosition = Vector2.zero;
    }
}