d4rkc0d3r / d4rkAvatarOptimizer

d4rkpl4y3r's VRChat Avatar 3.0 optimizer
MIT License
400 stars 17 forks source link

SDK bug with D4rkAvatarOptimizer #114

Closed QueenOfFrance closed 4 months ago

QueenOfFrance commented 4 months ago

I was doing things on my avatar, I deleted things correctly and then he told me that, so I deactivate the optimization and everything works again, I still find it weird that he does that and what's more, I redid the avatar project from a last backup before the modifications and there it still works surprised because I didn't do anything in it and repeat this sentence to myself

NullReferenceException: Object reference not set to an instance of an object d4rkAvatarOptimizer+<>c.b187_1 (UnityEngine.Component c) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2006) System.Linq.Enumerable+SelectArrayIterator2[TSource,TResult].MoveNext () (at <70471b9615aa4ecfa3ed1abb95b73832>:0) System.Collections.Generic.HashSet1[T].UnionWith (System.Collections.Generic.IEnumerable`1[T] other) (at <70471b9615aa4ecfa3ed1abb95b73832>:0) d4rkAvatarOptimizer+<>c__DisplayClass187_0.gIsPossibleBinding|0 (UnityEditor.EditorCurveBinding binding) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2006) d4rkAvatarOptimizer+<>c__DisplayClass187_0.b__4 (UnityEditor.EditorCurveBinding b) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2044) System.Linq.Enumerable.All[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) (at <70471b9615aa4ecfa3ed1abb95b73832>:0) d4rkAvatarOptimizer.FindUselessFXLayers () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2044) d4rkAvatarOptimizer.GetAllUsedFXLayerAnimationClips () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2063) d4rkAvatarOptimizer.GetAllUsedFXLayerCurveBindings () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2108) d4rkAvatarOptimizer.FindAllGameObjectTogglePaths () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2693) d4rkAvatarOptimizer.FindAllAlwaysDisabledGameObjects () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:2721) d4rkAvatarOptimizer.GetUsedComponentsInChildren[T] () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:3020) d4rkAvatarOptimizer.GetPolyCount () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:651) d4rkAvatarOptimizer.ApplyAutoSettings () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:409) d4rkpl4y3r.AvatarOptimizer.AvatarBuildHook.OnPreprocessAvatar (UnityEngine.GameObject avatarGameObject) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/AvatarBuildHook.cs:28) VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks.OnPreprocessAvatar (UnityEngine.GameObject avatarGameObject) (at <92c18e67c16546ab922762d70848838e>:0) UnityEngine.Debug:LogException(Exception) VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks:OnPreprocessAvatar(GameObject) VF.PlayModeTrigger:Rescan() (at ./Packages/com.vrcfury.vrcfury/Editor/VF/PlayModeTrigger.cs:88) VF.RescanOnStartComponent:Start() (at ./Packages/com.vrcfury.vrcfury/Editor/VF/PlayModeTrigger.cs:145)

d4rkc0d3r commented 4 months ago

Your avatar likely has some scripts on it that you don't have installed in your project. My guess would be dynamic bones but it could be other things as well.

QueenOfFrance commented 4 months ago

Hi ! I just saw that there was no VRCQuestTools package, I put it and everything works correctly again, sorry for the inconvenience