0 votes

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:
getnode: Node not found: Video.
setup
localtoscene: 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 :)

Godot version 3.2.3
in Engine by (22 points)

1 Answer

+1 vote
Best answer

You need to make sure the textureon which the viewport is displayed is added after the viewportin the scene tree. If you're 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
by (617 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.