Trying to use a highlight layer in any way gives me this error and crashes the scene when I try to add a highlight layer.
I tried using the basic Highlight Layer example from the babylonjs examples, within the context of my scene creation, and I get this error.
I copied the code directly from the example and pasted it in right after my scene creation.
It must be something within my scene setup? I dont think I am doing anything egregious.
looking at the code, defines is expected to be an object in isReadyForSubMesh, but it is a string.
Any ideas how would this happen?
Heres the stack trace:
babylon.js:1 Uncaught TypeError: Cannot create property ‘_needNormals’ on string ‘#define NUM_BONE_INFLUENCERS 0 #define HIGHLIGHT’
at t.isReadyForSubMesh (babylon.js:1:1678948)
at t.isReady (babylon.js:1:1096734)
at t.isReady (babylon.js:1:1895752)
at l.pointerMovePredicate.l.pointerMovePredicate (babylon.js:1:469149)
at mn._internalPick (babylon.js:1:1018598)
at mn.pick (babylon.js:1:1020158)
at e._onPointerMove (babylon.js:1:469371)
at c.eval [as callback] (babylon.js:1:472871)
at e.notifyObservers (babylon.js:1:63601)
at e._onInputChanged (babylon.js:1:457271)
Hm I think I figured out what the issue was- I think I fudged some async code and it actually disposes and starts a new scene before the previous was done rendering. I’ll do some more investigating.