diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 5a7fd537e0d..4ad78429e9d 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -36,5 +36,10 @@ Emitted when the [member frame] changes. + + + Emitted when the [member texture] changes. + + diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 90af70e7c2c..197a5c0f272 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -625,6 +625,7 @@ void Sprite3D::set_texture(const Ref &p_texture) { texture->connect(CoreStringNames::get_singleton()->changed, Callable(this, "_queue_update")); } _queue_update(); + emit_signal(SceneStringNames::get_singleton()->texture_changed); } Ref Sprite3D::get_texture() const { @@ -780,6 +781,7 @@ void Sprite3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect"); ADD_SIGNAL(MethodInfo("frame_changed")); + ADD_SIGNAL(MethodInfo("texture_changed")); } Sprite3D::Sprite3D() {