Error when loading scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By fUNNY-fnaf

Hi there, so I’m trying to make a node that has a viewport as a texture so that I can display a video on a texture. I got it working, although now I keep getting these error messages. The game still works so they don’t seem to mean anything, but it would be nice to get rid of them.

I don’t know if it has anything to do with me having to make the video texture local, since it only started popping up once I turned that on.

Anyways… here’s the first two error messages which shows when I save the scene:
Node not found: Video.
ViewportTexture: Path to node is invalid.

The Video node is the viewport

And here is the error’s I get once I load the scene from code:
get_node: Node not found: Video.
setup_local_to_scene: ViewportTexture: Path to node is invalid.

Edit: Some of the text in the code is turned italic by the underscores… so just imagine that there’s an underscore before every italic word :slight_smile:

:bust_in_silhouette: Reply From: MrEliptik

You need to make sure the textureon which the viewport is displayed is added after the viewportin the scene tree. If your texture is added to the scene tree before the viewport, it will throw an error because it won’t find the viewport.

Simply organize your scene tree to have the viewportfirst, such as:

  • Root
  • Viewport
  • Texture