I would like advice on using the scene graph API to get at materials and set their properties. Here is a very simple example. I have a scene with one object called “box”. Box has a material called “my_material”. my_material has a diffuse value of blue.
Ensure playerApi matches whatever your client-side API is called.
enableApi(api-name) will enable APIs that are not directly publicized. This particular API has become fairly widely used.
This will return an ID of the material you are querying for. This ID may not match the ID you see when you run player.scene.getAll(). This is because we clone an asset each time it is used but should resolve to the material you expect.