mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-18 12:20:06 +08:00
d39e17a8f6
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)
27 lines
689 B
C#
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();
|
|
}
|
|
}
|
|
} |