I'm developing a game and I need help...
I created 2 layouts in my
game;Layout "A" & "B"
I go from Layout "A" to Layout "B"...but the problem is here that when I'm inside layout "B", I want Layout "A" to keep happening though it's not on screen.
Share your ideas...thanks❤
I'm not sure what you mean with "I want Layout "A" to keep happening though it's not on screen", can you elaborate this a little bit more?
When you change to layout B, you are game is going to load a new layout, consequently your objects inside the layout A are going to lose their property. In fact, when you switch back to layout A, the engine is going to reload the objects as you see them in the editor.
If you want to keep the status of your objects in the other layout, you can use the persist behavior and apply it to the objects you want. You can always reset the persist if you needed to do. Another way, is that you can use an array to keep each variable saved while you are in the layout B. Example: if you need to keep progress of something in the layout A, as for example a custom timer in a specific object, you could copy the timer into the array (sorting by the id of the object) then, when you are in Layout B you can keep increasing the timer into the array, so that when you go back to layout A you can transfer the value in the array to the object. Note that you would need to store the array data and load it on the start of layout.