Repurpose Children's Books
  • About
  • Blog
  • Free Blueprint
  • Contact
Get the Free Blueprint

Hidden Quest: From Picture Book to Playable Story – Adding Page Navigation in Unity

In my previous tutorial, we brought a children’s storybook to life by adding animations in Unity. Now, let’s take the next step: making the story interactive with working page navigation.

Right now, in the Hidden Quest demo project, clicking the Enter or Info buttons in the menu doesn’t do anything. That means readers can’t move from the menu to page one, or flip through the rest of the story. Let’s fix that with a simple script — and the best part is, it only takes only 10 lines of code!

Why We Need a Script

Unity already includes many built-in components (like physics or audio), but for custom behaviour — like telling a button which page to open — we need to write our own.

That’s where scripts come in. A script is a small program written in C# that you attach to a GameObject. When Unity runs your app, it follows the instructions in that script.

Don’t worry if you’re new to coding. We’ll use a free tool called Visual Studio Code (VS Code), which acts like a smart text editor for writing and testing scripts.

Setting Up VS Code in Unity

  1. Download and install Visual Studio Code.
  2. In Unity, go to Edit > Preferences > External Tools.
  3. Under “External Script Editor,” select Visual Studio Code.

That’s it! Unity will now use VS Code for all your scripting.

Creating the Navigation Script

To control navigation, we’ll create a custom script:

  1. In your Scripts folder, right-click → Create > C# Script.
  2. Rename it to HiddenQuestController.
  3. Attach it to an empty GameObject (I call mine Script Controller).

When you open the script in VS Code, you’ll see Unity’s default template. To enable page navigation, we’ll add a simple public method that loads a new scene when called.

using UnityEngine;
using UnityEngine.SceneManagement;

public class HiddenQuestController : MonoBehaviour
{
    public void GoToScene(string sceneName)
    {
        SceneManager.LoadScene(sceneName);
    }
}

This is where the magic happens:

  • Namespace: Brings in Unity’s built-in tools, like the Scene Manager.
  • Class: The container that holds our script’s instructions.
  • Public Method: The function that runs when a button is clicked (e.g., GoToScene).

In plain English: when called, this function tells Unity to load the page we specify.

Storybook page navigation in Unity with just 10 lines of code
Simple breakdown of the C# script for page navigation in Unity

Wiring Buttons to the Script

With the script ready, let’s connect it to our buttons:

  1. Select a button (e.g., Enter).
  2. In the Inspector, scroll to the On Click section.
  3. Click + to add a new event.
  4. Drag in your Script Controller GameObject.
  5. From the dropdown, choose your GoToScene function.
  6. Type in the name of the page (e.g., Page1).

Repeat the process for the Info button and the navigation buttons on each page (Next, Previous, Home). This way, Unity knows which scene to load whenever a button is clicked.

Populating the Scene List

Unity can only load scenes that are included in the Build Settings. Make sure all your pages (Menu, Page1–Page4, Info, etc.) are added to the build scene list. Otherwise, the navigation won’t work. To do that:

  1. Select the File menu.
  2. Click Build Profiles
  3. In the Build Profiles window, click Open Scene Lists
  4. Drag in your Scenes from your Assets folder

Testing the Navigation

Once everything is set up:

  • Click the Info button → Unity loads the Info page.
  • Click the Enter button → Unity loads Page 1.
  • Use the Next, Previous, and Home buttons to navigate through all pages.

And just like that, your storybook app now has working page navigation!


Final Thoughts

With just a few lines of C# code, we’ve transformed a static picture book into an interactive story experience. Readers can now move seamlessly from page to page, making your story feel more like an app than a PDF.

This tutorial is part of the Hidden Quest series, where I show you how to repurpose a children’s storybook into an interactive Unity app.

👉 Next Step: If you’d like to add animations to bring your pages alive, check out my earlier tutorial: Animating a Children’s Storybook in Unity.

You can also grab the finished Hidden Quest demo app for free and explore it yourself — link in the description.


✅ By the end of this guide, you should feel confident wiring up page navigation in your own project. And remember: it only takes 10 lines of code to make your story interactive!

Post navigation

Previous
Next

Search

Get the Free Blueprint

Free Blueprint To Game Apps

Recent posts

  • Hidden Quest: Bringing Story Text into a Children’s Book App
    Hidden Quest: Bringing Story Text into a Children’s Book App
  • From Subscribers to Sales: How Doreen Pena Earned Her First $500 With a Children’s Book App
    From Subscribers to Sales: How Doreen Pena Earned Her First $500 With a Children’s Book App
  • From Paperback to Interactive App: How Doreen Pena Grew 300+ Subscribers Using Her Book
    From Paperback to Interactive App: How Doreen Pena Grew 300+ Subscribers Using Her Book

Continue reading

Hidden Quest: Bringing Story Text into a Children’s Book App

Hidden Quest: Bringing Story Text into a Children’s Book App

Learn how to add clear, readable story text to a children’s book app using Unity and TextMesh Pro. This post supports the Hidden Quest video tutorial and walks through the core ideas behind positioning, styling, and managing narrative text across multiple pages.

From Subscribers to Sales: How Doreen Pena Earned Her First $500 With a Children’s Book App

From Subscribers to Sales: How Doreen Pena Earned Her First $500 With a Children’s Book App

Less than a month after turning her children’s book into an interactive app for iOS and Android, Doreen Pena made her first $500. Not through ads. Not through luck. And not through Amazon’s algorithm. This post is a continuation of Doreen’s journey, which began with a simple experiment: what if a children’s book didn’t stop […]

From Paperback to Interactive App: How Doreen Pena Grew 300+ Subscribers Using Her Book

From Paperback to Interactive App: How Doreen Pena Grew 300+ Subscribers Using Her Book

Doreen, a self-published children’s book author, transformed her Amazon KDP book into an interactive story app using Unity and MailerLite — no ads, just free tools and smart strategy. Within weeks, her simple MVP app attracted over 300 new subscribers, proving what’s possible…

Repurpose Children's Books

© 2026 Wafunk Publishing | Privacy Policy