This is the line of code that's giving me the error. You might have already seen the problem with it, but I can't find how to write the path to the shader ;-( I tried copying its path from the context menu, but it didn't work either
I’m assuming self is the node with the material? ‘shader_parameter’ is defined in the material. You can either set the tweener object or update the property string:
# the object is the material
tween_fade.tween_property(material, "shader_parameter/Tint", end_color, anim_duration)
# use 'material:' to access its properties
tween_fade.tween_property(self, "material:shader_parameter/Tint", end_color, anim_duration)
Finally, you could also tween the set_shader_parameter method:
I ran into a very similar issue in Godot 4.5 where tween_property would fail with that exact same error – even when the parameter path was correct.
I fixed it by setting an initial value for the target parameter (via material.set_shader_parameter ) before attempting the tween.
It seems that even if the parameter is given a default value when it’s declared as a uniform in the shader, it’s still null from within a scene in Godot until it’s manually overridden (though I’m not quite sure why and if that’s a bug or not).