Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of AssetHelperMenu v1.3.2
AssetHelperMenu.dll
Decompiled 2 months agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using Microsoft.CodeAnalysis; using Silksong.AssetHelper.Core; using Silksong.AssetHelper.Dev; using Silksong.ModMenu.Elements; using Silksong.ModMenu.Models; using Silksong.ModMenu.Plugin; using Silksong.ModMenu.Screens; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("AssetHelperMenu")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.2.0")] [assembly: AssemblyInformationalVersion("1.3.2+cdd9cae110fc2313b117652474be58605ce40dba")] [assembly: AssemblyProduct("AssetHelperMenu")] [assembly: AssemblyTitle("AssetHelperMenu")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/silksong-modding/Silksong.AssetHelper")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Microsoft.CodeAnalysis.Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Microsoft.CodeAnalysis.Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace AssetHelperMenu { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("org.silksong-modding.assethelpermenu", "AssetHelperMenu", "1.3.2")] public class AssetHelperMenuPlugin : BaseUnityPlugin, IModMenuCustomMenu, IModMenuInterface { public ConfigEntry<bool> PreferCompressed; public const string Id = "org.silksong-modding.assethelpermenu"; public static string Name => "AssetHelperMenu"; public static string Version => "1.3.2"; private void Awake() { PreferCompressed = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "PreferCompressed", true, "Whether to prefer compressed scene dumps by default"); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Plugin " + Name + " (org.silksong-modding.assethelpermenu) has loaded!")); } public LocalizedText ModMenuName() { return LocalizedText.op_Implicit("AssetHelper"); } public AbstractMenuScreen BuildCustomMenu() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown PaginatedMenuScreenBuilder val = new PaginatedMenuScreenBuilder(ModMenuName(), 8); ConfigEntryFactory val2 = new ConfigEntryFactory(); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Open debug folder", delegate { Process.Start(DebugTools.DebugDataDir); }); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Open cache folder", delegate { Process.Start(AssetPaths.CacheDirectory); }); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Dump asset names", (Action)DebugTools.DumpAllAssetNames); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Dump asset request", delegate { DebugTools.SerializeAssetRequest("asset_request.json"); }); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Dump addressable assets", (Action)DebugTools.DumpAllAddressableAssets); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddButton(val, "Dump loaded bundle names", (Action)DebugTools.DumpLoadedBundleNames); PaginatedMenuScreenBuilder val3 = new PaginatedMenuScreenBuilder(LocalizedText.op_Implicit("Scene hierarchy tools"), 8); MenuElement val4 = default(MenuElement); if (val2.GenerateMenuElement((ConfigEntryBase)(object)PreferCompressed, ref val4)) { val3.Add(val4); } val3.AddButton("Dump current scene hierarchy", delegate { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); DumpGameObjectPaths(((Scene)(ref activeScene)).name); }); val3.AddButton("Dump loaded scene hierarchies", delegate { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < SceneManager.sceneCount; i++) { Scene sceneAt = SceneManager.GetSceneAt(i); DumpGameObjectPaths(((Scene)(ref sceneAt)).name); } }); TextInput<string> sceneEntryField = new TextInput<string>(LocalizedText.op_Implicit("Scene"), (ITextModel<string>)(object)TextModels.ForStrings(), LocalizedText.op_Implicit("Choose a scene to dump")); val3.Add((MenuElement)(object)sceneEntryField); val3.AddButton("Dump selected scene", delegate { DumpGameObjectPaths(((SelectableValueElement<string>)(object)sceneEntryField).Model.Value); }); PaginatedMenuScreen subpage = val3.Build(); <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions.AddSubpageButton(val, (AbstractMenuScreen)(object)subpage); return (AbstractMenuScreen)(object)val.Build(); } private void DumpGameObjectPaths(string sceneName) { try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("Dumping scene hierarchy for scene " + sceneName)); DebugTools.DumpGameObjectPaths(sceneName, PreferCompressed.Value); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Error dumping paths for scene " + sceneName + "\n" + ex)); } } } internal static class <AssetHelperMenuPlugin>F79F8426CE8491B0C3CE5DE195955AE1237DCD1ED9C96F2906064935F55BDB485__ModMenuExtensions { public static TextButton AddButton(this PaginatedMenuScreenBuilder self, string label, Action onClick) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown TextButton val = new TextButton(LocalizedText.op_Implicit(label)); val.OnSubmit = (Action)Delegate.Combine(val.OnSubmit, onClick); self.Add((MenuElement)(object)val); return val; } public static TextButton AddSubpageButton(this PaginatedMenuScreenBuilder self, AbstractMenuScreen subpage, string? label = null) { AbstractMenuScreen subpage2 = subpage; if (label == null) { label = subpage2.TitleText.text; } return self.AddButton(label, delegate { MenuScreenNavigation.Show(subpage2, (HistoryMode)0); }); } } }