using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("FPS Counter")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("FPS Counter")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("4b63d335-2bc5-4a25-b911-2533177d2261")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace FPSCounter; [BepInPlugin("com.myname.fpscounter", "Simple FPS Counter", "1.0.0")] public class FPSPlugin : BaseUnityPlugin { private float _deltaTime = 0f; private void Update() { _deltaTime += (Time.unscaledDeltaTime - _deltaTime) * 0.1f; } private void OnGUI() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) float num = _deltaTime * 1000f; float num2 = ((_deltaTime > 1E-06f) ? (1f / _deltaTime) : 0f); string text = $"{num:0.0} ms ({num2:0.} fps)"; GUIStyle val = new GUIStyle(); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(10f, 10f, 250f, 50f); val.alignment = (TextAnchor)0; val.fontSize = 24; val.normal.textColor = new Color(0f, 1f, 0f, 1f); GUI.Label(val2, text, val); } }