diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:31:17 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:31:17 +0100 |
commit | df68909da4364cc429d2feda990ba9982fef5831 (patch) | |
tree | a116ab071b2f962603b90e815719a7eb97adf9b8 /scene/resources | |
parent | 3eb1ac9fd24a52a6fd5eb6632070f28a51aad04c (diff) | |
parent | 7780b40a3a9552f8c5ae38c5e49af97833d08c8d (diff) |
Merge pull request #72459 from KoBeWi/debinds
Add unbinds to `scn`
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/packed_scene.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 7984ec735e..1e9038139e 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -43,7 +43,7 @@ #include "scene/main/missing_node.h" #include "scene/property_utils.h" -#define PACKED_SCENE_VERSION 2 +#define PACKED_SCENE_VERSION 3 #define META_POINTER_PROPERTY_BASE "metadata/_editor_prop_ptr_" bool SceneState::can_instantiate() const { return nodes.size() > 0; @@ -1294,6 +1294,9 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { for (int j = 0; j < cd.binds.size(); j++) { cd.binds.write[j] = r[idx++]; } + if (version >= 3) { + cd.unbinds = r[idx++]; + } } } @@ -1380,6 +1383,7 @@ Dictionary SceneState::get_bundled_scene() const { for (int j = 0; j < cd.binds.size(); j++) { rconns.push_back(cd.binds[j]); } + rconns.push_back(cd.unbinds); } d["conns"] = rconns; |