-
-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
Camera2D in a viewport while running as an editor plugin doesn't work #33931
Comments
I don't think your Camera2D script will actually run in the editor, unless you make it a tool, too. At least if I understand this article correctly: https://docs.godotengine.org/en/3.1/tutorials/misc/running_code_in_the_editor.html If you add the tool keyword, the camera actually moves within your viewport in the editor. However, in that case the Viewport doesn't scroll with it (probably because it is not the active camera in the editor viewport). I think this might be an issue with your implementation, rather than a bug. Wouldn't know how to fix this, though. |
The camera script isn't a tool script on purpose so it doesn't run in the editor scene. I have tried it before as a tool script and that didn't work also. I think it's something that has to do with using viewports in the editor. |
You might have to use a custom script which modifies the viewport's "canvas_transform", as Camera2D is specifically made to not run while |
If that's the case then shouldn't camera nodes be allowed to run in the editor if they are under a viewport? I feel like it's more tedious to remake the entire camera script just to move around in a viewport in the editor. |
The thing in the middle of the editor screen is already a viewport, so this would require some changes to how viewports work. |
Wait so the editor can only run a couple of viewports at a time? |
Even with that, you should be able to use a viewport with a camera in it as an editor plugin. |
Godot version:
Godot v3.1.2
OS/device including version:
Windows 10
Issue description:
Whenever running as an editor plugin, Camera2D nodes won't work in a separate viewport.
Steps to reproduce:
Minimal reproduction project:
https://github.com/Flairieve/GraphicsEditor/
The text was updated successfully, but these errors were encountered: