How do i make a Page flip Function(UI)?

Alright idk what I was trying to ask so i’ll put more detail here.

What I’m trying to do is make like clicking function that shows the next thing after the next.

Such as if I click an arrow button displaying my first list of selections. It will then show a second list of selections, and so on.

But I’m confused to how to do this. Does it involve the Library Dictionary Thingy?

Well here’s the script I tried. And it failed.

using UnityEngine;
using System.Collections;

public class ButtonScript : MonoBehaviour {
	public bool Viewing1 = true;
	public bool Viewing2;
	public bool Viewing3;

	// Use this for initialization
	public void CSSBoxSwap(){
		if (Viewing1) {
			Viewing1 = false;
			Viewing3 = false;

			Viewing2 = true;
			print ("Swapped to 2nd Box");
				}
		if (Viewing2) {
			Viewing2 = false;
			Viewing1 = false;

			Viewing3 = true;
			print ("Swapped to 3rd Box");

		}
		if (Viewing3) {
			Viewing3 = false;
			Viewing2 = false;

			Viewing1 = true;
			print ("Swapped to 1st Box");

		}
	}
	void Start () {
	
	}
	
	// Update is called once per frame
	public void Update () {

	}
}

A couple of ways come to mind…

First -

Simply make each new list a new scene. Once the player has read the data on the first page(list) they click a button and the next page/scene will be loaded. This is basically what happens on a start screen with play / options / quit buttons.

(Look up Application.LoadLevel for this)

The second(more technical but probably more visually appealing) -

Use photoshop or paint (or anything similar) to make your list. Then import that image into Unity. Now make a plane and add the image of your page onto the plane.

Now make it so when the player clicks the correct button the plane(list) begins to rotate which would make it look like a page is being turned. As this is being done instantiate another plane with your next image/list on it.

Once the first page has turned you can destroy it, leaving the next plane/page there for the player to read. (repeat this for as many pages as you need)

If you add each plane to an empty gameObject and position it slightly to the side you can rotate the empty object which will give a slightly more realistic looking page turn effect.

Really technical version -

Make a page/list using any 3d modelling program. Make your image as described above. Import those into unity. Add your image to the list/page model (do this for each page)

Now use unitys animation function to simulate the turning of each page when a button is pressed.

Hope some(or all) of this was helpful to you.

:slight_smile:

edit -

check out these too…

https://www.youtube.com/results?search_query=unity+3d+menu

:wink: