Schematics

Schematics are the core feature of Makinom – learn what you can do with them!

A schematic is a reusable, node-based blueprint for what you want to do. It consists of connected nodes that work similar to a flow chart – each node performs a task and decides the next node that’ll be executed. There are over 400 nodes available for different tasks, and you can add new nodes via scripting or call custom code and 3rd party functionality using function nodes.

Schematics are created in the Makinom editor in the Schematics section using the node editor.

So, what can you do with schematics? Pretty much everything, e.g.:

  • player controls
  • camera controls
  • animation handling
  • animating a cut-scene
  • procedurally/randomly creating a level
  • various game mechanics, e.g. managing player health
  • menus, dialogues, …
  • enemy AI and behaviours
  • level handling
  • audio management
  • communication with 3rd party software
  • and much more!

All of this is done by adding and connecting nodes, without writing a single line of code!

Playing Schematics #

Schematics are played by machines and other schematics. Machines are components used to play schematics, you can learn more about them in their documentation.

Playing schematics by other schematics allows breaking down tasks into several schematics, making them reusable and shorten the time needed to create your game mechanics.

E.g. change the health of the player (or any other character in the game) and check for a death condition in a separate schematic allows reusing it wherever needed (like different attack schematics, for damaging and recovering health through items, etc.).

If something needs to be changed later, you only need to change it in this one schematic and not in all places where this game mechanic is used.

Settings #

The schematic’s Settings node marks the start of a schematic – the node connected to it’s slot is the first node that’ll be executed.

Enabling Use End Slots in the settings node will add 2 additional slots, one to execute nodes when stopping the schematic (e.g. from the machine being destroyed) and one upon ending the schematic regularly (e.g. when the schematic branches into multiple endings and all of them should do some cleanup at the end).

The Settings node also defines the schematic’s main settings, e.g. actors and used resources (like prefabs, audio clips, etc.).

Machine Start Variables #

Define local variables that are exposed to the machine component using the schematic.

This can be used to quickly set local start variables and change their value in machine components.

Initial Local Variables #

Define local variables that will be set at the start of the schematic.

They’re not exposed to the machine component and will overrule start variables set by the machine component.

Actors #

Actors are Game Objects that are already present in the scene. You’ll use actors in many nodes to perform a task, e.g. moving an actor to a position, playing a sound on an actor or change values on an actor’s component.

There are default objects are available without adding actors:

  • Machine Object
    The game object the machine component is running on.
  • Starting Object
    The game object that started the machine (e.g. the player).
  • Camera
    The camera game object used by the schematic (by default the Main Camera).
  • Selected Data
    Game objects stored in Selected Data.
    This can optionally be limited to only use stored game objects – otherwise it’ll also use game objects from stored components, etc.
    Depending on the Data Origin, the list is either only available in the running schematic (Local), everywhere (Global) or through a game object (ObjectObject ID).
    E.g. you can add game objects by finding them through their name or when they where hit by a raycast.
    Learn more about selected data here.
  • Selected Object
    The currently selected game object.
    Game objects with a Selectable Object component attached can be selected, e.g. by clicking on them or pressing a defined input key.
    See Base/Controls > Game Controls > Object Selection for details and settings related to selected objects.

If you need additional game objects of the scene, add them as an actor to the schematic. Beside selecting the actor in the machine component, you can also let the schematic find a game object or multiple game objects by name, tag or an attached component.

Actor Types #

The following actor types are available.

  • Machine Object
    The game object the machine component is running on.
  • Starting Object
    The game object that started the machine (e.g. the player).
  • Player
    The game object of the player.
  • Find Object
    Searches for game objects in the scene based on name, tag, components or other filters.
  • Game Object
    Allows selecting a game object in the machine component that uses the schematic.
  • Selected Data
    Game objects stored in Selected Data.
    This can optionally be limited to only use stored game objects – otherwise it’ll also use game objects from stored components, etc.
    Depending on the Data Origin, the list is either only available in the running schematic (Local), everywhere (Global) or through a game object (ObjectObject ID).
    E.g. you can add game objects by finding them through their name or when they where hit by a raycast.
    Learn more about selected data here.
  • Selected Object
    The currently selected game object.
    Game objects with a Selectable Object component attached can be selected, e.g. by clicking on them or pressing a defined input key.
    See Base/Controls > Game Controls > Object Selection for details and settings related to selected objects.

