Now, we need to attach our script to the AppManager object and connect all the objects that follow:
- With AppManager selected, click and drag the ApplicationManager.cs file to the Inspector window and drop it:
You will notice that we have a bunch of empty Game Object slots; let's fix that.
- With AppManager selected and displayed in the Inspector, click on the lock at the top of the Inspector; this will make the AppManager remain the object in Inspector no matter what you click in the Hierarchy or Project views.
- Selecting the object Layer 1 in the Hierarchy view, drag it to the Sound Layer 1 slot:
- Repeat step 3 for layer 2, layer 3, and layer 4.
- Now, drag the skee object to the Skeeballmachine slot of the AppManager object.
- Now, you can click on the lock again to unlock it.
When you finish these steps, you should have an AppManager object that looks like this; note that this object is an unseen object, so position does not matter: