Hi, I'm trying to get current camera by using get_viewport().get_camera() function but it always return error:

Attempt to call function 'get_camera' in base 'null instance' on a null instance.

Do I miss something?

I figure it out! I reapply the script to a node that is under the viewport node and it finally gets the right camera!

a year later