diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-12 16:10:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 16:10:59 +0100 |
commit | de264a819901d92501a69e19bb84632e70b1b5a6 (patch) | |
tree | 2b7dcf4bf67ba4238c222a56dbda4bb249bcf29f /scene | |
parent | 4d27b1fe4f5e56d53b9fcd13c08b7e2e497b2d8e (diff) | |
parent | 38d108aaa25fa56ac535f1cc655551a802d4e48c (diff) |
Merge pull request #22739 from DualMatrix/autoplay_warn
Added warning when setting autoplay of AnimationPlayer that's inside the tree.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/animation/animation_player.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 7f9953ab43..cfc3b2f4ce 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -1427,6 +1427,8 @@ StringName AnimationPlayer::find_animation(const Ref<Animation> &p_animation) co } void AnimationPlayer::set_autoplay(const String &p_name) { + if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint()) + WARN_PRINT("Setting autoplay after the node has been added to the scene has no effect."); autoplay = p_name; } |