mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Merge remote-tracking branch 'origin/feat-addressables-2' into feat-addressables-2
This commit is contained in:
commit
662b867dc5
2 files changed
-12
No files matched your search
@@ -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 =>
|
||||||
|
|||||||
@@ -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");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user