Time to code
We don't actually have a game to start just yet, and we don't have options. So, what we will do is set up the buttons to send a message to our debug window and tell us if that has been clicked.
Our debug window is attached to a Singleton, so we can easily access it from anywhere in the code using ApplicationManager.Instance.debugInfoString =. Application Manager is the Singleton, Instance is the directline to application manager and debug InfoString is a connection to the text we want to change. Whatever is on the other side of the equal sign will be put into our debug window.
Simple, right?
OK, so now we need to select the StartBtn object and click on Add Component, click on New Script, type StartButton, and press Enter. Now, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access