Play scene in editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Charles Woodhill
:warning: Old Version Published before Godot 3 was released.

Hi,
is it possible to play a scene in the editor?
like in u…oh no i dont say the “u” word :),
i want it running, displayed in main editor window,
and one still should be able to select nodes, and change their parameters in property editor.

if not possible:
is it planned?

if not planned:
any tips how i should implement it?
must not be in detail, high lvl should do it, like below
i don want to make changes to godot itself, if possible

if no tips:
im playing with thoughts to make a plugin that em “overlays” or (i hope) use the editor main window, property editor, node view,… or (ab)use the camera preview
then make a some buttons to run/pause/stop the current scene,
optionally the current scene gets duplicated before,
so u dont fu… err change ur scene while playing, if u dont want it :slight_smile:
what do u think?

ofc i wanna do it in c++

EDIT: to make it abit mor clear what i want to achieve:

since i dont care about scripting ( i will only use it later, for modding and game logic )
i only coding game components atm.
so the main reasons i want it is:

  1. debuggin in c++ (vstudio), without remote or process attatching since the game is another process (i think).
    i want klick run in vstudio and gogogo :slight_smile:
  2. play around with params and nodes, materials, shaders, eventualities… while running
  3. i plan to make the whole or at least parts of the editor, be acessible from the game
    using that “run in editor method” would make my code more stabe vs “on the fly” changes, because i easyly could test it befor i even started the “big modding tool project”, that i fear, i also have to make on my own :slight_smile:

tnx, for answer,
but they made my fears come true, i have to make it myself :slight_smile:
so godot internal research/debuggin now for some days :slight_smile:

and still any suggestions how to do it are welcome,
currently all exists as idea with not much internal knowledge.

can/should i make a issue from it? maybe there may be more support from godot creators?
or does it only “steal” time :slight_smile:

DONE! wasnt that hard than i feared…since i dont want change godot it only works for my objects, but i only need it for them (debug)

Charles Woodhill | 2017-04-08 14:51

Hi!
Could you please describe your solution?
I want to do the same thing and will be grateful for any information on this topic :slight_smile:

Xenone | 2021-06-13 02:03

sorry too much time passed…i switched to other gameengine years ago, it is done in c# making it possible to create gamesystems c# this saves much time and is much more safe compared to c++

Charles Woodhill | 2021-06-19 05:55

:bust_in_silhouette: Reply From: Zylann

The design towards this has been thought differently.
Technically, the game already runs in the editor, but because the editor has control over it, your scripts and physics won’t run for example (unless they have the tool keyword).

Modifying the game while it runs is possible using “sync scene changes” (menu of the right-most icon next to play buttons). However the reverse is not fully supported (seeing the game in the editor as it is running) and would be really tricky to do, because Godot hasn’t been designed for this. (personally think it’s nice because in this way the game is debuggable both from Godot and C++ and cannot mess, slow or crash the editor at the same time).
I say “not fully” because you can still inspect and edit the game state remotely, using the Remote Inspector (3rd tab in the debugger), so Godot is aware of what’s going on remotely, to some extent (polling everything is a big amount of data).

If what you want is something like Unity does, then you can theoretically do it because the editor is just a “game” made of nodes with extra C++ tricks for the editor. It can probably be a new tab next to AssetLib, “Play”, then another tab “Live Scene”. However you might run into design conflicts when doing this, leading you to recode lots of things, because Godot has never been thought to do that.

Another thing you can do is to embed a live editor in your game, a switch that you can flip that toggles a special editor GUI letting you suspend the game, look around and tweak stuff. Same approach as above, but on game-side rather than editor side.

tnx for your answer, i edited question after your answer

Charles Woodhill | 2017-04-06 14:45