Beispiel #1
0
        private void Init()
        {
            if (m_keepAlive)
            {
                DontDestroyOnLoad(transform.root.gameObject);
            }

            m_fpsMonitor   = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor;
            m_ramMonitor   = GetComponentInChildren(typeof(G_RamMonitor), true) as G_RamMonitor;
            m_audioMonitor = GetComponentInChildren(typeof(G_AudioMonitor), true) as G_AudioMonitor;

            m_fpsManager   = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager;
            m_ramManager   = GetComponentInChildren(typeof(G_RamManager), true) as G_RamManager;
            m_audioManager = GetComponentInChildren(typeof(G_AudioManager), true) as G_AudioManager;
            m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_AdvancedData;

            m_fpsManager.SetPosition(m_graphModulePosition);
            m_ramManager.SetPosition(m_graphModulePosition);
            m_audioManager.SetPosition(m_graphModulePosition);
            m_advancedData.SetPosition(m_advancedModulePosition);

            m_fpsManager.SetState(m_fpsModuleState);
            m_ramManager.SetState(m_ramModuleState);
            m_audioManager.SetState(m_audioModuleState);
            m_advancedData.SetState(m_advancedModuleState);

            if (!m_enableOnStartup)
            {
                ToggleActive();
            }

            m_initialized = true;
        }
Beispiel #2
0
        private void Init()
        {
            if (m_keepAlive)
            {
                DontDestroyOnLoad(transform.root.gameObject);
            }

            m_fpsMonitor   = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor;
            m_ramMonitor   = GetComponentInChildren(typeof(G_RamMonitor), true) as G_RamMonitor;
            m_rpmMonitor   = GetComponentInChildren(typeof(G_RpmMonitor), true) as G_RpmMonitor;
            m_audioMonitor = GetComponentInChildren(typeof(G_AudioMonitor), true) as G_AudioMonitor;

            m_fpsManager   = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager;
            m_ramManager   = GetComponentInChildren(typeof(G_RamManager), true) as G_RamManager;
            m_rpmManager   = GetComponentInChildren(typeof(G_RpmManager), true) as G_RpmManager;
            m_audioManager = GetComponentInChildren(typeof(G_AudioManager), true) as G_AudioManager;
            m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_AdvancedData;

            //m_fpsManager.SetPosition(m_graphModulePosition);
            //m_ramManager.SetPosition(m_graphModulePosition);
            //m_rpmManager.SetPosition(m_graphModulePosition);
            //m_audioManager.SetPosition(m_graphModulePosition);
            //m_advancedData.SetPosition(m_advancedModulePosition);

            //m_fpsManager.SetState(m_fpsModuleState);
            //m_ramManager.SetState(m_ramModuleState);
            //m_audioManager.SetState(m_audioModuleState);
            //m_advancedData.SetState(m_advancedModuleState);

            if (!m_enableOnStartup)
            {
                ToggleActive();

                // We need to enable this on startup because we disable it in GraphyManagerEditor
                GetComponent <Canvas>().enabled = true;
            }

            m_initialized = true;
        }
Beispiel #3
0
        private void Init()
        {
            if (m_keepAlive)
            {
                DontDestroyOnLoad(transform.root.gameObject);
            }

            m_fpsMonitor = GetComponentInChildren(typeof(G_FpsMonitor), true) as G_FpsMonitor;
            m_rttMonitor = GetComponentInChildren(typeof(G_RttMonitor), true) as G_RttMonitor;

            m_fpsManager = GetComponentInChildren(typeof(G_FpsManager), true) as G_FpsManager;
            m_rttManager = GetComponentInChildren(typeof(G_RttManager), true) as G_RttManager;

            m_advancedData = GetComponentInChildren(typeof(G_AdvancedData), true) as G_AdvancedData;

            m_fpsManager.SetPosition(m_graphModulePosition);
            m_rttManager.SetPosition(m_graphModulePosition);

            m_advancedData.SetPosition(m_advancedModulePosition);

            m_fpsManager.SetState(m_fpsModuleState);
            m_rttManager.SetState(m_rttModuleState);

            m_advancedData.SetState(m_advancedModuleState);

            if (!m_enableOnStartup)
            {
                ToggleActive();

                // We need to enable this on startup because we disable it in GraphyManagerEditor
                GetComponent <Canvas>().enabled = true;
            }

            // Set the Preset as the chosen Preset.
            // If the ModulePreset has changed we call set preset here to init with the correct selected state.
            SetPreset(m_modulePresetState);

            m_initialized = true;
        }
Beispiel #4
0
 private void Start()
 {
     m_fpsMonitor   = GetComponentInChildren <G_FpsMonitor>();
     m_ramMonitor   = GetComponentInChildren <G_RamMonitor>();
     m_audioMonitor = GetComponentInChildren <G_AudioMonitor>();
 }