summaryrefslogtreecommitdiff
path: root/scene/2d/sample_player_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/sample_player_2d.cpp')
-rw-r--r--scene/2d/sample_player_2d.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/sample_player_2d.cpp b/scene/2d/sample_player_2d.cpp
index bc1734ec06..a231acd13d 100644
--- a/scene/2d/sample_player_2d.cpp
+++ b/scene/2d/sample_player_2d.cpp
@@ -89,7 +89,7 @@ void SamplePlayer2D::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
SpatialSound2DServer::get_singleton()->source_set_polyphony(get_source_rid(),polyphony);
@@ -102,6 +102,7 @@ void SamplePlayer2D::_notification(int p_what) {
void SamplePlayer2D::set_sample_library(const Ref<SampleLibrary>& p_library) {
library=p_library;
+ _change_notify();
}
Ref<SampleLibrary> SamplePlayer2D::get_sample_library() const {