In this tutorial we will create a simple blinking object using StateMachine.
- Create new GameObject and add uNodeRuntime component on it.
- Open uNode Editor and Add new EventNode
- Add State with name “On” and add OnTimerElapsed transition on it.
- Edit State by double click on the node and add OnEnter Event.
- Make new node to disable/enable GameObject by dragging Cube to the graph > click on Get > find SetActive(bool) method > left click to add new node.
- Check the toggle button.
- Connect OnEnter Event to the node.
- Goto root graph and duplicate the State node and rename it to “Off”
- Edit State and uncheck the toggle button.
- Play the game.