ContactShadows component not deserializing from GLB after upgrading to Needle Engine 4.12.4

Issue: ContactShadows component not deserializing from GLB after upgrading to Needle Engine 4.12.4

Environment: Unity 6000.2.2f1, Needle Engine 4.12.4, three@0.169.15

What works: Production build created BEFORE upgrading to 4.12.4 — ContactShadows renders correctly with soft falloff.

What breaks: Any new production build (npm run build:production) after upgrading to 4.12.4 — ContactShadows node exists in scene (Object3D, correct scale 3/0.5/3) but has NO ContactShadows component attached. Only 1 child (GroundCubeQuad mesh) instead of the expected shadow infrastructure (plane, occluder, blur plane, shadow camera).

GLB data confirmed identical: ContactShadows component data in NEEDLE_components/builtin_components is byte-for-byte identical between working and broken GLBs (darkness=0.9, opacity=0.487, blur=2, enabled=true, guid=1494896423).

What we tried:

  1. TypeStore.add(“ContactShadows”, ContactShadows) in register_types.ts — no effect
  2. Manual instantiation with new ContactShadows() + GameObject.addNewComponent() — creates shadow infrastructure but renders hard-edge blocks without falloff
  3. Mesh Compression: None (disabled Draco) — no effect
  4. Using exact same source code as working build — no effect

Runtime diagnostic output:
NODE: Contact_Shadows type: Object3D visible: true children: 1
scale: 3 0.5 3
child0: Object3D visible: true
(No component found via userData.needle.components)

Steps to reproduce:

  1. Have a scene with ContactShadows component (working in Unity play mode)
  2. Export to web project
  3. npm run build:production
  4. ContactShadows node loads but component is never instantiated

I’m sorry, I couldn’t find a response but notified the team :exploding_head:

Hi Arno,

could you share a link to the scene that doesn’t load contact shadows? I’ve worked with scenes using ContactShadows just last friday with latest Needle Engine that worked fine. A link would help in understanding what’s different in your scene.

just sent you a private message, as this is a client job. thanks

Hello @Arno_Kruger

could you try updating to the latest Needle Engine version 4.12.5? Let me know if that fixes the issue for you - the issue is/was caused by a recent change in three.js - we’ll update Needle Engine with a fix in 4.12.6 tomorrow. Sorry for the inconvenience

Btw just in case you didn’t know: You can also use the Needle Inspector chrome extension to help with debugging Needle Engine (or other three.js projects). https://chromewebstore.google.com/detail/needle-inspector-—-devtoo/jonplpbnhmanoekkgcepnedhghflblmo

Appreciate for looking into it! I will let you know when I have updated to 4.12.6.
Thanks for the tip :oncoming_fist: - wow wow a new world - needle inspector looks sick!!

Hello @Arno_Kruger could youn try 4.13.0? Thank you

1 Like

Hi @Marcel_Wiessler1 excuse the late reply, was pulled onto another job. Have updated, exported and contact shadows not rendering correctly is fixed in 4.16.2. Thank you!