Project 2 - Starter Assets
Last updated
Last updated
For the remaining projects in this course, we'll use the following provided script files:
Scripts: StateManager.cs - Custom State Machine Logic - Inherits from MonoBehaviour IStateBase.cs - Interface specification BeginState.cs - Example Scene-State script EndState.cs - Example Scene-State script
Scenes: BeginScene, EndScene
Each scene contains:
UI Button, UI panel with UI - Text
Find your Project1 Unity files on your computer
Create a copy of your Project 1 Unity Project.
Rename your duplicate project to reflect: Project2
Open Project2 in Unity
Save Project2 in Unity
Download the Project2 StarterAssets UnityPackage using links above.
Import into Unity: Menu > Assets > Import Custom Package
browse to your downloaded file
Import all items
In the BeginScene, create an empty GameObject called: GameManager, add the StateManager script as a Component to this GameObject Note when the scene is played, the GameManager will show as DontDestroyOnLoad in the Hierarchy Panel
Go to File / Build Settings (see image below)
Drag BeginScene, EndScene into Scenes In Build panel
Do not Build Project
Close Build Settings Window
In Unity, open BeginScene, Play, use buttons to change between BeginScene, EndScene
If you've done the above steps correctly, you should be able to use the EndButton to go to the EndScene, and from there, you should be able to use the StartButton to return to the StartScene.
Sometimes Unity acts glitchy with UI-Panels and UI-Text gameObjects. If the TitlePanel and TitleText aren't displaying correctly, select the TitlePanel in the hierarchy and then select the rect-transform tool which shows the positioning blue circles at the corners of the panel. Try dragging the top blue circles below the bottom circles to see if the panel has flipped backwards. Also try dragging the left corners over the right corners. This may also be necessary to do with the text element. If these efforts don't fix the problem, simply delete the panel and add new panel / text gameObjects to recreate the corrupted gameObjects.