MA Mesh Settingsをアバタールートおよび衣装にセットした場合
→ NullReferenceException が発生
設定したMesh Settings
以下スタックトレース
System.NullReferenceException: Object reference not set to an instance of an object
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.CreateSubMeshesMergePreserveOrder (Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[] meshInfos) [0x00188] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:471
at (wrapper delegate-invoke) System.Func`2[Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[],System.ValueTuple`2[System.Int32[][],System.Collections.Generic.List`1[System.ValueTuple`2[UnityEngine.MeshTopology,UnityEngine.Material]]]].invoke_TResult_T(Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[])
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.MergeStaticSkinnedMesh (nadena.dev.ndmf.BuildContext context, System.Func`1[TResult] gameObjectFactory, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh+CategorizationKey key, System.Collections.Generic.List`1[T] meshInfos, System.Func`2[T,TResult] createSubMeshes) [0x00033] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:151
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.Execute (nadena.dev.ndmf.BuildContext context, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizeState state) [0x002e7] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:121
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizePass`1[T].Execute (nadena.dev.ndmf.BuildContext context) [0x00010] in .\Packages\com.anatawa12.avatar-optimizer\Internal\TraceAndOptimizeBase\TraceAndOptimizeProcessor.cs:95
at nadena.dev.ndmf.Pass`1[T].nadena.dev.ndmf.IPass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Fluent\Pass.cs:64
at nadena.dev.ndmf.ConcretePass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Solver\PluginResolver.cs:36
at nadena.dev.ndmf.BuildContext.RunPass (nadena.dev.ndmf.ConcretePass pass) [0x00124] in .\Packages\nadena.dev.ndmf\Editor\API\BuildContext.cs:350
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.CreateSubMeshesMergePreserveOrder (Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[] meshInfos) [0x00188] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:471
at (wrapper delegate-invoke) System.Func`2[Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[],System.ValueTuple`2[System.Int32[][],System.Collections.Generic.List`1[System.ValueTuple`2[UnityEngine.MeshTopology,UnityEngine.Material]]]].invoke_TResult_T(Anatawa12.AvatarOptimizer.Processors.SkinnedMeshes.MeshInfo2[])
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.MergeStaticSkinnedMesh (nadena.dev.ndmf.BuildContext context, System.Func`1[TResult] gameObjectFactory, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh+CategorizationKey key, System.Collections.Generic.List`1[T] meshInfos, System.Func`2[T,TResult] createSubMeshes) [0x00033] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:151
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.AutoMergeSkinnedMesh.Execute (nadena.dev.ndmf.BuildContext context, Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizeState state) [0x002e7] in .\Packages\com.anatawa12.avatar-optimizer\Editor\Processors\TraceAndOptimize\AutoMergeSkinnedMesh.cs:121
at Anatawa12.AvatarOptimizer.Processors.TraceAndOptimizes.TraceAndOptimizePass`1[T].Execute (nadena.dev.ndmf.BuildContext context) [0x00010] in .\Packages\com.anatawa12.avatar-optimizer\Internal\TraceAndOptimizeBase\TraceAndOptimizeProcessor.cs:95
at nadena.dev.ndmf.Pass`1[T].nadena.dev.ndmf.IPass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Fluent\Pass.cs:64
at nadena.dev.ndmf.ConcretePass.Execute (nadena.dev.ndmf.BuildContext context) [0x00000] in .\Packages\nadena.dev.ndmf\Editor\API\Solver\PluginResolver.cs:36
at nadena.dev.ndmf.BuildContext.RunPass (nadena.dev.ndmf.ConcretePass pass) [0x00124] in .\Packages\nadena.dev.ndmf\Editor\API\BuildContext.cs:350
1.7.0-beta.6 の T&O の AutoMergeSkinnedMesh で NullReferenceException が発生してマージされない衣装がありました。 どうやら MA Mesh Settings の有無で発生するかしないかが変わるようです。
アバタールートに以下の状態のT&Oを付与した状態で確認![image](https://github.com/anatawa12/AvatarOptimizer/assets/20788898/92ee1f06-e771-4fe1-801f-6cc493d53dda)
アバター:マヌカちゃん 対称衣装:https://vagrant.booth.pm/items/5111206
[発生しない場合]
[発生する場合]
設定したMesh Settings![image](https://github.com/anatawa12/AvatarOptimizer/assets/20788898/010e7177-0e03-4dbb-a5f8-2161852b7231)
以下スタックトレース
調査に必要であれば衣装をギフトするので遠慮なくおっしゃってください。