Function included in serialized result after enableEdgesRendering

OS: Win10
Engine: WebGL2
Browser: any
Version: 8.52.1

Steps to reproduce:

  1. Open the playground: Babylon.js Playground
  2. Check console for errors

Expected:
No errors

Actual:
s.materials[0].options.extraInitializationsAsync is a function, can not be cloned

Suggested fix:
Set sphere.edgesRenderer.lineShader.doNotSerialize = true; by default

cc @alexchuber

Any news this week?

So sorry, this got buried!
It looks like you’ve already identified a simple fix. Want to open a PR? :slight_smile:

Here’s the fix: Mark edge renderer line shader as non-serializable by alexchuber · Pull Request #18015 · BabylonJS/Babylon.js · GitHub

3 Likes