Decompiled source of Modded Logo v1.0.0

PopyModModdedLogo.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using On;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("PopyModModdedLogo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PopyModModdedLogo")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("16dc5ccc-221d-4863-9ea4-424fc97c21f3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace PopyModModdedLogo;

[BepInPlugin("PopyMod.ModdedLogo", "ModdedLogo", "1.0.0")]
public class PopyModModdedLogo : BaseUnityPlugin
{
	private const string modGUID = "PopyMod.ModdedLogo";

	private const string modName = "ModdedLogo";

	private const string modVersion = "1.0.0";

	internal static ManualLogSource Log;

	public static AssetBundle bundle;

	private void Awake()
	{
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Expected O, but got Unknown
		Log = Logger.CreateLogSource("PopyMod.ModdedLogo");
		((BaseUnityPlugin)this).Logger.LogWarning((object)"\r\n  ┌─────┐      PopyMod\r\n  │MODS!│    Modded Logo\r\n  └─────┘   1.0.0  loaded");
		bundle = AssetBundle.LoadFromFile(Assembly.GetExecutingAssembly().Location.Replace("PopyModModdedLogo.dll", "PopyModLogo"));
		MainMenuManager.Start += new hook_Start(ReplaceLogo);
		if ((Object)(object)bundle != (Object)null)
		{
			Log.LogWarning((object)"Successfully Loaded ModLogoAsset");
		}
		else
		{
			Log.LogError((object)"Didn't Load ModLogoAsset");
		}
	}

	private void ReplaceLogo(orig_Start orig, MainMenuManager self)
	{
		orig.Invoke(self);
		GameObject val = GameObject.Find("Canvas/Main_UIGroup/Title Image");
		Image component = val.GetComponent<Image>();
		component.sprite = bundle.LoadAsset<Sprite>("PopyModLogoSprite.png");
		Log.LogWarning((object)"Successfully replaced logo texture");
	}
}