Added a unity editor script to toggle ragdoll via animation on your avatar

This commit is contained in:
kafeijao 2023-04-08 19:31:57 +01:00
parent 76f9244d9c
commit e426418806
No known key found for this signature in database
GPG key ID: E99978723E454B4C
6 changed files with 39 additions and 0 deletions

View file

@ -3,7 +3,9 @@ using ABI_RC.Core.InteractionSystem;
using ABI_RC.Core.Player;
using ABI_RC.Systems.IK.SubSystems;
using System;
using System.Collections.Generic;
using System.Reflection;
using ABI_RC.Core.Util.AssetFiltering;
namespace ml_prm
{
@ -46,6 +48,10 @@ namespace ml_prm
null
);
// Whitelist the toggle script
var l_localComponentWhitelist = typeof(SharedFilter).GetField("_localComponentWhitelist", BindingFlags.NonPublic | BindingFlags.Static)!.GetValue(null) as HashSet<Type>;
l_localComponentWhitelist!.Add(typeof(RagdollToggle));
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
}