I am starting to work on some scene material optimization. To start I wanted to search through existing materials in scene when loading a new model, and if identical material name existed then instance the existing scene material and dispose of the freshly loaded one to save memory. However I can’t get materials to display their names with “.name”.
When importing meshes through assetManager, you can easily console out the entire material as exampled in the playground below with mesh.material(look in console)
However if you only want to output the name (or use it) it refuses to ever return the name when you mesh.material.name. This is the commented out line in the same playground.
Why does returning the name not work in this case?