In the editor, using instancing:
This is the most common solution. If you want to replace the sprite texture of all duplicate nodes to another one, then you need to make that node a separate scene, and instance it instead. This way, the instances will inherit all properties of the scene, and you'll be able to change the texture in the scene, and that change will replicate everywhere you instanced it. More about instances here: http://docs.godotengine.org/en/stable/tutorials/step_by_step/instancing.html
In the editor, using multiselect:
If you don't want to make your node a scene, you can probably select all sprites you want to change, and change their texture. I don't use this often so I don't know if it works or not.
In script, ingame:
You can't modify base scenes the same way as in the editor here, so if you need to change all textures at once, get all the sprites and change the texture with a loop. Putting these into a group might help.
Doing a hack with AtlasTexture:
This solution is kind of a hack because it was not designed for this I think, but I mention it anyways:
You can introduce an indirection to the texture you chose for your sprite. Instead of putting a Texture
directly, create an AtlasTexture
and save it as a .res
. Then assign the same one to your sprites. You end up with sprites referencing a shared AtlasTexture
, which in turn references a Texture
. So if you change the Texture
of the AtlasTexture
, it will change the Sprites automatically because they share the same resource.
I didn't try this myself too, but it could probably work.