How to update a veiwport from inside the Godot editor

Godot Version

3.5

Question

image

I have a sprite that uses a viewport as its texture. This is being used for some realtime screen feedback effects.
The viewport is only updated while viewing it in the Inspector window.

Perhaps there is a way to update the viewport through code in a tool script?
I’ve tried using a tool script inside of the sprite like this →

texture = $Viewport.get_texture()

that doesn’t seam to update the texture…

solved by Nancok on the discord server
“Set render_target_update_mode to RENDER_ALWAYS”
works perfect

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.