allow components off root, but only allow one or error

This commit is contained in:
Lillith Rose 2026-01-07 16:52:44 -05:00
parent a49d2d74e6
commit 1f779f9297
18 changed files with 133 additions and 12 deletions

View file

@ -5,7 +5,8 @@
"GUID:8a060350c9ddd424197c8fd1e0d63f72",
"GUID:62ced99b048af7f4d8dfe4bed8373d76",
"GUID:5718fb738711cd34ea54e9553040911d",
"GUID:901e56b065a857d4483a77f8cae73588"
"GUID:901e56b065a857d4483a77f8cae73588",
"GUID:209cbd2a789c4f72963fdbf1f8a01909"
],
"includePlatforms": [
"Editor"

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using gay.lilyy.Common;
using gay.lilyy.MenuStyling;
using nadena.dev.ndmf;
using nadena.dev.ndmf.vrchat;
@ -19,7 +20,7 @@ namespace gay.lilyy.MenuStyling
{
InPhase(BuildPhase.Optimizing).AfterPlugin("gay.lilyy.MenuIconRemover").Run("SetMenuStyling", ctx =>
{
var obj = ctx.AvatarRootObject.GetComponent<MenuStylingConfig>();
var obj = ComponentHelper.GetComponentInChildrenWithError<MenuStylingConfig>(ctx.AvatarRootObject);
if (obj != null)
{
var descriptor = ctx.VRChatAvatarDescriptor();