protected override void Start() { base.Start(); isDebug = ApplicationSetting.Instance.GetBool("IsDebug"); if (isDebug && useIngameDebugConsole) { ingameDebugConsole = GameObject.Find("IngameDebugConsole"); if (ingameDebugConsole == null) { Debug.LogWarning( "DebugManager :: package not found. recommend using the [IngameDebugConsole]. please install with OpenUPM. and re-open unity.\n> openupm add com.yasirkula.ingamedebugconsole"); } } #if USE_STATSMONITOR // Display StatesMonitor statsMonitor = FindObjectOfType <StatsMonitor.StatsMonitor>(); if (statsMonitor != null) { statsMonitor.gameObject.SetActive(isDebug); } #endif // Display mouse cursor if (Application.platform == RuntimePlatform.WindowsEditor) { VisibleMouseCursor.showCursor = true; } else { VisibleMouseCursor.showCursor = ApplicationSetting.Instance.GetBool("UseMouse"); } }
protected override void Start() { base.Start(); // 設定値を取得 IsDebug = ApplicationSetting.Instance.GetBool("IsDebug"); // デバッグ用コンソール初期設定 UseDebugConsole = ApplicationSetting.Instance.GetBool("UseDebugConsole"); DebugConsole.IsOpen = UseDebugConsole; #if USE_STATSMONITOR // StatesMonitor statsMonitor = FindObjectOfType <StatsMonitor.StatsMonitor>(); if (statsMonitor != null) { statsMonitor.gameObject.SetActive(IsDebug); } #else this.gameObject.AddComponent <MemoryProfiler>(); MemoryProfiler.useHUD = IsDebug; this.gameObject.AddComponent <FrameRateUtil>(); FrameRateUtil.useHUD = IsDebug; #endif // マウスカーソル表示設定 if (Application.platform == RuntimePlatform.WindowsEditor) { VisibleMouseCursor.showCursor = true; } else { VisibleMouseCursor.showCursor = ApplicationSetting.Instance.GetBool("UseMouse"); } }
void UpdateSession(bool force = false) { // // commented Debug.Log("sending analytics;"); //+N.ToString()); if (!force && ((N[Keys.worldDistanceMoved] == null || N[Keys.mouseMovedDistance] == null || N[Keys.worldDistanceMoved].AsFloat == 0 || N[Keys.mouseMovedDistance].AsFloat == 0 ) && (N[Keys.levelBuilderButtonPress] == null || N[Keys.levelBuilderButtonPress].AsArray.Count == 0))) { // Worldpos and mousepos zero distance, and also no editor buttons pressed -- oh my we must be idle! // Idle is now handled in JS. If a report is not sent (repeatedly) the js will recognize idle, so Unity doesn't need to detect idle // This way is better for a variety of reasons but mainly beacuse Unity will "pause" if user is not focused so no reports will be sent nor will an idle alert be sent. } else { StatsMonitor.StatsMonitor stats = FindObjectOfType <StatsMonitor.StatsMonitor>(); int fps = -1; if (stats) { fps = stats.fps; } N[Keys.fps].AsInt = fps; #if UNITY_EDITOR // Debug.Log("sending:"+N.ToString()); #else WebGLComm.inst.SendAnalytics(N.ToString()); #endif } }