0 votes

I have added an AnimationPlayer to a ColorRect node. I can make keys and tracks for any property with the little key button, but when I click the one for the Material -> Shader Param -> my_param, the editor doesn't respond at all. In the Output, I get an error:

core/object.cpp:1228 - Error calling method from signal 'property_keyed': 'EditorPropertyResource::_sub_inspector_property_keyed': Method expected 3 arguments, but called with 1..

I can change other shader parameters, just not mine, so I suspect I'm using the wrong approach. How should I be adding a custom shader param animation track?

in Engine by (22 points)

2 Answers

0 votes

What I was doing was correct, but I was using the wrong shader type. I was using a spatial shader rather than a canvas shader. I am not yet sure why a spatial shader would not work. Perhaps someone has a better answer. But for now, this is enough for me.

by (22 points)

Just saw, that Spatial is for 3D, maybe that was the problem. If you use a 2D scene then as you already figuerd out canvas_item was the right choice.

0 votes

I too have just encountered the same issue. I found that when all of the parameters of my shader were set to default values it wouldnt let me add it to the track.

I then went to verify that my shader was working by playing about with the values, after having done so it then worked when clicking on the little key icon to add to the animation player. The same may help fix your issue? Seems like some strange behaviour for sure.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.