Merge remote-tracking branch 'origin/feat-addressables-2' into feat-addressables-2

This commit is contained in:
XtraCube committed 2025-03-29 17:40:17 -04:00
commit 662b867dc5
2 files changed
-12

No files matched your search

-2
View File
@@ -24,8 +24,6 @@ public static class ExampleEventHandlers
MiraEventManager.RegisterEventHandler<BeforeMurderEvent>(@event => MiraEventManager.RegisterEventHandler<BeforeMurderEvent>(@event =>
{ {
Logger<ExamplePlugin>.Info($"{@event.Source.Data.PlayerName} is about to kill {@event.Target.Data.PlayerName}"); Logger<ExamplePlugin>.Info($"{@event.Source.Data.PlayerName} is about to kill {@event.Target.Data.PlayerName}");
var asset = new LoadableAddressableAsset<GameObject>("Assets/Prefabs/SomeText.prefab");
Logger<ExamplePlugin>.Info($"{asset.LoadAsset().GetComponent<TextMeshPro>().text}");
}); });
MiraEventManager.RegisterEventHandler<AfterMurderEvent>(@event => MiraEventManager.RegisterEventHandler<AfterMurderEvent>(@event =>
-10
View File
@@ -3,13 +3,9 @@ using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP;
using HarmonyLib; using HarmonyLib;
using MiraAPI.PluginLoading; using MiraAPI.PluginLoading;
using MiraAPI.Utilities.Assets;
using Reactor; using Reactor;
using Reactor.Networking; using Reactor.Networking;
using Reactor.Networking.Attributes; using Reactor.Networking.Attributes;
using System.IO;
using System.Reflection;
using UnityEngine;
namespace MiraAPI.Example; namespace MiraAPI.Example;
@@ -27,11 +23,5 @@ public partial class ExamplePlugin : BasePlugin, IMiraPlugin
{ {
ExampleEventHandlers.Initialize(); ExampleEventHandlers.Initialize();
Harmony.PatchAll(); Harmony.PatchAll();
var path = Path.GetDirectoryName(Assembly.GetAssembly(typeof(ExamplePlugin))!.Location) + "\\touhats.catalog";
AddressablesLoader.RegisterCatalog(path);
AddressablesLoader.RegisterHats("touhats");
AddressablesLoader.RegisterCatalog("https://raw.githubusercontent.com/MyDragonBreath/MyDragonBreath/refs/heads/main/DONTUSEGITHUBASACDN/catalog.json");
} }
} }