using System.Reflection; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Logging; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace NoMass; [BepInPlugin("com.usuario.nomass", "No Mass Plugin", "1.0.0")] public class NoMassPlugin : BaseUnityPlugin { internal static ManualLogSource Log; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"NoMass event listener loaded."); SceneManager.sceneLoaded += OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { CleanSceneObjects(); } private void Update() { } public static void CleanSceneObjects() { MonoBehaviour[] array = Object.FindObjectsOfType(); MonoBehaviour[] array2 = array; foreach (MonoBehaviour val in array2) { if (!((Object)(object)val == (Object)null)) { string name = ((object)val).GetType().Name; if (name.Contains("DEN_") || name == "UT_AudioClipHandler") { Object.Destroy((Object)(object)val); } } } } }