I keep getting this error whenever I hit the play button on Unity 3D “Preprocess Callback Failed. The VRCSDK build was aborted because the VRCSDKPreprocessAvatarCallback ‘AvatarBuildHook’ reported a failure.” How can I fix this? I can’t test if my characters’ physbones work or not.
What does unity console say? Remember to show the errors and warnings. Kinda funny that I can hide all errors and confuse myself that way
NullReferenceException: Object reference not set to an instance of an object
d4rkAvatarOptimizer.GetPathToRoot (UnityEngine.Component component) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:653)
d4rkAvatarOptimizer.g__OneOfParentsHasGameObjectToggleThatTheOthersArentChildrenOf|150_0 (UnityEngine.Transform t, System.String otherPaths) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:769)
d4rkAvatarOptimizer.CanCombineRendererWith (System.Collections.Generic.List`1[T] list, UnityEngine.Renderer candidate) (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:775)
d4rkAvatarOptimizer.FindPossibleSkinnedMeshMerges () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizer.cs:1191)
d4rkAvatarOptimizerEditor.get_MergedMaterialPreview () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizerEditor.cs:928)
d4rkAvatarOptimizerEditor.OnInspectorGUI () (at ./Packages/d4rkpl4y3r.d4rkavataroptimizer/Editor/d4rkAvatarOptimizerEditor.cs:205)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at <80a8ce1980c648dca8e68f0d8aa3b930>:0)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()
Guess I need to optimize it again
The last one is here
The VRCSDK build was aborted because the VRCSDKPreprocessAvatarCallback ‘AvatarBuildHook’ reported a failure.
UnityEngine.Logger:Log (UnityEngine.LogType,object)
(wrapper dynamic-method) UnityEngine.Debug:UnityEngine.Debug.LogError_Patch1 (object)
VRC.SDKBase.Editor.BuildPipeline.VRCBuildPipelineCallbacks:OnPreprocessAvatar (UnityEngine.GameObject)
VF.PlayModeTrigger:Rescan () (at ./Packages/com.vrcfury.vrcfury/Editor/VF/PlayModeTrigger.cs:81)
VF.PlayModeTrigger/RescanOnStartComponent:Start () (at ./Packages/com.vrcfury.vrcfury/Editor/VF/PlayModeTrigger.cs:143)
Is that the only actual error? Or is the null reference one a warning? Seems like the dark optimizer runs at avatar build time, and it’s unhappy with something. Maybe check the root of the avatar for an animator component? I know the VRChat SDK itself has issues complaining about a missing animator.
Maybe the dark optimizer has a warning message saying something?
Good SDK feature here. If it didn’t abort, you’d risk your avatar being replaced with unusable garbage data. Also good indicator of where to stop reading messages