You can also create custom actor type implementations by deriving your class from the BaseActorType class. Check the available actor classes for examples.

Assets and Resources #

Schematics can use different Unity assets, currently supported are:

  • Prefabs
    E.g. to spawn prefabs in the scene.
  • Audio Clips
    E.g. to play an audio clip on a game object.
  • Audio Mixers
    E.g. to change an audio mixer’s values.
  • Audio Mixer Groups
    E.g. to change the output audio mixer group of an Audio Source.
  • Sprites
    E.g. to change the sprite of a game object.
  • Textures
    E.g. to change the texture of a game object.
  • Materials
    E.g. to change the material of a renderer.
  • Physic Materials
    E.g. to change the physic material of a collider.
  • Physics Material 2Ds
    E.g. to change the physics material 2D of a collider 2D.

While you can add those resources directly in the node you want to use them, you can use advanced functionality by adding them as resources to a schematic in the schematic’s settings (i.e. the start node). A single resource can use multiple assets that can be used in sequence, reversed sequence or randomly.

A single audio clip resource will be used as footstep sounds. Adding mutiple audio clips to the resource and using the Random use order will randomly play one of the added audio clips when used in a Play Sound node.

Resource overrides #

By adding assets as resources to a schematic, you can override them in machine components. This further increases the reusability of schematics, as you can create more generic schematics that perform a task, but use different assets on different occasions.

Overriding the previous footstep audio clip resource in machine components allows having different random footsteps for different game objects, e.g. a small character having light footsteps while a big character stomps quite loudly.

Nodes #

Each node represents a task that it’ll process, before executing the next node. As said, there are over 400 nodes available for various tasks, ranging from simple things  (like spawning a prefab, playing an audio clip or increasing a counter) to complex operations (like movement over time, raycasting or showing a dialogue).

You can add nodes via the context menu (right/context click), learn more about using the node editor in this documentation.

Node Types #

Schematic nodes are generally arranged into similar topics/categories.

Some nodes can also be available in multiple categories.

Animation #

Animation nodes contain everything animation related, from legacy to Mecanim animations, but also include fading colors or the screen and using playables.

Audio #

Audio nodes contain everything audio related, e.g. playing music and audio clips, but also include handling audio mixers and filters.

Base #

Base nodes contain some basic functionality that’s not matching in any other categorie, e.g. the Wait node to wait for a certain amount of time, chance checks or debug output.

Check #

Check nodes are a collection of all nodes that perform checks (and execute the next node depending on that), they mainly contain nodes from other categories.

Function #

Function nodes are used to connect custom or 3rd party features by using reflection to call their functions or change/check fields and properties on their classes and components.

Game Object #

Game object nodes contain a wide variety of everything game object and component related, e.g. spawning prefabs, adding components, expanding colliders or manipulating terrains.

Game #

Game nodes contain anything related to the overall game and application, e.g. quitting the application, changing game states or loading scenes, but also setting and spawning the player or handling save games.

Input #

Input nodes contain anything input related, e.g. checking input keys, blocking player control or changing the cursor state.

Machine #

Machine nodes contain anything schematic and machine related, e.g. starting schematics or tagged machines, using machine stacks or restarting the schematic.

Movement #

Movement nodes contain anything movement related, e.g. moving or rotating game objects, using NavMesh or Makinom’s waypoint paths.

Networking #

Networking nodes contain anything network related, which currently is limited to using Web Requests.

UI #

UI nodes contain anything UI related, e.g. showing dialogues, calling HUDs, showing images or changing UI components.

Value #

Value nodes contain anything value related, e.g. changing and checking variables, using selected data, date and time functionality, timers, float and Vector3 operations.

Custom Nodes #

You can create custom nodes by deriving from the BaseSchematicNode or BaseSchematicCheckNode classes. For examples it’s best to check out the available node implementations.

See the custom nodes documentation for details.