You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/StompyRobot/SRDebugger/Scripts/Services/IProfilerService.cs

43 lines
984 B
C#

3 months ago

namespace SRDebugger.Services
{
using System;
using Profiler;
using SRF.Service;
#if UNITY_2018_1_OR_NEWER
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
#endif
public static class ProfilerServiceSelector
{
[ServiceSelector(typeof(IProfilerService))]
public static Type GetProfilerServiceType()
{
#if UNITY_2018_1_OR_NEWER
if(GraphicsSettings.renderPipelineAsset != null)
{
return typeof(SRPProfilerService);
}
#endif
return typeof(ProfilerServiceImpl);
}
}
public struct ProfilerFrame
{
public double FrameTime;
public double OtherTime;
public double RenderTime;
public double UpdateTime;
}
public interface IProfilerService
{
float AverageFrameTime { get; }
float LastFrameTime { get; }
CircularBuffer<ProfilerFrame> FrameBuffer { get; }
}
}