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,7 +4,8 @@
|
|||
"references": [
|
||||
"GUID:23e6cebda363f004aa6e529a95f8a6fc",
|
||||
"GUID:62ced99b048af7f4d8dfe4bed8373d76",
|
||||
"GUID:5718fb738711cd34ea54e9553040911d"
|
||||
"GUID:5718fb738711cd34ea54e9553040911d",
|
||||
"GUID:209cbd2a789c4f72963fdbf1f8a01909"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
|
|
|
|||
|
|
@ -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