public void Clear()
 {
     SceneSubscriberTypes.Clear();
     SceneRequirements.Clear();
     m_EnvironmentMode    = default;
     m_EnvironmentPrefab  = null;
     m_SyntheticRecording = null;
     m_Temporal           = false;
 }
        internal bool Update(MARSSession marsSession, List <IFunctionalitySubscriber> subscribers, bool temporal)
        {
            k_SubscriberTypes.Clear();
            k_TraitRequirements.Clear();

            var moduleLoader = ModuleLoaderCore.instance;

            foreach (var module in moduleLoader.modules)
            {
                k_SubscriberTypes.Add(module.GetType());
            }

            foreach (var subscriber in subscribers)
            {
                k_SubscriberTypes.Add(subscriber.GetType());
            }

            k_TraitRequirements.UnionWith(marsSession.requirements.TraitRequirements);

            var simulationSettings   = SimulationSettings.instance;
            var environmentMode      = simulationSettings.EnvironmentMode;
            var environmentPrefab    = simulationSettings.EnvironmentPrefab;
            var independentRecording = simulationSettings.IndependentRecording;
            var syntheticRecording   = simulationSettings.UseSyntheticRecording ?
                                       simulationSettings.GetRecordingForCurrentSyntheticEnvironment() : null;

            var recordingPlaybackModule  = moduleLoader.GetModule <MarsRecordingPlaybackModule>();
            var disableRecordingPlayback = recordingPlaybackModule != null && recordingPlaybackModule.DisableRecordingPlayback;

            var changed = !SceneSubscriberTypes.SetEquals(k_SubscriberTypes) ||
                          !SceneRequirements.SetEquals(k_TraitRequirements) ||
                          m_EnvironmentMode != environmentMode ||
                          m_EnvironmentPrefab != environmentPrefab ||
                          m_SyntheticRecording != syntheticRecording ||
                          m_IndependentRecording != independentRecording ||
                          m_Temporal != temporal ||
                          m_DisableRecordingPlayback != disableRecordingPlayback;

            SceneSubscriberTypes.Clear();
            SceneSubscriberTypes.UnionWith(k_SubscriberTypes);
            SceneRequirements.Clear();
            SceneRequirements.UnionWith(k_TraitRequirements);
            m_EnvironmentMode          = environmentMode;
            m_EnvironmentPrefab        = environmentPrefab;
            m_SyntheticRecording       = syntheticRecording;
            m_IndependentRecording     = independentRecording;
            m_Temporal                 = temporal;
            m_DisableRecordingPlayback = disableRecordingPlayback;

            k_SubscriberTypes.Clear();
            k_TraitRequirements.Clear();
            return(changed);
        }