Automatically activate camera monitoring when using CameraTexture.

This commit is contained in:
Lukas Tenbrink 2025-04-03 15:19:41 +02:00
parent 1f56d96cf2
commit e9e455823e
2 changed files with 7 additions and 1 deletions

View file

@ -142,7 +142,12 @@ bool CameraTexture::get_camera_active() const {
}
}
CameraTexture::CameraTexture() {}
CameraTexture::CameraTexture() {
// Note: When any CameraTexture is created, we need to automatically activate monitoring
// of camera feeds. This may incur a small lag spike, so it may be preferable to
// enable it manually before creating the camera texture.
CameraServer::get_singleton()->set_monitoring_feeds(true);
}
CameraTexture::~CameraTexture() {
if (_texture.is_valid()) {