-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimizer failed #50
Comments
From a quick look at where it crashes I think it is caused by an animation that has no curves in it. Disabling |
Thanks for your reply! But this time it fails because of.... MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it. |
Hmm, this one looks like you have something in the exclusions list that gets destroyed. Maybe its tagged as editor only or got destroyed by another tool like MA. |
Is it possible to support editor only? |
yeah I will fix this for the next release. I just wanted to tell you that in the meanwhile you can circumvent the crash by removing whatever it is from the exclusion list. excluding something from optimization that will get deleted anyways doesn't really change anything. |
Thanks for you reply! This happens because I am using modular avatar where I do not one to delete parts of the prefab. So I mark them as editor only. However, the rest of the prefab still includes materials that could not be parsed. That is why this issue happens |
both issues should be fixed in 3.1.2 now |
SDK 3.3.0
Optimizer 3.1.1
I am trying to optimize a complicated avatar with a lot of modular avatars. I do not know which one is causing the issue, I have tried to disable PB optimization, but it still fails.
InvalidOperationException: Sequence contains no elements
System.Linq.Enumerable.Max[TSource] (System.Collections.Generic.IEnumerable
1[T] source, System.Func
2[T,TResult] selector) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)d4rkpl4y3r.AvatarOptimizer.AnimatorOptimizer.g__ConvertStateToMotion|19_1 (UnityEditor.Animations.AnimatorState s) (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AnimatorOptimizer.cs:226)
d4rkpl4y3r.AvatarOptimizer.AnimatorOptimizer.b__19_8 (UnityEditor.Animations.ChildAnimatorState x) (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AnimatorOptimizer.cs:267)
System.Linq.Enumerable+SelectArrayIterator
2[TSource,TResult].ToArray () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable
1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)d4rkpl4y3r.AvatarOptimizer.AnimatorOptimizer.MergeLayers () (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AnimatorOptimizer.cs:267)
d4rkpl4y3r.AvatarOptimizer.AnimatorOptimizer.Run () (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AnimatorOptimizer.cs:115)
d4rkpl4y3r.AvatarOptimizer.AnimatorOptimizer.Run (UnityEditor.Animations.AnimatorController source, System.String path, System.Collections.Generic.Dictionary
2[TKey,TValue] fxLayerMap, System.Collections.Generic.List
1[T] layersToMerge, System.Collections.Generic.List`1[T] layersToDestroy) (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AnimatorOptimizer.cs:63)d4rkAvatarOptimizer.FixAllAnimationPaths () (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:1094)
d4rkAvatarOptimizer.Optimize () (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:167)
d4rkAvatarOptimizerEditor.OnInspectorGUI () (at Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizerEditor.cs:134)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
The text was updated successfully, but these errors were encountered: