diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-07-19 08:19:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-19 08:19:08 +0200 |
commit | 4ebcbea1ce65ad66db106167d47635803e28e5bc (patch) | |
tree | c94f1aa800a59d2358dbbfa6f6138daa939bfe8b | |
parent | 911febb41f95481f3cb6290ba810c25885427b16 (diff) | |
parent | 9b9949de39530cca5cce7fa03a6c82df07eac767 (diff) |
Merge pull request #20259 from marcelofg55/anim_call_err
Print an error when calling an invalid method on an Animation
-rw-r--r-- | scene/animation/animation_player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index eac2c8d0c1..111620dac1 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -549,6 +549,12 @@ void AnimationPlayer::_animation_process_animation(AnimationData *p_anim, float int s = params.size(); ERR_CONTINUE(s > VARIANT_ARG_MAX); +#ifdef DEBUG_ENABLED + if (!nc->node->has_method(method)) { + ERR_PRINTS("Invalid method call '" + method + "'. '" + a->get_name() + "' at node '" + get_path() + "'."); + } +#endif + if (can_call) { MessageQueue::get_singleton()->push_call( nc->node, |