Hello!
I'm trying to change from a scene to another and back using the Unity UI.
I created a new Game using the Adventure Creator Wizard choosing Unity UI for menus.
I am working on a clean 2D project with Adventure Creator v 1.42c just imported in Unity 5 (platform iOS).
I am using the first scene as Loading Screen.
I selected "Use loading screen" : Number : 0 in AC Settings Manager and the scene is
#0 in Unity Build Settings.
There's nothing in the scene except a Unity UI with 5 buttons (grouped inside a GameObject with the GridLayoutGroup script).
In AC Menu Settings I created a Menu called Home and put it as first among Menus.
In menu 'Home' properties I set the source as Unity UI in Scene, linked the Canvas in the Hierarchy to Linked Canvas and RectTransform boundary.
The rest is unchecked, Appear type and Position type are set to manual.
In menu 'Home' elements I created the 5 buttons.
The first button is linked to the first button inside the canvas.
The button runs an ActionList on click.
I created the GoToUserMenu ActionList and set the only action to "Engine: Change Scene" : Number : 1.
I created another scene (#1 in Unity Build Settings) that should be used to collect User personal informations. I am using a scene and not a simple menu because I have a complex UI with interactions like uploading a picture of the user.
I added a Unity UI button in a Canvas to test going back to Home scene.
In AC Menu Settings I created a Menu "User" and set it as second after Home (is position influent?).
I set the properties like I did with the Home Menu and added a Home Button, to change back to the first scene.
The button has assigned an ActionList with the action Engine: Change Scene" set to Number 0.
This should be enough to test.
I open the first scene (#0 in BS) and hit RUN.
The UI is visible, but when I click on the first button, nothing happens.
What am I missing?
If I open the second scene (#1 in BS) and hit RUN I can see the (default?) Pause Button (bottom-left) and Inventory bar (top-center) but not the "Home" button I added.
How do I disable the Pause Menu just for this scene, and show the in Scene UI?
Sorry for the long post, hope I was clear
BTW, Thank you for this wonderful asset!
Comments
Uncheck the "Loading scene" checkbox and re-try it.
I tried unchecking the "Loading scene"
The scene settings:
The onStart Cutscene:
The canvas and button linking isn't the same from scene to scene. Is this normal?
BTW how to disable the Pause and Inventory Menus?
Your User menu won't appear in the new scene because it's local to that scene (as set by "Unity Ui In Scene"). Instead, you want to reference a UI prefab. Make a prefab out of the UI, change to "Unity Ui Prefab" in the Menu properties, and then reference the prefab instance of the Canvas / RectTransform / Buttons.
This tutorial covers the process of a prefab-based UI menu.