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
|
|
@ -1,3 +1,4 @@
|
|||
using gay.lilyy.Common;
|
||||
using gay.lilyy.MeshCompression;
|
||||
using nadena.dev.ndmf;
|
||||
using UnityEditor;
|
||||
|
|
@ -29,7 +30,7 @@ namespace gay.lilyy.MeshCompression
|
|||
InPhase(BuildPhase.Optimizing)
|
||||
.Run("Set Mesh Compression", ctx =>
|
||||
{
|
||||
var defaultConfig = ctx.AvatarRootObject.GetComponent<MeshCompressionConfig>();
|
||||
var defaultConfig = ComponentHelper.GetComponentInChildrenWithError<MeshCompressionConfig>(ctx.AvatarRootObject);
|
||||
var renderers = ctx.AvatarRootObject.GetComponentsInChildren<Renderer>(true);
|
||||
|
||||
foreach (var renderer in renderers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue