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

Live-preview launched instances from the editor window #3269

Closed
rsubtil opened this issue Sep 9, 2021 · 2 comments
Closed

Live-preview launched instances from the editor window #3269

rsubtil opened this issue Sep 9, 2021 · 2 comments

Comments

@rsubtil
Copy link

rsubtil commented Sep 9, 2021

Describe the project you are working on

3D games and prototypes on Godot (proposal is useful for all types of games really)

Describe the problem or limitation you are having in your project

Sometimes it's hard to visualize what's happening in a launched game from the editor. Currently the only tools available for it are the "Remote" tab that displays the scene tree and lets me both view and edit all nodes properties. However, changes made are only visible from the launched instance; the editor provides no "visual feedback" as to what's happening inside the game.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This is very similar to a feature present on Unity:
image
The left panel shows the "Game" view, aka the content displayed on a game instance; the right panel is the "Scene" view, aka the editor view of the game scene. Both of these are in-sync to one another.

The useful aspect of this is, in the editor panel, the developer can have a "meta" perspective of the running game, as well as being able to move the editor camera to better watch objects from an angle not possible from the game instance, which gives a better insight to how the game is running.

Here's a video of that feature in action in Unity:

2021-09-09.11-54-25.mp4

Godot already has the "Remote" tab, allowing to inspect the live scene tree:
image
Furthermore, node properties are already updated accordingly:

Peek.2021-09-09.12-14.mp4

However, the main editor area isn't doing anything. To modify something on remote, one must select the node in the scene tree, and manually change values in the inspector (and then focus on the game window to see those changes). The main editor is only useful when changing something in a local scene that may be synced with the remote instance, but even then only if "Synchronize Scene/Script Changes" is enabled.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

My proposal is to implement this feature as to complement already existing systems, and improve the development workflow. It's also important for it to be user-friendly, and without disrupting current workflows; and for that I propose this behavior:

  • Clicking on the "Remote" tab will change the main editor view to a live preview of the game instance.

    • The editor's full abilities remain; moving the editor camera around, selecting objects, and modifying it's properties from inspector.
    • The editor can be in-sync just by reacting to property changes; no need to be running scripts on editor side.
  • While live-previewing, you can also switch back and forth between 2D/3D to inspect both states; in a 2D game this is not very useful, but in a 3D game, this can be used to inspect UI elements as well.
    image

  • To go back to editing a local scene, either click on the "Local" tab or open a scene, either from current tabs or from somewhere else:
    image

If this enhancement will not be used often, can it be worked around with a few lines of script?

It's likely not possible to implement such a feature without modifying engine code.

Is there a reason why this should be core and not an add-on in the asset library?

This improves core editor functionality.

@Zireael07
Copy link

99% certain this was already proposed but I can't find the other issue now.

@YuriSizov
Copy link
Contributor

Duplicate of #1864

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

3 participants