/// <summary> /// 初始化性能分析器 /// </summary> private void InitProfilerHelper() { if (string.IsNullOrEmpty(m_ProfilerHelperTypeName)) { return; } Type profilerHelperType = Utility.Assembly.GetType(m_ProfilerHelperTypeName); if (profilerHelperType == null) { throw new GameFrameworkException(string.Format("Can not find log helper type '{0}'.", m_ProfilerHelperTypeName)); } Utility.Profiler.IProfilerHelper profilerHelper = (Utility.Profiler.IProfilerHelper)Activator.CreateInstance(profilerHelperType); if (profilerHelper == null) { throw new GameFrameworkException(string.Format("Can not create log helper type '{0}'.", m_ProfilerHelperTypeName)); } Utility.Profiler.SetProfilerHelper(profilerHelper); }
//初始化调试辅助器 private void InitProfilerHelper() { if (string.IsNullOrEmpty(m_ProfilerHelperTypeName)) { return; } Type profilerHelperType = Utility.Assembly.GetType(m_ProfilerHelperTypeName); if (profilerHelperType == null) { throw new GameFrameworkException(Utility.Text.Format("[BaseComponent.InitProfilerHelper] Can not find profiler helper type '{0}'.", m_ProfilerHelperTypeName)); } Utility.Profiler.IProfilerHelper profilerHelper = Activator.CreateInstance(profilerHelperType, Thread.CurrentThread) as Utility.Profiler.IProfilerHelper; //实例化Profiler辅助器 if (profilerHelper == null) { throw new GameFrameworkException(Utility.Text.Format("[BaseComponent.InitProfilerHelper] Can not create profiler helper instance '{0}'.", m_ProfilerHelperTypeName)); } Utility.Profiler.SetProfilerHelper(profilerHelper); //设置Profiler辅助器 }
private void InitProfilerHelper() { if (string.IsNullOrEmpty(m_ProfilerHelperTypeName)) { return; } Type profilerHelperType = Utility.Assembly.GetType(m_ProfilerHelperTypeName); if (profilerHelperType == null) { Log.Error("Can not find profiler helper type '{0}'.", m_ProfilerHelperTypeName); return; } Utility.Profiler.IProfilerHelper profilerHelper = (Utility.Profiler.IProfilerHelper)Activator.CreateInstance(profilerHelperType, Thread.CurrentThread); if (profilerHelper == null) { Log.Error("Can not create profiler helper instance '{0}'.", m_ProfilerHelperTypeName); return; } Utility.Profiler.SetProfilerHelper(profilerHelper); }