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.:
All of this is done by adding and connecting nodes, without writing a single line of code!
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.
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.).
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.
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 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:
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.
The following actor types are available.
You can also create custom actor type implementations by deriving your class from the BaseActorType class. Check the available actor classes for examples.
Schematics can use different Unity assets, currently supported are:
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.
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.
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.
Schematic nodes are generally arranged into similar topics/categories.
Some nodes can also be available in multiple categories.
Animation nodes contain everything animation related, from legacy to Mecanim animations, but also include fading colors or the screen and using playables.
Audio nodes contain everything audio related, e.g. playing music and audio clips, but also include handling audio mixers and filters.
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 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 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 nodes contain a wide variety of everything game object and component related, e.g. spawning prefabs, adding components, expanding colliders or manipulating terrains.
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 nodes contain anything input related, e.g. checking input keys, blocking player control or changing the cursor state.
Machine nodes contain anything schematic and machine related, e.g. starting schematics or tagged machines, using machine stacks or restarting the schematic.
Movement nodes contain anything movement related, e.g. moving or rotating game objects, using NavMesh or Makinom’s waypoint paths.
Networking nodes contain anything network related, which currently is limited to using Web Requests.
UI nodes contain anything UI related, e.g. showing dialogues, calling HUDs, showing images or changing UI components.
Value nodes contain anything value related, e.g. changing and checking variables, using selected data, date and time functionality, timers, float and Vector3 operations.
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.
© 2015 Gaming is Love e.U.
Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!