Ninjutsu Games
Asset StoreYoutubeTwitterInstagramSupport
  • 🖐️Welcome!
  • Game Creator 2
    • ☢️Fusion Module
      • Setup
      • Sessions
      • Characters
      • Variables
      • Remote Procedure Calls
      • Settings
      • User Interface
      • References
        • Shutdown Reasons
      • Guides
        • How to test my game
        • How to toggle Debug mode
        • How to Update Fusion SDK
      • Releases
      • 🤝Fusion Factions
        • Releases
      • 💫Fusion Stats
        • Releases
      • 📦Fusion Inventory
        • Releases
      • 🧙Fusion Abilities
        • Releases
      • ⚔️Fusion Melee
        • Releases
      • 🔫Fusion Shooter
        • Releases
    • 🤝Factions
      • Setup
      • Faction Asset
        • Settings Editor
      • Member
        • Memory
      • Visual Scripting
        • Conditions
        • Events
        • Instructions
        • Properties
      • User Interface
      • Releases
      • 🌐Photon Factions
    • 🎮Coop
    • 👑Loot Locker
      • Getting Started
      • Authentication
        • Guest
        • White Label
        • Google
        • Steam
        • Apple Sign In
      • Sessions
      • Save Load
      • Players
        • Player Storage
        • Names
      • Leaderboards
        • Visual Scripting
      • Messages
      • Progressions
      • Replenish System
      • Date Time
        • Server Time
      • Handling Errors
      • Releases
    • 🤖State Machine 2
      • Graph Editor
      • State Machine Runner
      • Nodes
        • Node Features
      • Variables
      • Shortcuts
      • Releases
    • 🌐Photon Module 2
      • Overview
      • Releases
      • 🔫Photon Shooter
        • Getting Started
        • Releases
      • 💫Photon Stats
        • Releases
      • 📦Photon Inventory
        • Overview
        • Releases
      • 🧙Photon Abilities
        • Releases
      • ⚔️Photon Melee 2
        • Troubleshooting
        • Releases
  • Game Creator 1
    • Photon Network
      • Overview
      • Characters
      • Network Items
      • Actions
      • Conditions
      • Triggers
      • Guides
        • How to Connect and Instantiate your Player
        • Instantiation Options
        • How to Sync Attachments
        • How to display room or other network information
        • How to setup Camera Motor
        • How to test my game
      • Sub-Modules
        • 🏃Photon Traversal
        • ⚔️Photon Melee
        • 🔫Photon Shooter
          • Changelog
      • Changelog
    • State Machine
      • Editor Graph
        • Nodes
        • Blackboard
        • Copy & Paste
        • Targets
      • Export State Machines
      • Changelog
    • RPG (Deprecated)
      • Actor
        • Actions
        • Conditions
        • Triggers
      • Attributes
        • Actions
        • Conditions
      • Classes
        • Actions
        • Conditions
      • Skills
        • Actions
        • Conditions
      • Formulas
      • Changelog
    • AI & Factions (Deprecated)
      • Changelog
Powered by GitBook
On this page
  • The State Machine asset
  • The Controller
  • The State Machine Graph Window
  • Live debugging
  • Context Menus
  • Export

Was this helpful?

  1. Game Creator 1
  2. State Machine

Editor Graph

PreviousState MachineNextNodes

Last updated 4 years ago

Was this helpful?

The editor graph works and look pretty much like the Animator graph, this is the editor for the State Machines they are composed of nodes with Actions, Triggers and Transitions where you can add Conditions.

The State Machine asset

To create a Behavior Graph asset right click on your Project Panel and select Create → Game Creator → State Machine. You can name it however you want as well as place it anywhere.

I recommend creating a State Machines/ folder at the root of your project and organize all your trees there.

State Machines can be duplicated by simply selecting the SM asset and press CTRL+D

The Controller

In order to run a State Machine you have to use a State Machine Controller component. You can add it manually to a Game Object or simply drag and drop a State Machine asset in an object this will auto-create a State Machine Controller and assign the State Machine reference.

The State Machine Graph Window

To bring up the StateMachine Graph window simply go to the top toolbar and select Window → State Machine. Alternatively, when you double click on a State Machine asset it will automatically open the window.

Live debugging

When playing Unity you can preview where the State Machine is currently running.

Context Menus

Once you right click somewhere in the Graph it will show a different context menu depending on what you have selected.

Export

One neat feature of the State Machine is that you can easily export them to re-use them on other projects.

This option will package a SM in a Unity Package containing the SM with all its nodes, actions, conditions and triggers.

Example of a Connection Manager which takes care of room creation and player instantiation
(A state machine with a transition selected)