Error when combining setEnabled, FAST Snapshot Rendering, frozen materials, and animation

Combining these conditions will produce an error in the console.

repro: Babylon.js Playground

I was unable to identify a minimal reproducible code that clearly shows the exact conditions under which this error occurs.

Because of that, this pg contains a partial extraction of the implementation from my actual project as-is.

I have removed as much unrelated code as possible, but please note that it may still include some code that is not strictly necessary for reproducing the issue.

Thank you for maintaining this great framework!

Thanks for the report! We have a fix for this, but we need to wait for a larger PR to be merged first: Tree-shaking - the pure barrel by RaananW · Pull Request #18441 · BabylonJS/Babylon.js · GitHub. Once that lands, we should be able to move the fix forward.

Thank you for the quick fix!
I’m sorry I couldn’t provide clean pg on my end.
Looking forward to seeing the fix applied!

PR has been created: