75 lines
1.9 KiB
C#
75 lines
1.9 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace RecRoom.Utils.Perf
|
|
{
|
|
// Token: 0x02002012 RID: 8210
|
|
[Token(Token = "0x2002012")]
|
|
[StructLayout(3)]
|
|
public class PerfTesterPostUpdate : MonoBehaviour
|
|
{
|
|
// Token: 0x0600E326 RID: 58150 RVA: 0x00361184 File Offset: 0x0035F384
|
|
[Token(Token = "0x600E326")]
|
|
[Address(RVA = "0x132FDF0", Offset = "0x132E7F0", VA = "0x18132FDF0")]
|
|
private void Update()
|
|
{
|
|
PerfTesterPreUpdate perfTesterPreUpdate = this.preUpdate;
|
|
if (perfTesterPreUpdate.Running)
|
|
{
|
|
perfTesterPreUpdate.FrameStopWatch.Stop();
|
|
int frameCount = Time.frameCount;
|
|
TimeSpan elapsed = this.preUpdate.FrameStopWatch.Elapsed;
|
|
object[] array = new object[4];
|
|
if (array != 0)
|
|
{
|
|
}
|
|
array[0] = array;
|
|
if (" Frames: " != 0)
|
|
{
|
|
}
|
|
array[1] = " Frames: ";
|
|
if (" Frames: " != 0)
|
|
{
|
|
}
|
|
array[2] = " Frames: ";
|
|
if ("ms" != 0)
|
|
{
|
|
}
|
|
array[3] = "ms";
|
|
global::UnityEngine.Debug.Log(string.Concat(array));
|
|
bool isHighResolution = Stopwatch.IsHighResolution;
|
|
string text;
|
|
global::UnityEngine.Debug.Log(text);
|
|
this.preUpdate.Running = false;
|
|
}
|
|
if (Input.GetKeyDownInt(KeyCode.Alpha0))
|
|
{
|
|
global::UnityEngine.Debug.Log("Queueing Capture");
|
|
this.preUpdate.StartQueued = true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600E327 RID: 58151 RVA: 0x00361270 File Offset: 0x0035F470
|
|
[Token(Token = "0x600E327")]
|
|
[Address(RVA = "0x1330180", Offset = "0x132EB80", VA = "0x181330180")]
|
|
public PerfTesterPostUpdate()
|
|
{
|
|
}
|
|
|
|
// Token: 0x04009503 RID: 38147
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4009503")]
|
|
[SerializeField]
|
|
private PerfTesterPreUpdate preUpdate;
|
|
|
|
// Token: 0x04009504 RID: 38148
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4009504")]
|
|
[SerializeField]
|
|
private int captureFrameCount = (int)((ulong)100L);
|
|
}
|
|
}
|