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.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("MiniMapMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MiniMapMod")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3942cb41-060f-4053-a287-22b0c94544b5")]
[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 MiniMapMod;
[BepInPlugin("com.example.minimap", "Real Mini Map", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private RenderTexture mapTexture;
private GameObject mapCameraObj;
private Camera mapCamera;
private float mapSize = 200f;
public float currentZoom = 20f;
private void Start()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
mapTexture = new RenderTexture(512, 512, 16);
}
private void Update()
{
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Expected O, but got Unknown
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKey((KeyCode)61))
{
currentZoom += 0.2f;
}
if (Input.GetKey((KeyCode)45))
{
currentZoom -= 0.2f;
}
currentZoom = Mathf.Clamp(currentZoom, 1f, 100f);
if (!((Object)(object)Camera.main == (Object)null))
{
if ((Object)(object)mapCameraObj == (Object)null)
{
mapCameraObj = new GameObject("MinimapCamera");
mapCamera = mapCameraObj.AddComponent<Camera>();
mapCamera.targetTexture = mapTexture;
mapCamera.orthographic = true;
mapCamera.clearFlags = (CameraClearFlags)2;
mapCamera.backgroundColor = Color.black;
}
mapCamera.orthographicSize = currentZoom;
Vector3 position = ((Component)Camera.main).transform.position;
mapCameraObj.transform.position = new Vector3(position.x, position.y + 100f, position.z);
mapCameraObj.transform.rotation = Quaternion.Euler(90f, 0f, 0f);
}
}
private void OnGUI()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
Rect val = default(Rect);
((Rect)(ref val))..ctor((float)Screen.width - mapSize - 20f, 20f, mapSize, mapSize);
GUI.Box(val, "MINIMAP");
if ((Object)(object)mapTexture != (Object)null)
{
GUI.DrawTexture(val, (Texture)(object)mapTexture);
}
GUI.color = Color.red;
GUI.DrawTexture(new Rect(((Rect)(ref val)).x + mapSize / 2f - 5f, ((Rect)(ref val)).y + mapSize / 2f - 5f, 10f, 10f), (Texture)(object)Texture2D.whiteTexture);
}
}