Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:32 +09:30
commit 7345f42201
470 changed files with 51966 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
using UnityEngine;
using UnityEngine.Animations.Rigging;
[AddComponentMenu("KFAttachments/Binding Helpers/Rig Activation Binding")]
public class RigActivationBinding : MonoBehaviour
{
[SerializeField]
private RigLayer[] bindings;
[SerializeField]
private RigLayer[] inverseBindings;
[SerializeField]
private RigLayer[] enableOnDisable;
[SerializeField]
private RigLayer[] disableOnEnable;
private void OnEnable()
{
//Log.Out(gameObject.name + " OnEnable!");
if (bindings != null)
{
foreach (RigLayer t in bindings)
if (t != null)
t.active = true;
}
if (inverseBindings != null)
{
foreach (RigLayer t in inverseBindings)
{
if (t != null)
t.active = false;
}
}
if (disableOnEnable != null)
{
foreach (RigLayer t in disableOnEnable)
{
if (t != null)
t.active = false;
}
}
}
private void OnDisable()
{
//Log.Out(gameObject.name + " OnDisable!");
if (bindings != null)
{
foreach (RigLayer t in bindings)
if (t != null)
t.active = false;
}
if (inverseBindings != null)
{
foreach (RigLayer t in inverseBindings)
{
if (t != null)
t.active = true;
}
}
if (enableOnDisable != null)
{
foreach (RigLayer t in enableOnDisable)
{
if (t != null)
t.active = true;
}
}
}
}