diff options
| author | yum <yum.food.vr@gmail.com> | 2025-02-26 16:40:58 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-02-26 16:40:58 -0800 |
| commit | 2e9ac4cbd746c5316fbda2dc98c1b3d602445010 (patch) | |
| tree | 52812df60911849582b2dcf96cc790098c906d0f | |
| parent | e32beb1ac8e8be500cd89dbbbfbe7d5a6a6b393d (diff) | |
Add "disableMenuEntry" flag
| -rw-r--r-- | Scripts/YOTSCore.cs | 14 |
1 files changed, 12 insertions, 2 deletions
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('/');
|
