Godot Version
4.3
Question
I’m working on a prototype for essentially moving a chess piece around a variable sized board - as a result the current setup has a single chess piece and then a procedurally generated board (by instantiating alternating tile packed scenes).
I’m at the point of trying to get an effect working when I hover over certain tiles or the piece. This does work for the tiles - when I hover over them a script on the collider finds the mesh object above, duplicates its material and adds a next pass with my highlighted material, and then sets this new material as the surface override.
Using the exact same script on the piece, this doesn’t work. I’ve confirmed it is the piece itself - I created a separate test script on the mesh that just tries to set its surface override material to a different material entirely and it still doesn’t work. If I do mesh.surface_set_material, that does work and change the material.
I’ve confirmed the material I’m trying to set the surface override to is loaded correctly, I’ve confirmed it’s the right material, I’ve confirmed that the mesh was made unique correctly and isn’t set up differently in any way to the tile meshes which setting surface override material works fine on.
Anyone have any idea what might be going on???