Create a new state machine and execute the sample.
This page introduces how to execute the sample when you create a new state machine for Unity.
This sample uses Loop and Gosub features, so it's a little difficult to use StateGo for the first time.
If so, please use this only for environment maintenance and confirmation.
Create a new Unity project
First, please create a new Unity Project.
"Assets" folder will be created just under the Unity project folder.
You will create files relating StateGo in "Assets" folder.
Create a new state machine.
1. Launch StateGo and push "Create a new state machine" button to open "new state machine creation dialog".
2. Select C# Unity Starter kit on the starter kit list.
3. Type "TestControl" as a tutorial state machine name.
4. Specify "Assets" folder for creating folder path.
5. Push "Create" button.
Convert the initial sample flow.
Let's convert it once to see how it works.
Add "TestControl" Component.
Select "Create Empty" on Unity Hierarchy panel context menu.
It causes an empty gameobject created.
Name "test" the gameobject.
Add "TestControl.cs" to the gameobject by drag and drop.
Execute the sample.
Explanation of the sample flow.
1. S_GOSUB : Calling "This is A Subroutine" output function.
2. S_LOOP : Iterate 10 times through a subroutine that examines the variables for loops and displays the even or odd number on the console.
What you learned.
You learned the followings.
1. How to create a new state machie for Unity.
2. How to add StateGo file to gameobject.