Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instancing a scene where main node is a sprite with Texture set to ViewPortTexture does not render #34044

Open
rasikrodri opened this issue Dec 1, 2019 · 6 comments

Comments

@rasikrodri
Copy link

When you instantiate a scene where main node is a sprite with Texture set to ViewPortTexture does not render in-game. And also if you save that new scene that instantiates our scene, close Godot and reload the saved scene the instantiated scene sprite will not render the viewport even in edit mode.

@rasikrodri
Copy link
Author

I have attached the scene that has sprite and viewport you can test

3DTo2D.zip

@rasikrodri
Copy link
Author

This was easy to work around by making the main node of the scene a Node2D and having the sprite that has the ViewportTexture as a child.

@KoBeWi
Copy link
Member

KoBeWi commented Jan 6, 2020

This is weird. It's like the ViewportTexture loses it's reference to Viewport. This can be fixed by enabling Editable Children and setting the texture for the instance. What's even weirder, if you disable Editable Children afterwards it will still work, because the path to Viewport is stored in ViewportTexture inside tscn (even though it's "Local to Scene", whatever is this option supposed to do).

@Zireael07
Copy link
Contributor

I saw the ViewportTexture lose the Viewport reference from time to time.

@djrain
Copy link

djrain commented Sep 29, 2020

Also having this issue in 3.2.2, although my main node is a Light2D.

@08143324
Copy link

I use a ViewportTexture in children scene, then instance the scene,encountered an error, viewport_path don't find.
This error caused the display to be incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants