Live edit WORK IN PROGRESS
1) press the heart while the game is running 2) select a scene to live edit from the opened scenes 3) edit/add/remove nodes or resources, change their properties, etc. 4) watch changes reflected in running game, in all places this scene is edited 5) It's not perfect obviously, but the aim of it is to try to reflect your changes as best as possible in the running game.
This commit is contained in:
parent
922356b903
commit
59961c9914
22 changed files with 1347 additions and 244 deletions
|
|
@ -432,6 +432,7 @@ int EditorData::add_edited_scene(int p_at_pos) {
|
|||
es.root=NULL;
|
||||
es.history_current=-1;
|
||||
es.version=0;
|
||||
es.live_edit_root=NodePath(String("/root"));
|
||||
|
||||
if (p_at_pos==edited_scene.size())
|
||||
edited_scene.push_back(es);
|
||||
|
|
@ -552,6 +553,23 @@ String EditorData::get_scene_path(int p_idx) const {
|
|||
|
||||
}
|
||||
|
||||
void EditorData::set_edited_scene_live_edit_root(const NodePath& p_root) {
|
||||
ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
|
||||
|
||||
edited_scene[current_edited_scene].live_edit_root=p_root;
|
||||
|
||||
}
|
||||
NodePath EditorData::get_edited_scene_live_edit_root() {
|
||||
|
||||
ERR_FAIL_INDEX_V(current_edited_scene,edited_scene.size(),String());
|
||||
|
||||
return edited_scene[current_edited_scene].live_edit_root;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void EditorData::save_edited_scene_state(EditorSelection *p_selection, EditorHistory *p_history, const Dictionary& p_custom) {
|
||||
|
||||
ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue