-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add in-editor playback/live preview for running scenes #1864
Comments
Isn't the editor camera replication sufficient for this? godotengine/godot#27742 It's available in 3.2 and later. |
@Calinou that its a helpful feature but for example im working in on a 3d shooter. It would be helpfull if I can play and in the meantime look at the editor to see everything from another perspective to see for example how the enemies are behaving. Do you think im missing something to do that with the current features of godot 3.2.x? |
Well, you could add a second camera/viewport to your game that would be monitoring enemies (something like split-screen). I think what is missing is being able to override specific camera. It only works for the main camera, so you'd need some special setup. |
@KoBeWi yeah the idea would be to have this as default. Doing a split screen only for debugging sound like a lot of work in order to have it move also |
The lack of this functionality is quite disappointing. I can't inspect the objects that are created/instantiated/modified at runtime. Issue number 1. I've been playing around with Godot for only 2 days now, so I might miss some options available, but still, these are the problems that I have encountered and that wouldn't happen if the scene editor window was able to represent the runtime changes. |
For issue number 1: When running the project in editor, you can click the "Remote" button on the Scene panel to switch the display to runtime scene tree. You can check the runtime hierarchy there. For issue number 2: Clicking nodes in the runtime/remote scene tree will set the inspector to that node. It shows the current state of node in the running game. You can inspect the properties there. |
@timothyqiu: Not all properties can be inspected in the remote tree/running game - I often discover that Materials or Meshes aren't. IIRC there's an issue open for that already. |
@Zireael07 Yeah, it's a bug if not shown. I fixed some cases that dynamically created resources not shown for 3.x in godotengine/godot#44657, but I'm not sure if it covers all the causes why the property is not shown 🤣 |
This makes me think the live scene editing feature (which is enabled by default) should probably sync the first 3D viewport's debug draw mode with the running project. (I wouldn't tie it to the editor camera replication feature, as you may be willing to use the current project camera but with a debug draw mode enabled.) |
I would like to add another point why this should be integrated: Opening a new window when in fullscreen on macOS will leave the editor and go back to the desktop. This has two downsides:
Therefore I would highly appreciate if it is possible to run the game / scene within the editor, as Unity does. Video showing the problem: https://youtu.be/kZI56d0ddHo |
A simple feature that would help as a first step towards this is improving the Project Camera Override mode to optionally allow to select remote objects by clicking them in game window. As a native editor feature, here's some alternative ways this toggle could be implemented:
Of course, 2 or 3 would require an appropriate tooltip in "Project Camera Override" button to help discover the feature. A "live preview" mode like Unity's is still ideal, but this simple feature would help a lot as a stopgap, because at least selecting one among multiple similar-named objects for inspection would be much easier. |
Project camera override AFAICT has nothing to do with this proposal... |
Would be good to have the option to change something in the remote tree by editor window also then only in the inspector. To move and see it visually is much easier than just in numbers. It shouldn't also remember the changes, the remote tree should work like this now. |
As @sosasees wrote in the other thread. Important to have the game window setting toggable in the settings if users want it in a tab or stand alone 🙂 |
@Zireael07 My idea is a different method for achieving the same intent: better editor integration with running game by letting you select things in game window. I suggested it because it's (presumably) simpler to implement considering Godot's way of doing things. Project camera override is currently the closest thing we have to this feature request, since it allows the editor to navigate the running scene freely (although it uses the game window). The only problem is that it doesn't allow selecting when enabled. If it did, you'd have a way to pick runtime-instantiated nodes by clicking, which isn't possible now, since remote nodes don't appear visually in the editor. This would be equivalent of Unity's Scene View when play mode is enabled (you can click to select runtime-instantiated objects). Sure, it's not ideal, but I suggested because it seems easier to implement and it would help a lot to at least have SOME way to do this. It's not quite what this proposal is asking, but it would be a step in that direction.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@HgGamer Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Any news on implementing this feature ? Is there any blocker in the Core that make this feature not possible at the moment ? |
Implementing this with "in-process" running is probably not going to happen, as it's very difficult to do right and has many implications. For example, the game process crashing would also crash the editor, leading to possible data loss. I think the only way to implement this while following the Godot philosophy is to perform fake run embedding. In other words, spawn a borderless window that matches the 3D viewport's size and is automatically hidden when the editor window isn't focused anymore. This way, the game process remains entirely separate from the editor like it is currently. This is non-trivial to do correctly, as you need to move/resize the window when the editor dock is resized (and when the editor window is moved/resized). The alternative way to do this without sharing process space is to implement an IPC mechanism and send the running project's image to the editor. While you don't need to perform window manipulation anymore, there's a lot of complexity involved:
|
Thanks for the detailed answer ! Anyway, I don't really know the internals of godot core, but at the moment there's already the ability to see nodes tree remotely. Wouldn't it be faisible to use that remote node tree that is synced, to build a new "remote scene" inside the editor ? |
Here and in other engines I keep hearing the suggestion about running the game on a separate process and then displaying its image in the editor somehow. But I don't see any explanation on how the editor tools (Inspector, Scene Tree, Animation Dock, and a long etc) would interact with the game. Making them work with the game via IPC sounds like a huge increase in complexity. Even then I'm not sure if the result would be desirable; for example, our current remote scene tree and remote inspector have very noticeably low refresh rates. Would an implementation via IPC be able to achieve high refresh rates? From my perspective, the two solutions I know are:
|
In my opinion, if it's done via IPC like the current remote node tree it wouldn't be that bad if the refresh rate is slow. The purpose of this feature for the majority of users (if I'm not wrong) is to make debugging easier. For a first implementation, I think it would still be beneficial to the user even if the refresh rate is not that good. I could be wrong though as this is a personal opinion, in that case maybe we could redefine a more indepth scope about what's expected with this feature |
godotengine/godot#29136 only refreshed at 15 Hz. I'm not sure how high it could have been bumped in theory, but I think going above 30 Hz on most hardware will prove challenging (especially at high resolutions). We could support rendering at half resolution to reduce the bandwidth requirement, still. |
If I'm not mistaken the initial proposal was to sync the remote scene in the editor.
When reading your answers it looks like you speak about rendering the "running game" inside the editor, which is not the same as syncing the scene in the editor. Remote node tree are already synced to the editor, the only missing pieces is rendering these remote nodes inside an editor scene to have a visual feedback of these remote nodes. Video example of unity : https://youtu.be/lXunqoE3GPo As we can see, on the left side we have the running game, and inside the editor we can see the "nodes" being modified in the scene. |
As the OP
As the OP I can confirm that this is the proposal original intention |
I think this is a winner in terms of achievieing the aforementioned function and avoiding too making too much changes to the core editor. |
Remote tree is only inspected in the editor. That "only thing missing" is pretty much the most complex part. It's practically the same as running the entire game/playing scene in the editor, which is not a trivial task. If you want to interact with your playing scene from the editor's rendered viewport, then it must be executed in the editor environment. And creating some kind of dumb copy of the remote scene tree that would be "display only" and void of any logic is probably a way harder task than that. This is why those other proposals have been merged with this one. If we were to implement any of it, it would probably be one solution. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Aiden-Potter Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
Closing in favor of #7213, which provides a more detailed technical implementation. |
@Calinou |
GitHub has two kinds of closed issues:
this issue is "closed for solved" but it should be "closed for not planned" |
@sosasees While GitHub claims that "close as not planned" encompasses scenarios involving duplicate issues, it sounds more like a rejection. Personally, I believe that using "close as not planned" will create more confusion :P |
I stopped using "close as not planned" recently because its UI on GitHub is really confusing, and GitHub is unlikely to change it in significant ways anytime soon. Instead, I use "close as resolved" and apply an It's too bad as the concept behind "close as not planned" is great (it was finally a standard way to indicate this), but the execution makes it unusable in public projects in practice. |
so "close as not planned" is unusable because it can be understood in 2 ways:
|
FYI: According to GitHub, these cases should all use "Close as not planned":
|
the fact that we needed this discussion is a testament to how confusing "close as not planned" is |
Describe the project you are working on:
3D FPS
Describe the problem or limitation you are having in your project:
Unable to inspect graphically how the game is working outside the gameplay view
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Add the ability to see how the nodes are behaving in the scene editor while the game is running. Juan said that once the vulkan integration were done it would be feasible to implement. godotengine/godot#13354
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Sync the scene editor view with the game play in order to see objects moving / interacting / being deleted / etc in the editor to let the dev inspect if everything is working fine
If this enhancement will not be used often, can it be worked around with a few lines of script?:
No script can do this
Is there a reason why this should be core and not an add-on in the asset library?:
The scene editor is core to the engine
The text was updated successfully, but these errors were encountered: