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; }
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; }
private void Start() { m_fpsMonitor = GetComponentInChildren <G_FpsMonitor>(); m_ramMonitor = GetComponentInChildren <G_RamMonitor>(); m_audioMonitor = GetComponentInChildren <G_AudioMonitor>(); }