modular-avatar/Packages/nadena.dev.modular-avatar/Runtime/Menu/ModularAvatarMenuInstaller.cs
bd_ d39e17a8f6 feat: add object-based menu system (#218)
This adds a GameObject/Component based menu editing system, heavily inspired by Hai's Expressions Menu Hierarchy editor (https://github.com/hai-vr/av3-expressions-menu-hierarchy-editor)
2023-03-04 14:15:27 +09:00

27 lines
689 B
C#

using UnityEngine;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
namespace nadena.dev.modular_avatar.core
{
[AddComponentMenu("Modular Avatar/MA Menu Installer")]
public class ModularAvatarMenuInstaller : AvatarTagComponent
{
public VRCExpressionsMenu menuToAppend;
public VRCExpressionsMenu installTargetMenu;
// ReSharper disable once Unity.RedundantEventFunction
void Start()
{
// Ensure that unity generates an enable checkbox
}
protected override void OnValidate()
{
base.OnValidate();
RuntimeUtil.InvalidateMenu();
}
}
}