Having weird issue here. When i set material on a tileset component from linetrace hit component, the material gets decolourised. And even though it’s the same exact material instance that is on my tileset during its creation.
and after setting material:
Anyone knows what causes this? I don’t recall this happening when i tried this on the previous plugin version.
The Cesium materials have a bunch of parameters, and these are populated on load from properties of the tile’s glTF model. If you set the material after the tile is loaded, these parameters will have their default values.
However, I think if you save the actual material instance on the component (not the one on the Tileset!) and then restore it afterward, the parameters should come with it. Let me know if that’s not working.
For what it’s worth, I can’t think of any reason this would have been different in a prior version of Cesium for Unreal. But if you do confirm that is the case, let me know what version it works in and we can look at what changed to figure out why it’s happening.
That absolutely does work!