Is Loading Node Materials via Asset Manager Possible?


Is there a way to load Node Materials via the Asset Manager or can it only be handled via the ParseFromFileAsync (Node Material | Babylon.js Documentation) function?

I can use a TextFileAssetTask (Asset Manager | Babylon.js Documentation) to load in the json via an Asset Manager but I cannot see a way to “build it” once that has been completed? We currently handle all of our pre-loading using the Asset Manager so it would be nice if I could slot Node Materials into that process also :slight_smile:

I believe you may preload JSON file and then use NodeMaterial.Parse() when it will be ready.
Docs - NodeMaterial | Babylon.js Documentation
Example -


So simple! Thank you :slight_smile:

1 Like