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; }
public void SetModuleMode(ModuleType moduleType, ModuleState moduleState) { switch (moduleType) { case ModuleType.FPS: m_fpsManager.SetState(moduleState); break; case ModuleType.RTT: m_rttManager.SetState(moduleState); break; case ModuleType.ADVANCED: m_advancedData.SetState(moduleState); break; } }
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; }
private void Init() { _player = ReInput.players.GetPlayer(m_rewiredPlayerName); 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(); // We need to enable this on startup because we disable it in GraphyManagerEditor GetComponent <Canvas>().enabled = true; } m_initialized = true; }