Add a way to clear/null all subscribers in AnimationPlayer events #7697
yosimba2000
started this conversation in
Scripting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Going to be using C#.
Sometimes many subscribers are subscribed to the same event, and it's not convenient to remember each subscriber in order to unsubscribe them later on. Can we have a method that allows us to remove all subscribers at once? AFAIK, one easy way to do this is to set the Event equal to null, like this
AnimationPlayer.AnimationFinished=null
, but it's only possible from within the class that declared the Event. So to achieve this, a public method could be added inside the responsible class that sets the Event to null, and the method could therefore be called outside the class.This can also be extended to all other events in Godot.
Beta Was this translation helpful? Give feedback.
All reactions