From 2e9ac4cbd746c5316fbda2dc98c1b3d602445010 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 26 Feb 2025 16:40:58 -0800 Subject: Add "disableMenuEntry" flag --- Scripts/YOTSCore.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Scripts') diff --git a/Scripts/YOTSCore.cs b/Scripts/YOTSCore.cs index 10588e8..fb6b365 100644 --- a/Scripts/YOTSCore.cs +++ b/Scripts/YOTSCore.cs @@ -64,6 +64,12 @@ namespace YOTS // Whether the corresponding VRChat parameter is saved. [SerializeField] public bool saved = true; + + // If true, no menu entry will be created for this toggle. + // The parameter will still be created and can be controlled by other means + // - for example, via contacts. + [SerializeField] + public bool disableMenuEntry = false; } [System.Serializable] @@ -978,10 +984,14 @@ namespace YOTS } vrcParams.parameters = paramList.ToArray(); - // Add toggles to menu + // Add toggles to menu (skipping those with disableMenuEntry=true) foreach (var toggle in toggleSpecs) { + // Skip creating menu entries for toggles with disableMenuEntry=true + if (toggle.disableMenuEntry) + continue; + VRCExpressionsMenu currentMenu = vrcMenu; - + // Navigate or create menu path if specified if (!string.IsNullOrEmpty(toggle.menuPath)) { string trimmedPath = toggle.menuPath.Trim('/'); -- cgit v1.2.3