Need help understanding how to link scenes

Hi,

I’m making a kind of interactive storybook. I want to have a table of contents page that allows the reader to click the chapter names and then jump to that particular page (each page is it’s own scene within the Unity Project)

Is there a tutorial that covers this particular type of script(s)?

Thanks

Hello!

Make a little script

function Start () {
renderer.material.color = Color.white;
}

function OnMouseEnter (){
//Change object colour to red when you point on it
renderer.material.color = Color.red;
}

function OnMouseExit (){
//Chenge to default colour ("white") when you not point
renderer.material.color = Color.white;
}

function OnMouseUp (){
//Load some level after clicking on that object
Application.LoadLevel ("Scene Name You want to load");
}

Attach this .js to an object (Your button object), and dont forget to add box collider on it
Now when you point on this object, it turns red, if not point it turns white.
When click on it, the level will be loaded (Just change the name of your level at last line)

@ NDdesignGames. dunno how that’s supposed to help lol

Anyway, you should look at the reference for LoadLevel.

Make your table of contents it’s own scene, with a DontDestroyOnLoad script so that is always there.

Just before you load a new scene destroy any page (scene) if one is loaded.

[edit] and look at Unity - Manual: IMGUI Basics

Should be easy.

callahan.44 Im accidentally published my unfinished post. Read it again please.

no problem, reminded me about the GUI button stuff after I saw what you edited.

Thanks so much guys, this is a huge help. :slight_smile: