Getting Started

This article answers common workflow questions in ICode.

You can also create a state machine by right clicking on a folder. Navigate to Create> Unitycoding > ICode > State Machine

You can create a state machine from the main toolbar. It is located under Tools > Unitycoding > ICode > Create State Machine. It will ask you for a path that should be located in your project.

  1. Double click a state machine asset and the editor will open.
  2. If a game object has the StateMachineBehaviour component you can select it and press the “Open in Editor” button.
  3. If the editor is open and you select a GameObject that has already a StateMachineBehaviour component, it will show the state machine in the editor.

Select a GameObject in the Hierachy window, right click on an empty place in the editor and press Add To Selection.

The second way is to drag and drop the state machine asset onto the GameObject.

  1. Open the state machine.
  2. Right click on the canvas and select Create State.
  3. Rename the state in the Inspector.
  4. Move the state wherever you want.

  1. Right click on the state.
  2. Select “Set As Default” from the menu. The starting state is displayed in oragne color.

  1. Select a state in the editor.
  2. Click on the “+” Button in the Inspector.
  3. Select an action from menu.

A second way is to use the action browser, it is located in the main toolbar under tools. Double click the action name or use the Add to state button.

  1. Right click on a state.
  2. Select Make Transition from menu.
  3. Left click on a diffrent state.

  1. Select a state in the editor.
  2. Select a transition in the Inspector or Canvas.
  3. Click on the “+” Button in the Inspector.
  4. Select a condition from menu.

A second way is to use the condition browser, it is located in the tools menu.

  1. Click on the “+” Button in the editor.
  2. Select a type from the menu.
  3. Enter an unique name.
  4. Use the variable in actions and conditions.