Node Material Editor With Parsed Json

Hey guys, was wondering if there was a way to load a node material using already parsed json object… I know about LoadAsync

nodeMaterial.loadAsync("file-url.json").then(() => {
    nodeMaterial.build(true);
});

But if i already have the parsed json object… how can i load that instead of the url to server json file ?

If you go into the source on git hub you can see how we are doing it. :slight_smile:
Let me see if I can find the file for you.

loadFromSerialization in the Babylon.js/nodeMaterial.ts at master · BabylonJS/Babylon.js · GitHub

1 Like

I found ir right after i made the post.

BTW i am using the static BABYLON.NodeMaterial.Parse function

1 Like