I'm trying to get the viewport size using the standard boilerplate code:
var screen size
...
screen_size = get_viewport_rect().size
but am getting the error 'Parser Error: Function "get_viewport_rect()" not found in base self.'
I have tried it in multiple scripts and get the same error. The frustrating thing is I already have the exact same code in my camera script and it works fine. But now when I try it elsewhere, I get this message. I tried googling and haven't found anyone complaining about this exact error.