xyz I need to access viewport texture from another scene. So I have a car with a sub viewport with a camera at the top. And I want to get that texture and set it to a texturerect in a different scene called "minimap". Here is my code:
car scene:
var texture = ViewportTexture.new()
texture.viewport_path = "SubViewport"
main.minimaptexture = texture
minimap scene:
$minimap.texture = main.minimaptexture
it doesn't work because viewport textures can be loaded only in scene where is the sub viewport I assume. The question is what should I do to make this work.