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

Confused about creating ViewportTexture in code #7576

Closed
zixin96 opened this issue Jun 28, 2023 · 1 comment · Fixed by godotengine/godot#81864
Closed

Confused about creating ViewportTexture in code #7576

zixin96 opened this issue Jun 28, 2023 · 1 comment · Fixed by godotengine/godot#81864
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug

Comments

@zixin96
Copy link

zixin96 commented Jun 28, 2023

Link:
https://docs.godotengine.org/en/latest/classes/class_viewporttexture.html

In the page, we are saying to create a ViewportTexture in code, use the Viewport.get_texture() method on the target viewport.

Shouldn't this be "to get a ViewportTexture in code..."?

Ref<ViewportTexture> Viewport::get_texture() const {
	ERR_READ_THREAD_GUARD_V(Ref<ViewportTexture>());
	return default_texture;
}
@zixin96 zixin96 added the bug label Jun 28, 2023
@clayjohn
Copy link
Member

Ya, that makes sense. Its not really creating a Viewportexture.

@Piralein Piralein added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants