> For the complete documentation index, see [llms.txt](https://docs.digicrafts.com.hk/sceneflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digicrafts.com.hk/sceneflow/tutorials/tutorial-3.md).

# Using Events

#### What to learn?

* Connect events from **Scene Flow Manager**

**Steps**

1. Setup a working game flow follows the previous tutorials. We have a simple flow setup here.

![](/files/-LXTR_O0L3LPxjA-BpuW)

1. 2\. Open the bootstrap scene. Select the **Scene Flow Manager.**

![](/files/-LXTR_O2I_o3RD4FrAPt)

3\. Add a new script and name it **DemoEvents.cs** ( You can use your own name or script).

![](/files/-LXTR_O3UFliXnYiLMPd)

4\. Open the **DemoEvents.cs** and add functions called ***HandleLoadEvent() and HandleUnloadEvent()***.

```csharp
    public void HandleLoadEvent(SceneInfo current, SceneInfo next)
    {
        Debug.Log("[HandleLoadEvent]  Current: " + current.SceneName + " Next: " + next.SceneName);
    }

    public void HandleUnloadEvent(SceneInfo current, SceneInfo next)
    {
        Debug.Log("[HandleUnloadEvent]  Current: " + current.SceneName + " Next: " + next.SceneName);
    }
```

5\. From the inspector, open the events foldout and you will see a list of events.

![](/files/-LXTR_O4Gwi0NQH3FIQ_)

6\. Press the **"+"** button and add a new event under **OnSceneLoaded** event.

![](/files/-LXTR_O5DS1PSwdzlAty)

7\. Drag and drop the **Scene Flow Manager** gameobject to the object field.

![](/files/-LXTR_O61jHsVX6vcOKo)

8\. From the functions drop down, select the ***HandleLoadEvent()** from the DemoEvents object.*

![](/files/-LXTR_O7PGBRO5KK1exy)

*9. Repeat the steps for **OnSceneUnload** event and **HandleUnloadEvent**() function.*

![](/files/-LXTR_O82WgYZkXsx05Q)

10\. Play the scene. You will see the events log in the console when you run the project.

![](/files/-LXTR_O95vkLcb8MGBfN)
