Adding ORK Framework to your game is easy, but you need to know how. Before ORK can be used in a running game, it needs to be initialized correctly. To do this, we use a Game Starter.
A game starter is a simple component that takes your ORK Project Asset and loads everything correctly. The ORK Project Asset holds all data of your project (except for events).
The game starter needs to be in the first scene of your game (e.g. the main menu scene).
Even when testing within the Unity® editor, you always need to start from the scene containing your game starter and go through the main menu – otherwise there could be problems with missing data or not set up features!
The game starter only has a few settings.
Select the ORK Project Asset the game starter will load.
Call Main Menu
If enabled, the main menu will be called in this scene. Don’t use this option if you use the Auto Call option in the main menu settings in the ORK Framework editor.
Call After (if ‘Call Main Menu’ is enabled)
The time in seconds before calling the main menu. This is only used if Call Main Menu is enabled.
Immediately starts the game in the scene the game starter is located (if you hit Play in this scene).
The main menu wont be called and the Start Event (if defined in Menus > Main Menu) will be executed.
Add the Game Starter to your game
You can add the game starter to your game in two ways: manually or using the ORK Scene Wizard.
ORK Scene Wizard
The ORK Scene Wizard is a tool to help you bringing ORK content into your scenes. Open the wizard using the Unity® menu: Window > ORK Scene Wizard.
Now click on Add Game Starter.
The default ORK Project Asset will be selected automatically (if it can be found at Assets/ORK Framework/ORKProject.asset). If you want to use a different project, simply select it in the ORK Project Asset field.
Now simply click on Add Game Starter and a new game object with a game starter component using the selected project will be created in your scene.
Adding the game starter manually is a standard workflow in Unity.
First, create an empty game object using the Unity® menu: GameObject > Create Empty.
Now, with the newly created game object selected, again use the menu and add the game starter component: Component > ORK Framework > Scenes > Game Starter.
Finally, set up the game starter in the inspector. Select your ORK Project Asset – the default project location is Assets/ORK Framework/ORKProject.asset.