allow components off root, but only allow one or error
This commit is contained in:
parent
a49d2d74e6
commit
1f779f9297
18 changed files with 133 additions and 12 deletions
|
|
@ -4,6 +4,7 @@ using AnimatorAsCode.V1;
|
|||
using System.Collections.Generic;
|
||||
using gay.lilyy.aaccore;
|
||||
using gay.lilyy.aacshared.runtimecomponents;
|
||||
using gay.lilyy.Common;
|
||||
|
||||
namespace gay.lilyy.aacshared.layers
|
||||
{
|
||||
|
|
@ -30,7 +31,7 @@ namespace gay.lilyy.aacshared.layers
|
|||
|
||||
public override bool IsApplicable(AACAssets assets)
|
||||
{
|
||||
var definition = assets.ctx.AvatarRootObject.GetComponent<LanternFlickerDefinition>();
|
||||
var definition = ComponentHelper.GetComponentInChildrenWithError<LanternFlickerDefinition>(assets.ctx.AvatarRootObject);
|
||||
if (definition == null) return false;
|
||||
if (!definition.enabled) return false;
|
||||
var lamp = GetLantern(assets);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue