 Stewww Guest |
Quote
|
| 2026-03-17 19:19:46 |
|
Hey guys, I have a problem. I'm creating a game like Silent Hill. When I went to the inventory and created an exit button, I realized there's a behavior for selecting the desired scene. But I have several locations, which means I'll have to redo this inventory for each location. Is there a way to simplify this process, for example, so that I have an exit button for the last used scene? Thanks for the help.
|
 okeoke Registered User |
Quote
|
| 2026-03-19 14:03:30 |
|
You can set a variable holding a scene name every time you about to switch to inventory scene. And then inside the inventory scene use js to switch back
var lastSceneName = ccbGetCopperCubeVariable('LAST_SCENE_NAME'); ccbSwitchToScene(lastSceneName);
|
 guest_Guest Guest |
Quote
|
| 2026-03-19 21:27:16 |
|
Absolutely, okeoke is right, but I’d advise against making the inventory a separate scene and switching to it. It’s better to create a prefab and use it within each scene - that works much better
|