Creating GameMachine

To create a new GameMachine asset:
 
  • In the Project Browser select the folder in which you want to create the Gamemachine asset
  • Click right mouse button (RMB), the dropdown menu appears.
  • Click on new->fsm on the dropdown menu, the NewFIle dialog appears (as showed into the following image):
  • In the NewFile dialog insert the name you want to give to the GameMachine asset (as showed into the following image):
  • Click on New
 
 

USING GAME MACHINE
 
Once You have created the GameMachine you are able to assign it to an object for making it to work.
 
Starting from version 2020.3 it is possible to assign more than one GameMachine to the same object.
A new parameter called "GameMachines" has been introduced replacing the old "Fsm" parameter into the "Behaviour" section:
This parameter contains the list of GameMachines assigned to the object.
The button "+" is used for adding new slots in which to load the additional gameMachine
The button "-" is used to remove the slot and the GameMachine loaded.
 
To assign the first gameMachine to an object simply drag&drop the gms asset from the browser to the GameMachines parameter of the object:
 
For assigning the subsequent gameMachines to the object:
  • Add a new slot by clicking the "+" button.
  • Drag&Drop the GameMachine you want to assign on the slot.