|
|
|
|
Reply From: |
Jatz |
In the scene tree panel, next to the instanced scene. Click on the dropdown movie icon. A menu should come up. Check editable children
. now you can edit it to your heart’s delight.
That is clear, but not completly I want. When I made changes on the root scene it apply changes to it not to the edited subscene. I would like to avoid to overwrite the root scene as many times as I edit its subscenes.
Gergő Tamási | 2017-01-18 13:42
I think n you are going to have to explain you scene structure to me
then I’m trying to describe the structure:
Our game consists of chapters: A B C
In each chapter we have locations: A1 A2 A3
Each location has 2D interactable contetn and static as well. Between this locations there are some logical connections. I mentioned a example above. Because of these kind of connection, we should use signals or something like those. In addition, we’d like to edit these location separately, because more than one designer would work on them. We want to avoid overwrites the chapter container( here parent scene).
Question is: is this parent scene necessary? Or could we achive same result with another approach?
Gergő Tamási | 2017-01-18 14:12
If I’m understanding you correctely:
- You can try to use a Singleton
- You can put a node below get_tree() store your variables in that. then when the next scene loads import it from there.
- You could load one scene, put your variables from the old one into the new one, then remove the old scene.
This is what I meant you could do
- chapter_A.tscn
- Node
A1
instance (editable children on)
A2
instance (editable children on)
A3
instance
- scene_A1.tscn
- scene_A2.tscn
in the chapter_A.tscn scene
connect door to switch
alternatively:
use a NodePath you are sure will be true
etc…
So, in case of first solution, I cannot avoid chapter_A.tscn being accidently conflicted.
What if I write a tool which stores all NodePaths and use them as references for logic connection?
Gergő Tamási | 2017-01-18 14:57
You could also do the following, tell people to not save chapter_A.tscn
or make it read-only or something.
inside chapter_A
scene:
- link the
door
to the switch
- right click on
scene_A1
node
- click
save branch as scene
- save it as
scene_A1
This should insure no conflicts (I think)
I cannot save the instanced scene.
Gergő Tamási | 2017-01-18 15:37
Under the movie icon, discard scene instance
Then right click, save branch as scene
it’s a hackish solution
And it’s reliant on the rooms staying in memory, (not being free’d)