summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2018-07-18 22:26:01 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2018-07-18 22:26:01 -0300
commit9b9949de39530cca5cce7fa03a6c82df07eac767 (patch)
treef4f5ff94b9a4a09a1c175c060b71d3d1bdcdeefa /scene
parent43dc050947753d201607d26717ca6fc3fe412c34 (diff)
Print an error when calling an invalid method on an Animation
Diffstat (limited to 'scene')
-rw-r--r--scene/animation/animation_player.cpp6
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,