> For the complete documentation index, see [llms.txt](https://bennykok.gitbook.io/rhythm-game-starter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bennykok.gitbook.io/rhythm-game-starter/playing-your-own-song.md).

# Control Song Play / Pause

### Playing a song on awake

1. Set Play On Awake to true in `SongManager`
2. Assign a Default `SongItem`

![](/files/-M77pUz6BpcLEMkZhJk4)

### Playing songs from UI Button

1. Find the Play Button in the scene
2. Switch the `PlaySong` function to the one lets you pass in a `SongItem`
3. Assign your own `SongItem` to the parameter slot

![](/files/-M77pUz7S7rx5kmRZQg_)

![](/files/-M77pUz8MG3fprjuBX8E)

### Playing a song via code

For playing a song through code, please head over to the `SongManager`

{% content-ref url="/pages/-M78YKzqudKWFYd5hC1t" %}
[Song Manager](/rhythm-game-starter/hierarchy-overview/song-manager.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bennykok.gitbook.io/rhythm-game-starter/playing-your-own-song.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
