Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

307 lines
7.1 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
// Token: 0x0200062B RID: 1579
[Token(Token = "0x200062B")]
public class FrameBudgetMonitor : SingletonMonoBehaviour<FrameBudgetMonitor>
{
// Token: 0x06002E50 RID: 11856 RVA: 0x000BD4CC File Offset: 0x000BB6CC
[Token(Token = "0x6002E50")]
[Address(RVA = "0x1649600", Offset = "0x1648600", VA = "0x181649600")]
public FrameBudgetMonitor()
{
}
// Token: 0x040025BE RID: 9662
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40025BE")]
[SerializeField]
private FrameBudgetMonitor.Property[] cpuProperties = new FrameBudgetMonitor.Property[]
{
new FrameBudgetMonitor.Property
{
Name = "Rendering",
MeanLimit = 3f,
PeakLimit = 5f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "Scripts",
MeanLimit = 3f,
PeakLimit = 4f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "Physics",
MeanLimit = 0.6f,
PeakLimit = 0.8f,
Suffix = " ms"
}
};
// Token: 0x040025BF RID: 9663
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40025BF")]
[SerializeField]
private FrameBudgetMonitor.Property[] gpuProperties = new FrameBudgetMonitor.Property[]
{
new FrameBudgetMonitor.Property
{
Name = "Shadows/Depth",
MeanLimit = 3f,
PeakLimit = 4f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "Opaque",
MeanLimit = 3f,
PeakLimit = 4f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "Transparent",
MeanLimit = 0.5f,
PeakLimit = 1f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "PostProcess",
MeanLimit = 0.7f,
PeakLimit = 1.5f,
Suffix = " ms"
},
new FrameBudgetMonitor.Property
{
Name = "Batches",
MeanLimit = 1.5f,
PeakLimit = 2f,
Suffix = "K",
Multiplier = 1000f
},
new FrameBudgetMonitor.Property
{
Name = "Vertices",
MeanLimit = 8f,
PeakLimit = 10f,
Suffix = "M"
}
};
// Token: 0x040025C0 RID: 9664
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40025C0")]
[SerializeField]
private FrameBudgetMonitor.NetworkProperty[] outboundNetworkProperties = new FrameBudgetMonitor.NetworkProperty[]
{
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)0L),
Name = "Bandwidth",
MeanLimit = 200f,
PeakLimit = 1000f,
Suffix = " kbps"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)1L),
Name = "RPCs",
MeanLimit = 2f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)2L),
Name = "Room Prop Updates",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)3L),
Name = "Instantiates",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)4L),
Name = "Destroys",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)5L),
Name = "Owner Transfers",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
}
};
// Token: 0x040025C1 RID: 9665
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40025C1")]
[SerializeField]
private FrameBudgetMonitor.NetworkProperty[] inboundNetworkProperties = new FrameBudgetMonitor.NetworkProperty[]
{
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)0L),
Name = "Bandwidth",
MeanLimit = 800f,
PeakLimit = 2000f,
Suffix = " kbps"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)1L),
Name = "RPCs",
MeanLimit = 8f,
PeakLimit = 20f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)2L),
Name = "Room Prop Updates",
MeanLimit = 10f,
PeakLimit = 20f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)3L),
Name = "Instantiates",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)4L),
Name = "Destroys",
MeanLimit = 4f,
PeakLimit = 10f,
Suffix = " / sec"
},
new FrameBudgetMonitor.NetworkProperty
{
Type = (FrameBudgetMonitor.FELCKFMEMFC)((ulong)5L),
Name = "Owner Transfers",
MeanLimit = 10f,
PeakLimit = 20f,
Suffix = " / sec"
}
};
// Token: 0x0200062C RID: 1580
[Token(Token = "0x200062C")]
[Serializable]
private class Property
{
// Token: 0x06002E51 RID: 11857 RVA: 0x000BDAE8 File Offset: 0x000BBCE8
[Token(Token = "0x6002E51")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
public Property()
{
}
// Token: 0x040025C2 RID: 9666
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40025C2")]
public string Name;
// Token: 0x040025C3 RID: 9667
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40025C3")]
public float MeanLimit;
// Token: 0x040025C4 RID: 9668
[FieldOffset(Offset = "0x1C")]
[Token(Token = "0x40025C4")]
public float PeakLimit;
// Token: 0x040025C5 RID: 9669
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40025C5")]
public string Suffix;
// Token: 0x040025C6 RID: 9670
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40025C6")]
[Tooltip("Optional multiplier to scale the raw profiling data by to get it into the measurement range (ideally between 0-10)")]
public float Multiplier;
// Token: 0x040025C7 RID: 9671
[FieldOffset(Offset = "0x2C")]
[Token(Token = "0x40025C7")]
[NonSerialized]
public int Id;
// Token: 0x040025C8 RID: 9672
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40025C8")]
[NonSerialized]
public float Mean;
// Token: 0x040025C9 RID: 9673
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x40025C9")]
[NonSerialized]
public float Peak;
}
// Token: 0x0200062D RID: 1581
[Token(Token = "0x200062D")]
private enum FELCKFMEMFC
{
// Token: 0x040025CB RID: 9675
[Token(Token = "0x40025CB")]
Bandwidth,
// Token: 0x040025CC RID: 9676
[Token(Token = "0x40025CC")]
RPCs,
// Token: 0x040025CD RID: 9677
[Token(Token = "0x40025CD")]
RoomPropUpdates,
// Token: 0x040025CE RID: 9678
[Token(Token = "0x40025CE")]
ObjectInstantiate,
// Token: 0x040025CF RID: 9679
[Token(Token = "0x40025CF")]
ObjectDestroys,
// Token: 0x040025D0 RID: 9680
[Token(Token = "0x40025D0")]
OwnershipTransfers
}
// Token: 0x0200062E RID: 1582
[Token(Token = "0x200062E")]
[Serializable]
private class NetworkProperty : FrameBudgetMonitor.Property
{
// Token: 0x06002E52 RID: 11858 RVA: 0x000BDAFC File Offset: 0x000BBCFC
[Token(Token = "0x6002E52")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
public NetworkProperty()
{
}
// Token: 0x040025D1 RID: 9681
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40025D1")]
public FrameBudgetMonitor.FELCKFMEMFC Type;
}
}