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

@ -2,6 +2,7 @@ using System.Linq;
using System.Diagnostics;
using AnimatorAsCode.V1;
using gay.lilyy.aaccore;
using gay.lilyy.Common;
using nadena.dev.ndmf;
using AnimatorAsCode.V1.ModularAvatar;
using UnityEditor;
@ -164,7 +165,7 @@ namespace gay.lilyy.aaccore
var overallStopwatch = Stopwatch.StartNew();
V5AACLogger.LogInfo("Starting Lillith V5 AAC generation...");
var root = ctx.AvatarRootObject.GetComponent<AACRoot>();
var root = ComponentHelper.GetComponentInChildrenWithError<AACRoot>(ctx.AvatarRootObject);
if (root == null)
{
V5AACLogger.LogInfo("No LillithV5AACRoot component found. Skipping.");