Documentation Game Creator
Documentation Game Creator
Documentation
From Zero to Hero
Catsoft Works
Table of contents
1. Game Creator 5
1.3 Characters 14
1.4 Cameras 47
2. Inventory 734
3. Dialogue 881
4. Stats 921
5. Quests 983
6. Behavior 1044
6.5 GOAP 0
6.6 Utility AI 0
6.8 Releases 0
7. Perception 0
7.1 Perception 0
7.2 Setup 0
7.3 Awareness 0
7.4 Sensors 0
7.5 Luminance 0
7.6 Camouflage 0
7.7 Obstruction 0
7.9 Evidence 0
7.12 Releases 0
8. Shooter 0
8.1 Shooter 0
8.2 Setup 0
8.3 Weapons 0
8.4 Sights 0
8.5 Ammo 0
8.6 Reloads 0
8.7 Wind 0
8.9 Usage 0
8.11 Releases 0
9. Melee 0
9.1 Melee 0
9.2 Setup 0
9.3 Weapons 0
9.4 Shields 0
9.5 Skills 0
9.6 Reactions 0
9.7 Combos 0
9.8 Input 0
9.9 Targets 0
9.11 Releases 0
10. Traversal 0
10.1 Traversal 0
11. Extensions 0
11.2 Transitions 0
11.3 Localization 0
11.4 Addressables 0
11.5 Footsteps 0
1. Game Creator
Game Creator 2
Acronym
Game Creator is the perfect tool for both beginners and experienced users.
• Newcomers will find an easy-to-use tool with a very smooth learning curve, thanks to the small amount of
concepts one has to learn in order to get started.
• Experienced users will find that these small set of tools have a lot of depth and can be synergically used
to create any mechanic with ease, while favoring quick iteration.
Game Creator also has a very straight-forward API for programmers, from which they can extend the tools with
new features and seamlessly integrate them with the rest of the ecosystem of tools. Level and art designers
can quickly test their environments, creating a playable character and a camera type that fits their game with
just a couple of clicks. And game designers will be delighted with a plethora of tools that they can use and
exploit to create intrincate game mechanics.
The easiest way to start learning how to use Game Creator is to jump to the Getting Started section. It
overviews everything you need to know to get up to speed and assumes you have no technical knowledge. It also
contains links to other learning resources from where to learn more.
The Game Creator package comes with a slew of tools that help you very easily make the game of your dreams.
These tools have been carefully crafted to be as flexible and intuitive as possible. Each tool takes care of
dealing with the heavy-math under the hood and present it to you in a very human-friendly form, so you can
focus on what really matters: Making games.
• Characters: Characters are entities living in your scene. These come loaded with common features, such as
inverse kinematics, obstacle avoidance navigation, user input, jumps, footstep sound effects and animation
systems.
• Cameras: Cameras allow to control how your game is framed. From an orbiting third-person perspective with
zoom and geometry clipping avoidance to more traditional fixed camera angles, top-down perspectives or
first-person views.
• Visual Scripting: Visual Scripting in Game Creator is very unique: Instead of using a typical node graph, it
borrows the concept of task lists. This makes it really easy to read, organize and keep all interactions
under control without the project quickly becoming a spaghetti mess.
• Variables: Variables allow to keep track of the game's progress and storing it when the user saves the game.
More tools
Game Creator comes with more tools than the aforementioned above. However, we recommend beginners focus on
understanding these first. Experienced users and programmers can jump to the Advanced section to know more about
the rest.
1.1.4 Modules
Game Creator is built to be extremely flexible and extensible. Modules are add-on packages that extend the
features provided even further. For example, the Inventory module allows to easily define items with different
properties, which can later be equipped, consumed, crafted, dropped, sold, bought or stored in chests.
• Inventory: Manage and equip items, craft new ones and trade them with other merchants.
• Stats: Make complex RPG interactions with intertwined stats, attributes and status effects.
• Quests: Keep your game's progress and lore under control with a mission manager.
• Behavior: Easily manage character's AI using Behavior Trees and other mechanisms.
• Perception: Allow entities to use sight, smell or hearing to understand the world.
• Melee: Define close quarter combat mechanics with parries and combos.
• Traversal: Give characters the ability to climb and other traversing skills.
Modular synergy
Modules do not just extend Game Creator's capabilities, but can also communicate with other Modules. This allows
to intertwine their features and develop even more complex game mechanics.
A very common case is using the Dialogue module along with the Stats. The first one allows to easily manage
conversations between characters, where the player is prompted with choices and characters react to these. The
Stats module, on the other hand, allows to define RPG traits to objects.
By combining these two modules you can create more interesting mechanics, such as displaying an option during a
conversation with a character, where trying to intimidate it will only yield in success if the player has a
certain stat (for example strength ) above a certain value.
1.1.5 Documentation
If you're reading this from a PDF file, make sure you're reading the latest version of the documentation.
Click Download PDF to get the latest version.
However, we recommend you read this documenation from the website itself, which contains GIFs, higher quality
images and better navigation options. PDF should only be used as an offline alternative.
documentation structure
1. The top navigation shows a list of all the available Modules with their own documentation.
3. The left side-bar shows the current page you are reading.
4. The right side-bar shows the table of contents of the current page.
Game Creator 2.0 is not compatible with Game Creator 1.x because its code base has been re-architectured.
However, most concepts are identical or very similar.
Each module has one or multiple pages dedicated to the description of what each sub-system does, with clear
examples, tips and tricks. Moreover, for those who want to go one step further, all sub-systems have an
Advanced chapter with more technical details on how it works and how it can be extended through the exposed
scripting API.
1.1.6 Errata
If you find a mistake or omission in the documentation, please send us an email at [email protected] with a
link to the relevant entry and an explanation what you think is wrong. We'll take a look and make any
necessary updates.
Welcome to the Getting Started section. Here you will find all necessary resources to get you started with
Game Creator.
• Installation: Learn how to install Game Creator from the Unity Asset Store.
• First Steps: Get to know the basic first steps towards using Game Creator.
Once you are comfortable with the core concepts, we recommend checking the Examples that come with Game
Creator and the free Courses available on the website. If you prefer to learn in non-written format, you can
also check our Youtube channel, where we upload new video tutorials.
• Video Tutorials: A collection of courses you can take at your own pace.
We also recommend checking out the Game Creator Hub: It's a community-driven platform where anyone can
download further free Instructions, Conditions and Events.
• Game Creator Hub: Explore how the Hub can help you connect with other developers and expand the tools at
your disposal.
1.2.2 Installation
This guide explains how to set up your Game Creator project from scratch. It includes information about
prerequisites, installing the package, creating an initial workspace and verify your setup.
Start by downloading the Unity Hub software and install the latest Unity version. Create a new blank project
and choose the rendering pipeline that suits you best.
Rendering Pipeline
We recommend using the Built-in Rendering Pipeline (BRP) if it's the first time you're using Unity or you just
want to try out Game Creator. If you want to use URP or HDRP, convert the materials automatically clicking on
Edit Rendering Materials Convert all built-in materials to URP/HDRP.
Get the Game Creator core package from the Unity Asset Store following the link below:
Once you have purchased it, click on the "Import" button on the website and the Unity Editor's Package Manager
window should appear with the Game Creator package selected. Click on Download and Import afterwards.
Package Manager
Let the process complete and if everything went fine, your console shouldn't have any errors. If you do,
please feel free to reach out to our support email.
Verify installation
If you have successfully installed Game Creator you should see a new "Game Creator" menu at the top-toolbar
with a set of options. You'll also have access to a new "Game Creator" section right clicking on both the
Hierarchy panel and the Project panel.
We highly recommend using GitHub or GitLab for backing up your projects. If you use Git as your main
repository source be sure to add the following snippet at your .gitignore file:
# Game Creator
/Assets/Plugins/GameCreator/Documentation.pdf
/Assets/Plugins/GameCreator/Packages
This willl avoid adding the offline documentation file to your git repository as well as the examples & code
from the Game Creator asset. The reason why the code can be ignored is that it can be easily downloaded from
the Asset Store. If you prefer to save a local copy of the current version of your Game Creator package, skip
the last two lines and only include the following on your .gitignore file:
# Game Creator
/Assets/Plugins/GameCreator/Documentation.pdf
In this section you'll learn to setup a very simple example that uses some of the core features of Game
Creator. It shouldn't take you more than 5 minutes to have it up and running.
Let's start creating the geometry that will hold the scene. Right click on the Hierarchy Panel and select 3D
Object Plane. This is going to be the floor.
If the scene doesn't have a light, create one right clicking again on the Hierarchy Panel and select Light
Directional Light and place it somewhere that shines downwards towards the plane.
Finally, if the scene doesn't have a camera object, create one clicking on the Hierarchy Panel and select
Create Camera. Select it and, in the upper-part of the Inspector window, change its tag from Untagged to
MainCamera . You should also change the camera's position and rotation so it points towards the center of the
plane, in order to visualize what happens in it.
Geometry Setup
To create a player character, open the Hierarchy Panel context menu and select Game Creator Characters
Player. This should have created a character object in the scene in T-pose. If you click play, you should be
able to control the default player using the WASD keys or a controller, if you have one plugged in.
Player Setup
Creating a camera
Game Creator uses Camera Shots to tell the main camera how to behave and which target/s to follow. The easiest
way to follow the player character is to use the Third-Person camera shot, which automatically orbits around
the player using the mouse's movement and allows to zoom in/out.
To create a Camera Shot open again the Hierarchy Panel's context menu and select Game Creator Cameras
Camera Shot.
Creating a new Camera Shot will automatically add the Main Camera component on the scene's main camera, if any at
all. If the main camera doesn't have any Camera Shot assigned, it will assign this newly created shot.
The default Camera Shot is the Fixed one. However, we want to use the Third-Person Orbit shot. To change the
type of camera shot, click on its name and select Third Person from the dropdown menu.
New options should appear now. We need to specify the target at which the camera will look at and orbit
around. In both cases, this is the Player, so choose the "Player" option from the Look Target and Orbit Target
fields.
Enter Play-Mode and you should be able to move the player like before, but the camera should also track it and
orbit around it using the mouse or controller's right stick.
Complete Setup
Next Steps
Check out Game Creator's free courses for more step-by-step tutorials
1.2.4 Toolbar
Since version 2.3.15, Game Creator comes with a dockable Toolbar that can be used to create common components
in the scene view.
Display Toolbar
If the Toolbar is not displayed by default, focus on the scene view and right click on the top tab and select
Overlay Menu. This will pop a vertical menu that allows to show/hide different toolbars. Click on Game Creator to
enable its visibility.
Show Toolbar
The toolbar can be docked as any other toolbar. Simply drag the handles and drop them on any corner or edge.
The orientation can also be changed to fit the position. To do so, right click the handles and select one of
the following options:
• Panel: Displays an horizontal stripe with the name and icons for each button
Tooltips
We recommend using either Horizontal or Vertical layouts. Hovering over any of the icons will display a small
tooltip with a description of what that button does.
1.2.5 Examples
Game Creator comes packed with a collection of examples that have been carefully hand-crafted to speed up your
development process even further with common mechanics. You can think of them as templates of game mechanics
you can use for your projects.
To install an example, head to the top toolbar and click Game Creator Install.... A window will appear with
a collection of available examples to install. Select one that you want to add and click Install.
Install Window
Dependencies
An example may or may not have a list of dependencies. The Install window will display a green icon if the
example dependency is installed or a red icon if it is not. Installing a module with dependencies will install
and update all dependencies.
Once you do that, the example will appear under Assets/Plugins/GameCreator/Installs/ or you can simply click the
Select button to automatically select the example's folder.
Example Path
When installing an example, it is located at the Plugins/GameCreator/Installs/ directory. The name of the example's
folder is the [name of the module] followed by a dot, the [name of the example] followed by an @ (at) symbol and the
version number. For example, Game Creator's Example 1 with version 1.2.3 will be located at: Plugins/GameCreator/
Installs/[email protected]/ .
Uninstalling an Example
If you want to uninstall an example, simply delete root folder of the example. For instance, if you installed
a Game Creator example called "Example 1", you can right click the folder at Assets/Plugins/GameCreator/Installs/
[email protected]/ and choose Delete. This will permanently delete the example from your project.
However, you can still reinstall it again from the Install window.
1.3 Characters
1.3.1 Characters
One of Game Creator's main systems is the Character. It represents any interactive playable or non-playable
entity and comes packed with a collection of flexible and independent features that can be used to enhance and
speed up the development process.
Main Features
A Character is defined by a Character component that can be attached to any game object. It is organized into
multiple collapsable sections, each of which controls a very specific feature of this system.
• Player Input: An input system that allows to change how the Player is controlled at any given moment.
Including directional, point & click, tank-controls, and more.
• Rotation Modes: Controls how and when the character rotates. For example facing the camera's direction, its
movement direction or strafing around a world position.
• World Navigation: Manages how the character moves around a scene. It can use a Character Controller, a
Navigation Mesh Agent, or plug-in a custom controller.
• Gestures & States: An animation system built on top of Unity's Mecanim which simplifies how to play
animations on characters.
• Inverse Kinematics: An extendable IK system with feet-to-ground alignement or realistic body orientation
when looking at points of interest.
• Footstep Sounds: A very easy to use foot-step system that mixes different sounds based on the multiple
layers of the ground's materials and textures
• Dynamic Ragdoll: Without having to configure anything, the Ragdoll system allows a character to seamlessly
transition to (and from) a ragdoll state.
Player Character
The Player character uses the same Character component as any other non-playable character but with the
difference that it has the Is Player checkbox enabled. A Character with this option enabled processes the
user's input based on its Player section.
There can be only one Player character per scene. You can use the Change Player instruction to change who the
Playable character is, but at any given time, just one Character might have the Is Player checkbox ticked.
Shortcut Player
Note that when creating a Player game object from the Hierarchy menu or the Game Creator Toolbar, it ticks the Is
Player checkbox by default.
1.3.2 Component
The Character system is built using a single component called Character component and handles everything a
character can do; From playing animations to footstep sounds, modifying animations though inverse kinematics
and much more.
Character Component
General Settings
This block includes the big mannequin icon and two fields:
• Is Player: Determines whether this character is a Player character or not. A Player character processes
input events and makes the character respond accordingly.
• Update Time: Indicates whether the character should work with the internal game's clock the real-life clock.
Character Component
By default all characters should use the game's clock. Setting the game's time scale to zero will freeze the
game, which is useful for pausing it. However if your game has a mechanic where a character ignores the time
scale, you can use the unscaled real-life clock.
The mannequin icon isn't just an aesthetic ico, but a debugging tool. When the game is running, the icon will
change into a green colored one and will turneach of its limbs red every time the character performs a
blocking action that prevents that limb from doing something else. For example, performing a jump makes the
legs be busy for a little less than a second, as well as landing.
The mannequin icon will change into a red skull when the character is considered dead.
Kernel Settings
This block is the most important one. A Character behavior is divided into 5 main categories (known as Units)
and each one can be changed individually without affecting the rest.
Names
This settigs block is called the Kernel of the character and each individual row is called a Control Unit or Unit
for short.
Character Component
To change each type of Unit click on the right-most icon of each and choose the implementation you want.
Clicking on the name of the Unit will expand/collapse its available options.
Game Creator comes with a collection of Units so you can customize how you want your characters to work. However,
these lists are not fixed and can be extended via code. As Game Creator grows, so will the amount of options
available. If you are a programmer you can create Unit that integrates a third-party character system. To know
more about extending the Character component see the Character Controller section.
PLAYER
The Player unit controls how the character is controlled by the user. It only affects the character if its
Is Player checkbox is enabled. Game Creator comes with a bunch of different Player units the user can choose
from:
• Directional: The character moves relative to the main camera's direction and reacting to the keyboard's WASD
keys or any Gamepad's Left Stick. This is the most common control scheme for most games.
• Point & Click: The character moves towards the point in space click with the mouse cursor. If the Driver is
set to Navigation Agent, the character will try to reach the clicked position avoiding any obstacles along
its path.
• Tank: Pressing the advance key will make the character move forward in their local space, regardless of the
main camera orientation. This option requires the Tank option as its Rotation unit.
MOTION
The Motion unit defines a character's properties and what it can or can't do. It comes with a list of options
that can be modified both in the editor and at runtime.
Singular Unit
Game Creator comes with just a single Motion unit called Motion Controller. Unless the character is implementing
a custom character controller, the Motion unit shouldn't be changed to anything else.
Character Component
• Speed: The maximum velocity at which the character can move. In Unity units per second.
• Rotation: The maximum angular speed at which the character can rotate. In degrees per second.
• Radius: The amount of space the character occupies around itself. In Unity units.
• Gravity: The pull force applied to the character that keeps it grounded.
• Use Acceleration: Determines if the character accelerates/decelerates when moving. If set to false, the
character will start moving at full speed.
• Acceleration: How fast the character increases its velocity until it reaches its maximum speed.
• Deceleration: How fast the character decreases its velocity until it stops.
• Air Jumps: The number of double jumps the character can perform in mid-air. Most games allow zero or up to
one air-jump.
• Jump Cooldown: The minimum amount of time that needs to pass between each successive jump. Useful to prevent
the user from spamming jumps.
The Motion unit also has the Interaction section at the bottom, which allows to configure how the character
can interact with elements from the scene.
DRIVER
The Driver unit is responsible for translating the math of the processed motion data into actual movement.
Depending on the controller type the character will move slightly different.
• Character Controller: The default unit. It uses Unity's default Character Controller which provides a
versatile controller which should work fine for most cases.
• Navmesh Agent: It uses Unity's Navmesh Agent as the character controller. It allows to avoid obstacles when
moving a character to a point in space but has the con that prevents the character from being able to jump.
• Rigidbody: It uses Unity's Rigidbody component so the character is affected by external forces using Unity¡s
Physics Engine.
Axonometry Settings
Since version 2.9.36 the Driver unit comes with an Axonometry field that allows to post-process the character
movement and constrain by some rules. These rules can be:
• Side-Scroll XY: The character can only move within the X axis and gravity affects the Y axis. Locked on zero in Z
axis.
• Side-Scroll YZ: The character can only move within the Z axis and gravity affects the Y axis. Locked on zero in X
axis.
• Isometric 8 Directions: The character can only move around the XZ plane in multiples of 45 degrees.
• Isometric Cardinal: The character can move north, south, east and west.
• Isometric Ordinal: The character can move in diagonals from world-space perspective.
ROTATION
The Rotation handles how the character rotates and its facing direction at any time. There are multiple Units
available by default although the most common one is the Pivot.
• Pivot: The character rotates towards the direction it last moved to.
• Pivot Delayed: Very similar to Pivot but the character waits a few seconds before it starts rotating towards
the direction it's moving. This option looks best for slow-paced movements, like walking slowly, sneaking or
crawling.
• Look at Target: The character always faces towards an object in the scene and wil strafe when moving
sideways relative to the object. This option is most used when locking onto enemies.
• Object Direction: The character faces the direction of another object. This is mostly used third and first
person shooting games where the character must look straight towards where the camera aims so the weapon's
direction is aligned with the camera's point of view.
• Towards Direction: The character faces a 3D world-space direction. Mostly used in games on-rails or infinite
runners.
• Tank: The character pivots around itself when pressing the specified buttons.
Switching at Runtime
It's important to highlight the fact that these options can be changed at runtime. For example, the player can
use the Pivot unit when wandering the world but switch to a Look at Target unit when encountering an enemy. The
character will seamlessly transition between them.
Axonometry Settings
Since version 2.9.36 the Rotation unit also comes with an Axonometry field that allows to post-process the
character rotation and constrain it by some rules. These rules can be:
• Isometric Cardinal: The character can rotate towards north, south, east and west.
• Isometric Ordinal: The character can rotate in diagonals from world-space perspective.
It's worth noting that both Driver and Facing Axonometry values should match for best results.
ANIMATION
The Animation unit controls how the character model moves as a reaction of any internal or external stimulus
and also manages the representation of the character's 2D or 3D model.
Character Component
Just like the Motion unit, there is one single Animation unit option available called Kinematic which controls
any generic character model's animations. There are different configuration blocks within the Kinematic
animation unit:
• Position: Determines the local position of the mannequin inside the Character component. Rotation and Scale
also change the transform of the mannequin in local space.
• Smooth Time: Determines how long it takes to transition between most character's animations, in seconds.
Higher values make transitions look smoother but also take longer and feel less responsive. Lower values
closer to zero make the character feel more responsive but also snappier.
• Mannequin: A reference to the intermediate game object between the root Character and the 3D model.
The character's model Animator component should use Game Creator's Locomotion runtime animator controller or a
custom controller that follows the same parameter names. To use a custom runtime animator controller it is
necessary to implement a custom IAnimim unit (see Character Controller for more information).
• Start State: Optional field that allows to set an initial character State. The starting state is set to
layer number -1.
• Reaction: An optional field that determines the default hit reaction for Shooter and Melee modules.
Combining the breathing and twitching systems allows using single-frame still poses feel like fully-fledged
animations, thanks to the additive breathing and twitching animations. In fact, Game Creator's default idle poses
have a duration of a single frame. It's the twitching and breathing animations that make the pose look like it's
real.
Extra Settings
The Character component has 3 extra sections at the bottom of the component which allow to control more
specific parts of the character.
INVERSE KINEMATICS
Inverse Kinematics (IK for short) allow characters to change their bone rotations in order to transform the
overall structure and reach with the tip a targeted position and rotation. A common use of Inverse Kinematics
is making sure the character correctly align their feet to the steepness of the terrain.
Character IK
Game Creator allows to dynamically add or remove new IK systems onto each character individually and are
processed from top to bottom. To add a new IK system simply click onto the "Add IK Rig Layer" button and
select the option you want from the list.
Custom IK Rigs
You can also create your own custom IK systems. Check out the Custom IK section for more information.
The Character component comes with some common IK systems used on most games:
• Look at Target: This IK system allows characters to slightly rotate their head, neck, chest and spine chain
in order to look at a specific point of interest. This is specially useful when paired with the Hotspots
component. Requires the character model to be Humanoid.
• Align Feet with Ground: This IK system allows a character to automatically detect when the character is
touching the ground and smoothly align their feet with the inclination of the ground. It can also lower the
position of the hip so both feet touch the ground, in case the ground is very steep and one foot is higher
than the other.
FOOTSTEPS
The Footstep system allows the character to signal when it has performed a step. This is useful when you want
a character to leave a trail of footprints, play some particle effects simulating the dust of each step or
playing a sound effect.
Character Footsteps
The Footstep system doesn't require the character model to be humanoid. It uses an array of objects that identify
the character's feet bones. By default it assumes the character is a human and has two feet, but this can be
easily customized clicking on the "Add Foot" button.
• The Sound Asset field references a Footstep Sounds asset that determines which textures play which sound
effects. For more information about how to configure this asset see Footstep Sounds section.
The Footstep Sounds does not play the raw step sound effect but automatically distorts it in order for the player
to hear different slightly different sounds each time. It also changes the pitch of the sound if there are
multiple layers of textures, muffling those that are less prominent.
A Character's footsteps are determined by the feet phases (when the character touches ground with their feet).
These values are driven by animation curves. If you want to use custom animations, you can download and use for
free a custom tool for assigning feet phases clicking here.
RAGDOLL
The Character component comes with a built-in Ragdoll physics system that allows to quickly turn any character
into an inanimate object that reacts to physics with a set of constraints on each of its limbs.
Character Ragdoll
Skeleton asset
The Ragdoll system uses the Skeleton configuration asset to determine which parts of the model correspond to
which bone. It can't work without one.
• Transition Duration: When a character recovers from a ragdoll state, it plays an animation based on the
direction its body faces. This field determines the time it takes to blend between the ragdoll position to
the animation clip being played when recovering.
It is recommended to use large transition values, above 0.5 seconds. The character's limbs can be in very awkward
positions that doesn't match the initial pose of the recovery animation clip; so having small transitions will
make the character appear to snap into an animation, instead of smoothly blending into it.
• Recover Face Down: The recovery animation played when the root of the character's ragdoll faces downwards.
• Recover Face Up: The recovery animation played when the root of the character's ragdoll faces upwards.
1.3.3 Animation
Animation
Game Creator has a built-in custom animation system built on top of Unity's Mecanim that makes it easier and
faster to manage character animations.
It introduces the concept of Gestures and States, which are two mechanisms that allow to play different types
of animations without having to previously register them inside an Animator Controller graph.
It is preferable that users use the Gestures and States system to manage and play all their animations. However
if a user prefers to use a more traditional approach, there's a base Mecanim layer that allows to use Unity's
runtime controller workflow. Check the Animator section to know more about this.
Animation Flow
Gestures are animations that are played once and are removed from the animation graph when finished. For
example, an animation of a character throwing a punch can be played as a Gesture; This will make a character
play the punch animation and smoothly restore its previous animation after the animation finishes.
States are animations that are played on a repeating loop. For example, a character sitting on a chair is an
Animation State while a character moving crouched is a Locomotion State.
• Animation States play a single animation clip over and over again, until told to stop.
• Locomotion States are more complex states that react to certain parameters such as character speed. Can have
multiple clips transitioning and blending with each other.
Click on Gestures and States to know more about how to use them in your game.
Animator
Character components reference a child game object called the Model which contains an Animator component. This
component must referece a Runtime Animator Controller graph, that determines which animations are played when
and how these transition between them.
CUSTOM MODEL
Game Creator makes it very easy to change the 2D or 3D model from a character. All that needs to be done is to
open the Animation section of the Character component and drag and drop the Character prefab onto the
indicated drop zone.
To change the character model at runtime use the Change Model instruction.
Game Creator comes with a default Runtime Animator Controller called the Locomotion controller. It comes
packed with a collection of animations and features that fit most projects.
It is not recommended modifying the Locomotion controller. In most cases using a custom State is easier and
provides enough flexibility to create new simple or complex locomotion animations.
However if you need to use a custom Runtime Animator Controller you must also creata new class that implements
the IAnimim interface to feed the Character's data onto your custom controller. See Character Controller section
for more information.
Gestures
The Gesture system allows characters to play a single animation that stops after it finishes. This is
specially useful for animations such as a character throwing a punch, vaulting an obstacle or waving a hand.
PARAMETERS
The easiest way to play a Gesture animation is using the Play Gesture instruction, which has a few
configuration parameters.
It may seem a bit overwhelming the amount of parameters available for a single animation. Note that the most
important ones are the Character and Animation Clip fields. The rest can be left with their default values and
should work on most cases.
Character
The Character field determines the object that the animation clip will be played. The game object referenced
must contain a Character component in order to work. Otherwise the instruction will be skipped.
Animation Clip
The Animation Clip references an animation asset. Without this field the instruction will not work.
Avatar Mask
The Avatar Mask is an optional field that determines which parts of a character will play the animation and
which won't. If this field is left empty the whole body will play the animation. For more information about
masking animations, see the Unity documentation about Avatar Masks.
Blend Mode
The Blend Mode field determines whether the animation clip overrides or adds up its movement on top of any
other animations being played.
• Blend: The default parameter. Blend overrides any animations and plays the animation clip on top of them.
This is the most common option for most animations.
• Additive: This blend mode allows to play an animation by adding up the motion on top of any other clips
being played.
Delay
The Delay field allows to start playing the animation after a certain amount of seconds have passed. If the
value is set to zero the animation will start to play immediatelly.
Speed
The Speed field is a coefficient that determines the speed at which the animation is played. A value of 1
plays the animation at its original speed. Higher values will play the animation faster while lower ones will
play the animation slower. For example a value of 2 will play the animation twice as fast.
Root Motion
Determines whether this animation should take control over the character and use its root motion to also move
and rotate it. Notice that using root motion takes control of the character while the animation plays and the
user's input will be ignored.
Transitions
The Transition In field determines the amount of seconds the animation will take to blend between the current
animation and the new Gesture animation clip.
Similarly, the Transition Out field determines how much time, in seconds, it takes to blend out the current
gesture animation to the animation being played underneath.
Wait to Complete
The Wait to Complete checkbox allows the instruction to be put on hold and only continue once the animation
finishes. This is specially useful when chaining multiple gestures one after another.
About Instructions
For more information about how to use instructions to interact with other systems, see the Visual Scripting
section.
States
The States system allows to dynamically blend in/out arbitrary animations or entire animator controllers at
runtime. All that needs to be done is to specify which animation or controller a character should play, and
which layer should it be assigned to.
Mecanim vs States
It is important to note that the States system is built on top of Unity's Mecanim and it complements it; It does
not prevent or restrict from using any of its features. It simply adds a new and more flexible workflow on top of
it.
TYPES OF STATES
There are primarily two types of States, but both work the same way: An instruction feeds a State to a
Character and this one plays the animation/s based on the behavior of the State.
Animation States
Animation States are single animation clips that are played over and over again, until told to stop and blend
out.
For example a character playing a single looped animation of sitting on a chair is an Animation State. These
are the most common and basic forms of States, where an Animation Clip must be provided and the Character
plays it in a loop.
It is also possible to create an Animation State asset that allows to play a looped animation as well as
providing a fields for gestures that are played when entering and exiting the State. To do so, right click on
the Project Panel and select Create Game Creator Characters Animation State and drop the Animation Clip
file onto the corresponding field.
The State Clip field determines which animation is played in a loop, while State Mask discerns which body
parts are affected by the animation. Note that this last field only works with Humanoid characters. See Avatar
Mask for for information about masking animations.
The Entry and Exit sections contain optional fields that allow to play a Gesture right before entering or
exiting the current State. For example, you may want a character to play the unsheathe sword animation every
time it enters a sword combat stance, and play the sheathe animation when exiting the combat stance state.
On Refresh Instructions
Since version 2.5.20 there's an Instruction list at the bottom of any State asset called On Refresh. These
instructions are called in order, from the lowest Layer to the upper-most one, any time a Character adds or
removes a State.
Properties
Since version 2.9.34 each State contains a Properties section that allows to modify common values from a
Character, such as its linear and angular speed, jump options, gravity, etc...
This allows to change the move speed from within the State itself. For example, let's say we have the following
States:
The "Running" State properties will be called first, and afterwards the "Walking" State, because it's on a
greater layer number. The second State will override the player's movement speed and set it to 5.
Removing the Walking State will run again the Properties values. However, this time, only the Running State
properties are called, and thus the player's speed will be set to 10.
Locomotion States
These are more complex States that react to certain parameters such as the speed of a character, its direction
and fall velocity. Locomotion States have multiple clips transitioning and blending with each other.
For example a character that idles in a prone position and crawls when the character moves is a Locomotion
State.
To create a Locomotion State, right click anywhere on the Project Panel and select Create Game Creator
Characters Locomotion Basic State or Create Game Creator Characters Locomotion Complete State.
The Locomotion State asset may seem a bit daunting at first, but it's fairly straight forward. There are two
types of Locomotion States and those are:
• Basic States: Have an idle and an 8-axis directional animation clip fields for moving
• Complete States: Have an idle and a 16-axis directional animation clip fields for moving: 8 for moving at
half speed and another 8 for moving at full speed.
The first fields, Airborne Mode, controls the amount of animation clips available and can take one of the
following values:
• Circular 8 Point: Displays animation clip fields for the 8 cardinal directions: Forward, Backwards, Right,
Left and each of the diagonals.
• Circular 16 Points: Displays animation clip fields for the 8 cardinal directions, and another 8 for half-way
points between the first and the origin.
8 Points vs 16 Points
This decision comes down to the type of controller and animations available. If your game is meant to have
analogic controls, the user might slightly push the movement joystick forward, making the character move slow. In
this case, it is recommended using the Complete Locomotion State, as it allows to have both running and walking
animations in a single State.
LAYERS
The States system is built around the concept of Layers, which is similar to the concept found in image
editing tools, such as Photoshop. The idea is that any State is assigned a layer number. With higher numbers
taking higher priority when playing an animation.
Example
Let's say we have a character with three Layers, each one with a single State, numbered 1, 2 and 10 respectively.
In this case, the animation played would be be the one found at the layer number 10. However, if this layer was
to be removed, the animation at layer 2 would be the next one with highest priority and thus, its State would be
played.
It is recommended to add a transition time when adding or removing a State from a Layer in order to smoothly
blend between the new animation and the one underneath.
When adding a new State onto a Layer that already has a State, this last one will be smoothly faded out taking
into account the new State's transition time, until it is replaced by the new one. After that happens, it will
be automatically disposed.
Note that although States can have different priorities, a Gesture animation will always have higher priority
than any State and will play on top of it.
WEIGHTS
Setting a new State is not an all-or-nothing operation and the new animation can be blended by a percetage
with any other animations playing underneath the stack.
For example, if a character is currently playing a running upstraight animation, a running crouched animation
can be blended at 50% to to make the character look like it's running halfway between standing and crouched.
Weight at runtime
The weight can be modified at runtime using the Change State Weight instruction.
ENTERING A STATE
The easiest way to make a character enter an Animation or Locomotion State is using the Enter State
Instruction.
The Character field references the targeted character game object that enters the state. The State Type field
determines whether the State is an Animation Clip, a State asset or a Runtime Animation Controller.
Game Creator allows to use a Runtime Animation Controller as a State. However, this is an advanced feature and
should only be used if one understands how Gestures & States work under the hood.
The Layer field allows to determine which layer this State occupies in the Character's layer stack. Blend Mode
by default is set to Blend, which overrides the underlying animation with the animations provided by the
State. If set to Additive it adds up the new State's animation as a delta movement on top of any other
animation being played.
The Delay field allows to delay in a few seconds the time to start playing the State. Speed is a coefficient
value that determines how fast the State plays. For example, a value of 1 makes the State play its animation
at its default speed. A value of 0.5 plays the animation at half speed and a value of 2 plays it twice as
fast.
The Weight field determines the opacity of the State. A value of 1 plays the animation as it is. Lower values
allow any previous animations to bleed through and mix the effect between the new State and any other
animation being played in lower layers.
The Transition field is the time in seconds that the new State takes to fade in.
EXITING A STATE
The instruction Stop State can be used to smoothly stop playing a State on a character.
The Character field determines the targeted game object that stops playing a State found at the layer
identified by the Layer number field.
Similarly, the Delay and Transition fields allow to delay the fading of the State by a certain amount of
seconds.
Inverse Kinematics
Inverse Kinematics (IK for short) is the process of calculating the rotation of bones from a chain of bones,
in order for the leading one to reach a desired position. Game Creator makes use of both limbic and full-body
IK.
Character Feet IK
A common case scenario is adjusting the bending of the knees so the character naturally plants its feet on the
ground.
MANAGE IK RIGS
The Character component has a section at the bottom that allows to manage which rigs affect the character and
change their properties.
Character Feet IK
The IK Rigs are excuted from top to bottom. So if two IK systems affect the same bone chains, the last rig will
override any previous ones.
To add a new Rig, click on the Add IK Rig button and choose one from the dropdown list.
RIGS
Game Creator comes with a few IK rigs that work out of the box:
• Look at Target: Allows a Character to use the Look At system from Hotspots.
Feet Align
This IK Rig allows a character to plant their feet and adjust the rotation on uneven terrain. This rig also
allows the hips to be lowered by a certain amount if the height difference between both feet is very large.
Character Feet IK
• Foot Offset: An optional vertical offset applied to each foot. This is useful in cases where the foot
penetrates the ground or floats above it, due to differences between the bone's tip position and skin mesh
bounds.
• Foot Mask: Allows to choose which Layers should the character consider when aligning with ground. For
example, water typically has a collider component, but the character should not align its feet on its
surface.
Look at Target
The Look at Target rig allows a character to rotate their head, neck, chest and body in order to look at a
Hotspot.
Character Feet IK
• Track Speed: The angular speed at which each bone rotates to track the target. In degrees per second.
• Chest Weight: The contribution of the chest to the total rotation. Note that the Chest is an optional bone
and some models may not have it.
• Spine Weight: The contribution of the spine bone to the total rotation.
Default values
The default parameters have been carefully picked to work for the majority of human-like characters.
Game Creator's characters can mix and play multiple sound effects depending on the type of ground it's
stepping on.
This system works for humanoid and non-humanoid characters alike. Though humanoids don't require any kind of
setup and work out of the box.
Detecting Steps
The Footstep System (also known as Phases system) uses Animation Curves to detect when a Character has one of
its limbs in contact with the ground and when it does not.
This system plays a role in other systems, such as correctly aligning the feet when standing on uneven
terrain, or detecting when the character takes a step, and plays a tiny dust particle and sound effect.
The Phases system supports up to 4 different phases, although humanoids only require 2 (one for reach leg).
By default, a Humanoid character has the following curve names assigned to each leg:
A non-humanoid character can also define the Phase-2 and Phase-3 if necessary.
Game Creator animations contain the phase curves already set up for you. However, if you plan on using your own
animations, you'll need to set them up by editing the Animation Clip and adding the Phase-0 and Phase-1 curves.
The phase curves are evaluated at runtime depending on the animation(s) being played at that time. If the
value of a phase is zero means the limb is currently not touching the ground and is high up in the air. On the
other hand, if the curve has a value of one, it means the limb is currently planted on the ground.
The Footstep Sounds system comes with a built-in tool for playing different sounds and sound variations
depending on the surface the character is stepping onto. To create a material sound library, right click on
the Project Panel and select Create - Game Creator - Common - Material Sounds .
The Material Sounds asset allows to define which textures produce which sound effects. Each texture can have
multiple sound effects, which will be picked up randomly every time the character takes a step.
Note that although it's completely random, two sound effects will never be played in succession in order to avoid
repetition.
The Material Sounds asset also allows to instantiate a game object from a pool of prefabs at the impact
position. The instantiated object is aligned with the incision angle. This is very useful when spawning
particle effects of dust.
The human hearing quickly recognizes sound patterns. To avoid hearing the same sound effects over and over
again, the Footstep Sound System intelligently shifts the pitch and speed of each audio clip every time it's
played. By doing so, a single clip can be played hundreds of times with various nuances that tricks the human
hearing into perceiving each clip as a different sound effect.
Floors are not always composed of discreet materials. For example, there might be a sound effect for when the
player steps on shallow water and another one when steps on sand. However, if the character runs along the shore,
where there's a blend between the water and sand textures, the resulting sound effect is a proportional mix
between the two audio clips and their pitch is shifted to fit how real-life audio blending occur.
Drop the Material Sounds asset onto the Character's Sound Asset to link them.
Reacting to Footsteps
The Footstep system also allows Characters to react every time a step is taken. Using the On Step Trigger,
which is executed every time a defined Character takes a step. This is useful for things like leaving
footsteps behind.
1.3.6 Ragdoll
Ragdoll
A Ragdoll system lets characters react to physics and external forces without any direct input from itself.
This is commonly used for enemies that have been defeated or when the player falls unconscious due to a strong
attack or a big fall.
Character Ragdoll
A Character requires a Skeleton definition asset in order to correctly identify the size of each of its bones
and how they form the joint connection chain.
Defining all Skeleton volumes and how these relate to their parent bones is tedious and time consuming process.
Luckily Game Creator makes it very easy to automatically generate a humanoid Ragdoll asset. With the Skeleton
asset selected, drag and drop any Humanoid 3D model onto the bottom drop-zone and it will generate the structure
for you. You can then tweak the values to perfectly match your model.
To initiate a ragdoll state, simply use the Instruction Start Ragdoll and select the targeted character.
Notice that the player's input will still be in effect though. This is why Game Creator's default character
comes with 2 Triggers that make it even easier to handle Ragdolls: When a character is considered to be dead
it will automatically trigger the Start Ragdoll instruction on the character. When a character is revived, it
will also automatically handle playing the correct animation and get the character up from the floor.
This means that, in order to start and stop the ragdoll effects, all that needs to be done is to use the
Instruction Kill Character to disable any interactions from a character and it will automatically enter
ragdoll-mode. On the other hand, using the Revive Character Instruction will give back control to the
character and get it up from the floor using the correct animation.
Getting up
The character will automatically handle transitioning from its ragdoll pose to the default idle animation and
pick up the most suitable gesture, depending on whether its currently facing down or up.
To setup the getting up animations, select the Character and drag and drop the desired animations onto the
Recover Face Down and Recover Face Up clip fields.
The Transition Duration field allows to specify the duration between the time the character is not
controllable due to being in ragdoll-mode and recovered. Ideally this value will be a few milliseconds shorter
than both recover animations.
The most important part of a ragdoll is knowing the length and size of each of its physical bones and how they
interact with the rest of the body. This is done using the Skeleton asset file. To know more about configuring
a Skeleton asset and associate it with a Character, see the Skeleton section.
Skeleton
A Skeleton asset is a scriptable object asset that contains all the necessary information to identify the
bounding volume of a character's bones and how these form a chain of joints that conforms the whole body.
The Skeleton asset is used on multiple systems, such as the Ragdoll system, or the Melee and Shooter hit
detection systems.
CREATE A SKELETON
To Create a Skeleton asset, right click on the Project Panel and select Create Game Creator Characters
Skeleton.
To assign a Skeleton asset to a Character simply select the desired Character and expand the Animation tab.
Drag and drop the Skeleton asset onto its corresponding field.
CONFIGURE SKELETON
The first is a big button that allows to enter Skeleton Configuration mode. In this mode, the scene is
replaced by an empty one with a character in the middle, which can be changed by dragging and dropping a
prefab model onto the field below and clicking on the Change Character button.
The second section determines the Physical Material and collision detection mode of the rigidbody system
stemmed from the volumes.
At the bottom there's a list of all volumes set up. This list can be either manually configured or use the
heuristic creator for humanoid characters.
Readme!
To more easily configure the volumetric bounds of a humanoid character, see the next section.
Configure Skeleton
To create a volumetric bone, click on Add Volume and select the type of bone to create:
• Box: A cubic volume. Mostly used for chest and flat surfaces.
• Capsule: The most widely used volume bone. Used for most limbs.
Configure Skeleton
A Volumetric Bone is composed of a Bone Type, a volume definition and an optional Joint.
The bone type can be specified by setting the humanoid bone from a dropdown list or from a path. For example,
to reference the front right foot of a model of a Dog, the bone could be Root/Spine/Collar/Right_Leg/Right_Foot .
The volume definition depends on the type of volume created. For example, a Sphere volume bone contains a
radius and a position offset field.
The Joint field allows to determine how a bone is related to other bones via a joint system..
More on Joints
For more information about character joints, visit this Unity documentation link.
Game Creator comes with a tool that makes it much easier to automatically guess and extract the bounding
volumes of a humanoid model. To use it, simply change the character model using the Change Character button
and click on the Create Humanoid button. It will auto-magically approximate a Skeleton for you that you can
then tweak it to your game needs.
Configure Skeleton
1.3.7 Markers
A Marker is a component that is used by Characters as destination points. It allows to define a target
position and rotation so the Character is at the correct location before doing something else, like opening a
door.
A Marker has a yellow shaped arrow that indicates the direction the Character will face after moving towards
it.
Optionally, a Marker can specify a Stop Distance threshold from which a Character is considered to have
reached its destination.
By default it's zero, but if the destination is a very crowded, there might not be enough space for a
character to be at the exact marker's position. Having some error threshold allows Characters to more or less
reach their destination without getting stuck or pushing other characters around.
The Type field allows to determine how the Marker works. By default its set to Directional which forces the
character to end at the same position and rotation as the arror-shaped gizmo in the scene.
Another available mode is Inwards which tells the character to move to the closest point around a circle and
rotate towards its center. This is specially useful when you want the character to pick up an item and you
don't care from which angle it is picked up.
1.3.8 Interaction
Game Creator comes with a built-in interaction system that lets characters (both Players and NPCs) dynamically
focus on a scene element and decide whether to interact with it or not.
It's important to note that a Character that is Busy cannot interact with Interactive elements.
Character setup
How a Character interacts with scene objects is specified in the Motion unit.
Character Interaction
The Radius option determines the minimum distance an object has to be in order for the character to focus on
it.
The Mode option allows to determine how to prioritize how objects are focused:
• Near Character: Picks the closes object to the character's interaction center, which can be offset by a
certain amount. This option is best for console and games that require a controller.
• Screen Center: Interactive objects closer to the center of the screen have higher priority. This is the best
option for first person games.
• Screen Cursor: Interactive objects closer to the cursor take precendence. This option is best for point and
click adventures.
Interact
The character will automatically focus and unfocus any interactive object. To interact with the currently focused
object, use the Interact instruction.
Interactive Objects
Any game object with the On Interact event on a Trigger component will be automatically marked as an
interactive one.
This event will be fired every time a character attempts to interact with this trigger.
Trigger On Interact
If a character attemps to interact, but there is no Interactive object available, it will simply ignore the
call.
Apart from the On Interact event, one can also detect when a Trigger becomes focused or loses focus (also known
as blur). This can be tracked using the On Focus and On Blur events.
Hotspots can also display a text or activate a prefab when the game object is focused by a character. To do
so, you can add the Text on Focus spot on a Hotspot component and it will display the chosen text every time
the selected character focuses on this interactive element.
1.3.9 Busy
The Busy feature allows to query whether a specific limb of the character is being used or not. This allows
other systems to determine whether an action can be performed or not.
For example, a character that is shooting with its right hand can set its right arm as busy. By doing so you can
prevent the character from opening a door with the right hand until the right arm is available again.
Busy at Runtime
When entering Play-Mode the mannequin icon at the top of the Character component will change its color from
grey to green.
You can use Instructions and Conditions to set and retrieve the current Busy status of a Character.
Scripting
Coding Knowledge
The follow properties can be queried and inform of the availability state of the limb or group of limbs:
IsArmLeftBusy : boolean
IsArmRightBusy : boolean
IsLegLeftBusy : boolean
IsLegRightBusy : boolean
AreArmsBusy : boolean
AreLegsBusy : boolean
IsBusy : boolean
Additionally, limbs can be marked as busy or make them available using the MakeLimbXXX() method, where XXX is
the limb of the body. For example, to set the Left Leg as busy, call the MakeLegLeftBusy() method.
For more information about all the available methods on the Busy system, check the script under
Plugins/GameCreator/Packages/Core/Runtime/Characters/Busy .
1.3.10 Handles
Handles are an optional asset that can be used to determine the bone where a prop is attached to, and it's
precise position and rotation.
The Handles asset has a list that checks its Conditions from top to bottom. These conditions can determine
which location of the handle should be the most optimal.
For example, you could have a condition that checks if Self is a humanoid character or not. If it is, the prop
could be attached to the right hand (like a sword). Otherwise the prop would be attached on the beast's mouth.
Handles also help re-use the same position and rotation for multiple weapons, which comes in handy if a game
has lots of props to equip, such as swords, shields, daggers, etc...
1.3.11 Scripting
Scripting
This section covers topics that require some degree of programming knowledge and assumes certain level of
coding expertise.
Character
Game Creator Characters have been build to be easy to use and highly customizable. This section go over what a
Character does every frame cycle. This will put you in perspective in order to create a custom Character that
works with Game Creator or you want to integrate a Character system from another package into Game Creator.
KERNEL
The Character component is composed of 5 different Units which conform the Kernel. These units can be changed
at runtime without affecting the rest:
• Player: Defines whether the Character is a playable one and how the user can interact with it. If you want
to create a custom Character input system, you'll need to implements the IUnitPlayer interface.
• Motion: Acts as an interface between the scene and the Character. All movement commands are relayed through
this system and also takes into account the Player's information. It decides which locomotion system should
be used. If you want to create a different motion system for your characters, create a class that implements
the IUnitMotion interface.
• Driver: Manages how the Character moves around the scene based on the Motion's input. If you want to
integrate another Character system from another Asset Store package, create a new class that implements from
IUnitDriver .
• Facing: Is responsible for rotating the character towards a desired direction. For example, the default
behavior is to have the character look towards where it's moving. If you want to customize where the
character faces, create a custom class that implements the IUnitFacing interface.
• Animim: This system takes the Driver's input and tells the Animator component which animation should be
played via Mecanim parameters. If you want to use a custom Animator for your Character, crete a class that
implements IUnitAnimim interface.
Every new cycle tick the Character updates all these systems in a very specific order.
Character Cycle
It starts by calling the Player's system Update() method. This takes the user's input and calls one of the
Motion's public movement methods:
• MoveToDirection()
• MoveToPosition()
After the Player's system has been processed, the Character calls the Motion system's Update() method. This is
where external forces are calculated, such as gravity, sliding through slopes, dashing, jumping, ...
The Motion system takes into account the Player's system before running the update. A system can access any of
the other's systems data before processing its Update() cycle.
After the final Motion movement is calculated, the Character executes the Driver's Update() method. This is
where the Transform component is updated based on the movement type provided by the Motion parameter.
After the Driver system is completed, the Facing system starts. Based on the information provided by the
Driver and Motion systems it calculates the direction in which the Character should be facing at.
Finally, the Character system calls the Animim's Update() method, which feeds the Animator component with the
necessary parameter values based on the information of the rest of the systems.
Modular design
It is important to highlight the fact that each system is independent of the other. You can create a custom
animation system by implementing a IUnitAnimim interface and still use the default Player, Motion and Driver
systems.
Player
The Player unit handles how the user interacts with the Player character. If the Character does not have the
Is Player field checked, this unit is skipped entirely.
The Player also contains the IsControllable flag that defines whether a character processes the input received
or not. This is very useful when a character is in the middle of a cutscene and you don't want the user to
have control over the player.
Motion
The Motion unit is the brain of the character. It contains all of its quirks, such as its height, its move
speed, terminal velocity and so.
• MoveToDirection defines a direction towards where the character must go. This method has to be called every
frame or the character will stop.
• StopToDirection stops the character's movement. Useful when the character moves due to its deceleration
value.
• MoveToLocation instructs a character to move to a specific location. The Location class accepts a position
and/or a rotation.
• MoveToTransform instructs the character to move to a specific transform's position. If the transform changes
its position, the character will follow it until it reaches the target.
• MoveToMarker is similar to the previous method, but also takes into account the marker's rotation and forces
the character to end facing the same direction as the navigation marker.
• StartFollowingTarget starts following a target and stays within a minRadius and maxRadius distance.
The Motion unit is also responsible for dealing with character's jumps. The Jump() method will instruct a
character to perform a jump (or air jump), if it's possible.
Driver
The Driver unit controls how a character moves around the scene: Whether it's using Unity's Character
Controller, the Navigation Mesh Agent for obstacle avoidance or a physics-based rigidbody entity.
This unit recieves the locomotion information of Motion and Facing, and transforms it into a physical
translation and rotation.
Facing
The Facing unit controls where the body of the character (not the head) points at. By default all characters
do not rotate their body unless they are moving; in which case the body rotates towards where the character is
moving.
However, there are certain situations where the character might want to temporary face at a certain direction.
For example, when the character aims with the gun at a certain object, or when talking to a character. Game
Creator comes with a layer system that provides a neat solution for these cases.
Recommendation
If you plan on creating your own facing system, we recommend creating a class that inherits from TUnitFacing
instead of the interface IUnitFacing . This base class comes with the layer system built out of the box, so you
don't have to recode it.
The first two methods, SetPlayerDirection and SetLayerTarget allow to make the character look at a certain
direction or keep track of a particular scene object. Making the character change its default direction is
done using a layer system.
When any of these methods is called for the first time, it creates a new entry in the layer system and returns
its identifier: an integer known as key . To subsequently update a particular layer, simply pass as the key
argument the resulting key from the previous iteration.
For example, if you want to make a character look at a certain character (defined by the variable
lookAtTransform ), you'll simply need to call:
No Exceptions
It is important to note that the layer system won't throw any exceptions. If you try to attempt to delete a layer
but the key doesn't exist, it will simply do nothing.
When calling the StartFacing() method, the character will smoothly rotate towards the target defined until the
StopFacing() method is called.
However, in some cases, you may not want to manually remove the facing layer, but instead stop facing a
particular direction when the character reaches its target direction. For these cases, simply set the
SetLayerDirection method's last parameter to true . This will tell Game Creator to automatically remove the
layer when the character reaches its target direction.
For example:
Animim
The Animim unit handles everything related to the visual representation of a character: From its appearance to
its animations.
Animator required
This unit requires an Animator component reference in order to deal with animations
The default character system comes with a set of procedural animations played on top that add subtle but
consistent movement across different animations, such as breathing and exertion. The breathing rate and
exertion amount can be modified using the HeartRate , Exertion and Twitching proprerties.
CHANGE MODEL
To change a character model, call the ChangeModel(...) method. Its signature contains 2 parameters:
This last optional parameter allows to define the new model's footstep sounds, its skeleton's bounding volumes
as well as a new animator controller and an offset. For example, to change the player's model without any
optional parameters:
Custom IK
Characters in Game Creator have a layered Inverse Kinematic system that can be stack one after another in
order to modify the animation of a character. The most common form of inverse kinematics is the Feet IK, which
makes sure a character's feet are correctly placed and aligned with the floor below it.
ACCESSING A RIG
Accessing a rig is done using the IK property of the Character's component. To deactivate the rig that aligns
the feet on the ground, for example, can be done using:
character.IK.GetRig<RigFeetPlant>().IsActive = false;
Note that character.IK.GetRig<RigFeetPlant>() returns an instance of that particular rig (null if it can't be
found).
To create a new IK system you must crete a class that inherits from either TRigAnimationRigging (for DOTS) or
TRigAnimatorIK (for AnimatorIK). We recommend using the new DOTS-based approach when possible, as it's more
performant.
In either case, you should override the DoStartup(...) and DoUpdate(...) methods, which are called once at the
beginning and every frame respectively.
1.4 Cameras
1.4.1 Cameras
Cameras are devices that capture and display the world to the user. Game Creator uses two components to
determine how the action is framed:
• Camera Controllers: A component attached to the camera. For itself it does nothing but mimic the behavior
that its active camera shot feeds. By default, the Main Camera component is the primary camera controller.
• Camera Shot: A component that has multiple configurations, depending on which, its associated camera
controller will respond in one way or another.
For example, if the camera controller Main Camera has the Third Person Shot associated with it, the main camera
will mimic the behavior of that shot, which is to follow and look at a target, while the user can orbit around
it.
A camera controller can transition to another camera shot. This transition can either happen over time, or
instantly.
A Camera Controller is a component attached to a camera object that has a associated at most one Camera Shot
reference. This associated camera shot can be changed at runtime and will dictate the behavior of the camera
controller.
Main Camera
Most games will only have one single camera. The camera in these cases will have the Main Camera component
attached, which is a camera controller that can be accessed globally by any script.
To creata a main camera, right click on the Hierarchy Panel and select Game Creator Cameras Main Camera
from the dropdown menu.
Main Camera
• Game Time: Defines the time mode used to update the camera. By default it uses the Game Time option, which
can pause time when the time scale is set to zero.
• Shot: Determines the Camera Shot associated with this camera controller. If none is set, the camera won't
have any behavior.
• Avoid Clipping: Allows the camera to avoid clipping through the geometry of the scene.
The Shot's smoothing options determine how much the camera lags from the Shot's behavior. It's recommended to add
some lag to avoid any jittering. However, introducing too much lag will make controls feel a a bit unresponsive.
To transition a Camera Controller from one Camera Shot to another one, it's recommended to use the Change Shot
instruction.
Simply drop in the Camera Shot you want the Camera Controller mimic and how long should it take to transition.
Game Creator will handle the rest.
Camera Shots are components that provide the Camera Controller (or Main Camera) information about how they
should move and behave.
Think of Shots as a collecion of camera angles scattered around the scene, each trying to frame the action as
best as possible. Then you, the Director, decide which camera is visualized on the screen, for how long and when
to swap to another shot.
To create a Camera Shot right click on the Hierarchy panel and select Game Creator Cameras Shot Camera
from the dropdown menu. This will place a new game object on the scene with the Camera Shot attached to it.
If your scene doesn't have a Main Camera attached to the scene camera, creating a new Camera Shot will create one
for you and link it to the newly created shot automatically for you.
Camera Shot
A Camera Shot component contains its shot type and a collection of parameters that can be modified to fine-
tune its behavior. In the example above, the Third Person camera shot has 3 sections that allow to modify the
target tracked, whether the user should be able to zoom in/out and how the orbit should be done. Clicking on
each of these sections reveals or hides its content.
Is Main Shot
Since version 2.3.15 all Camera Shots have a toggle field called Is Main Shot.
Ticking this will allow to define it as the primary one, which can be used as a shortcut when selecting the Main
Camera Shot field drop a camera selection dropdown.
To change a camera shot type, simply click on its type name. A dropdown menu will appear from which the new
type can be selected.
Camera Shot
Camera Viewport
Since version 2.7.28 all Camera Shots come with a Viewport section that allows to customize multiple properties
of the camera when switching to the Shot, including the Field of View and the Projection mode.
FIXED POSITION
This camera shot doesn't move from its place. However, it can be instructed to keep track of a target's
position by pivoting around itself. Think of this camera's behavior as a security camera.
FOLLOW TARGET
This camera is very similar to the Fixed Position but also allows to follow the target from a certain
distance. Useful for top-down view games like Diablo.
FOLLOW TRACK
This camera shot allows to track a target as well as move along a pre-defined rail-like path. This path's
position is defined by the position of the targeted object along another path. This camera shot is useful for
games that have very linear corridors but want to smoothly turn the camera around corners.
ANIMATION
This camera shot moves along a pre-defined path over a certain amount of time. When it reaches the end of the
animation, it stops there and does nothing else. This shot is very useful for cinematic sequences where
multiple animation shots can be chained together to dynamically follow the action.
FIRST PERSON
This shot is perfect for first person games. The target object (usually a humanoid) determines the position of
the shot and follows it while allowing to spin the head around.
• Head Bobbing: The amount of up and down and side movement due to the character's change of weight when
walking or running.
• Head Leaning: A subtle rotation on the local X and Z axis that is applied when the character moves in order
to display the impulse required to go towards that particular direction.
• Noise: Another subtle yet realistic random movement applied to both the rotation and translation of the shot
to simulate restless idle motion and breathing.
All these parameters can be changed at runtime to accomodate to different situations, such as increasing the
noise after sprinting and such.
THIRD PERSON
This shot is used on third person games where the camera follows a target but the user is free to orbit around
it.
LOCK ON
This shot allows to follow a target's position while the rotation follows another one, always framing both
targets on screen. This shot is perfect for locking on enemies when making an action game or hinting the
player something they should not be missing.
ANCHOR PEEK
This shot anchors itself to the chosen game object and allows to pan and tilt the camera vertically and
horizontally, up to a certain amount. The restitute field brings back the shot to the center if no further
input is detected. This is specially useful when using a gamepad controller and you want the character to peek
around corners.
Game Creator comes with a unique high-level and intuitive visual scripting toolset that makes it very easy to
code interactions. It only consists of 3 components:
The Actions component consists of a list of Instructions. The Conditions component is made of Branches, which
contain a list of Conditions and Instructions. Lastly, the Trigger component listens for a specific Event in the
scene.
Apart from these three visual scripting components, Game Creator also includes Hotspots, which is a special
type of component that doesn't directly affect gameplay, but highlights interactive objects in different ways:
For example, making a character's head turn towards a point when near, showing a text above an interactive
element, and so on.
A high-level scripting language is a methodology in which programming interactions is closer to what humans
are used to use. For example, in Game Creator you can tell a character to follow a target object; freeing the
user from having to think what it means to follow an object.
Game Creator and each module comes packed with a unique set visual scripting tools. The Game Creator Hub is a web
platform where community members upload free Instructions, Conditions and Events for everyone to download and use
in their projects. Be sure to check it out!
Why not both? Playmaker and Unity's Visual Scripting solution are graph-based, which tend to be closer to a
programming language. If you're used to using these, you'll find these complement Game Creator very well.
On one hand, Game Creator makes it very fast and easy to structure common interactions without the need to
code the low-level stuff. However, if you need more fine-grain control over some parts and you don't know how
to code your own Instructions, you can use these graph-based solutions that perfectly complement the process
of making games.
1.5.2 Actions
Actions
Actions are components that have a list of individual Instructions which are executed from top to bottom. It's
important to note that an Instruction won't be executed until the previous one has finished.
Actions
Task List
Actions can be thought as task lists that must be completed from top to bottom.
CREATING ACTIONS
There are two ways to create an Actions object. One is to create an object that contains an Actions component,
by right clicking on the Hierarchy panel and selecting Game Creator Visual Scripting Actions. This creates
a scene object with the component attached to it.
However, an Actions component can also be added to any game object. Simply click on any game object's Add
Component button and type Actions.
Deleting Actions
To delete an Actions component, simply click on the component's little cog button and select "Remove Component"
from the dropdown menu.
ADDING INSTRUCTIONS
To add an Instruction to an Actions component, click on the "Add Instruction" button to pop a dropdown list
with a searchable field. Navigate through the different categories or search for a specific instruction and
click it to add it at the bottom of the list.
It is also possible to add Instructions at any point of the list. To do so, right click on any existing
Instruction and choose "Insert Above" or "Insert Below" from the contextual menu that appears.
Game Creator uses an advanced indexed search algorithm that allows to both syntactically and semmantically
understand what the user is trying to search, even if the search contains mispelled words. For example, searching
for "move" will display the "Move Character" instruction, but also the "Change Position" one.
BUILT-IN DOCUMENTATION
All Instructions have built-in documentation that explain what it does as well as a small description of each
of its parameters. To access its documentation, either search for that particular instruction on the
documentation, or right click it on the Instruction and select Help. A new floating window will appear with
all the necessary information.
Instruction Documentation
DEBUGGING TOOLS
Actions come with built-in tools that allow to easily visualize and what's happening at runtime. Right click
on any Instruction to pop a context menu with the Disable and add a Breakpoint options.
Disable Instruction
Disable Instruction
The Instruction is greyed out and a special icon appears on its right side. Click the icon to enable the
instruction again.
Add a Breakpoint
A breakpoint pauses the Unity Editor upon reaching a particular Instruction, right before executing it. This
is very useful if you want to check the state of certain data before the execution progresses any further.
Breakpoint Instruction
When an Instruction has a breakpoint, it displays a red icon on its right side. Clicking it will remove the
breakpoint from the Instruction.
Editor only
It is important to note that breakpoints only work on the Editor and have no effect when building the project as
a standalone application.
Instructions
INSTRUCTIONS
Sub Categories
• Animations
• Application
• Audio
• Cameras
• Characters
• Debug
• Game Objects
• Input
• Lights
• Math
• Physics 2D
• Physics 3D
• Renderer
• Scenes
• Storage
• Testing
• Time
• Transforms
• Ui
• Variables
• Visual Scripting
ANIMATIONS
Animations
Instructions
• Set Animation
Description
Parameters
Name Description
Keywords
Parameter Number
Description
Parameters
Name Description
Keywords
Parameter Number
Description
Parameters
Name Description
Keywords
Weight
Description
Parameters
Name Description
Skinned Mesh The Skinned Mesh Renderer component attached to the game object
Keywords
Morph Target
Description
Parameters
Name Description
Keywords
Set Animation
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Parameter Bool
Description
Parameters
Name Description
Keywords
APPLICATION
Application
Sub Categories
• Cursor
Instructions
• Quit Application
Description
Parameters
Name Description
URL The route link to open. Must include the protocol prepended (http or https)
Keywords
Site Internet
Quit Application
Description
Closes the application and exits the program. This instruction is ignored in the Unity Editor or WebGL
platforms
Keywords
Cursor
Cursor Instructions
• Cursor Texture
• Cursor Visibility
• Lock Cursor
Cursor Texture
Description
Parameters
Name Description
Texture The new appearance of the cursor. The texture must be set to Cursor type
Tip The offset from the top left of the texture used as the target point
Keywords
Cursor Visibility
Description
Parameters
Name Description
Keywords
Lock Cursor
Description
Determines if the hardware pointer is locked to the center of the view or not
Parameters
Name Description
Lock Mode The behavior of the cursor. The default value is None
Keywords
AUDIO
Audio
Instructions
• Change Snapshot
• Change Ui Volume
• Play Ambient
• Play Music
• Play Speech
• Play Ui Sound
• Stop Ambient
• Stop Music
Description
Parameters
Name Description
Audio Mixer The Audio Mixer asset with the exposed parameter
Keywords
Description
Parameters
Name Description
Keywords
Clip Music
Description
Parameters
Name Description
Keywords
Clip Music
Description
Parameters
Name Description
Keywords
Description
Change the Master volume. The Master volume controls how loud all other channels are
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Change Snapshot
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Change UI volume
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound has faded out
Keywords
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound has faded out
Keywords
Play Ambient
Description
Plays a looped Audio Clip. Useful for background effects or persistent sounds.
Parameters
Name Description
Target A Game Object reference that the sound follows as the source
Keywords
Play Music
Description
Plays a looped Audio Clip. Useful for background music or persistent sounds.
Parameters
Name Description
Target A Game Object reference that the sound follows as the source
Keywords
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound finishes
Target A Game Object reference that the sound follows as its source
Keywords
Play Speech
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound finishes
Target A Game Object reference that the sound follows as its source
Keywords
Play UI sound
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound finishes
Target A Game Object reference that the sound follows as its source
Keywords
Stop Ambient
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound has faded out
Keywords
Stop Music
Description
Parameters
Name Description
Wait To Complete Check if you want to wait until the sound has faded out
Keywords
Description
Keywords
Description
Parameters
Name Description
Keywords
CAMERAS
Cameras
Sub Categories
• Properties
• Shakes
• Shots
Instructions
• Change To Shot
Change to Shot
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Properties
Properties Instructions
• Change Projection
Description
Parameters
Name Description
Culling Mask The mask the camera uses to discern which objects to render
Keywords
Cameras Render
Description
Parameters
Name Description
Duration The time in seconds, it takes for the camera to complete the change
Keywords
Description
Parameters
Name Description
Duration The time in seconds, it takes for the camera to complete the change
Keywords
Change Projection
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Cameras
Shakes
Shakes Instructions
Description
Parameters
Name Description
Magnitude The maximum amount the camera displaces from its position
Radius [Optional] Distance from the origin that the shake starts to fall-off
Keywords
Description
Starts shaking the camera until the effect is manually turned off
Parameters
Name Description
Shake Position Whether the shake affects the position of the camera
Shake Rotation Whether the shake affects the rotation of the camera
Magnitude The maximum amount the camera displaces from its position
Radius [Optional] Distance from the origin that the shake starts to fall-off
Keywords
Description
Parameters
Name Description
Layer The camera layer from which the Sustain Shake effect is removed
Delay Amount of time before the Sustain Shake effect starts blending out
Transition Amount of time it takes to blend out the Sustain Shake effect
Keywords
Description
Parameters
Name Description
Camera The camera target that stops all its active Burst Shake effects
Delay Amount of time before all Burst Shake effects start blending out
Transition Amount of time it takes to blend out all Burst Shake effects
Keywords
Shots
• Anchor
• Animation
• First Person
• Follow
• Head Bobbing
• Head Leaning
• Lock On
• Look
• Third Person
• Zoom
Anchor
Anchor Instructions
• Change Distance
• Change Offset
• Change Target
Change Distance
Description
Changes the anchored position the Shot sits relative to the target
Parameters
Name Description
Keywords
Change Offset
Description
Parameters
Name Description
Keywords
Change Target
Description
Parameters
Name Description
Keywords
Animation
Animation Instructions
• Change Duration
Change Duration
Description
Parameters
Name Description
Keywords
First person
First Person Instructions
• Change Bone
• Change Sensitivity
• Change Target
Change Bone
Description
Parameters
Name Description
Keywords
Cameras Shot
Description
Parameters
Name Description
Max Pitch The amount the Shot is allowed to look up and down, in degrees
Keywords
Cameras Shot
Change Sensitivity
Description
Parameters
Name Description
Keywords
Cameras Shot
Description
Parameters
Name Description
Keywords
Cameras Shot
Change Target
Description
Parameters
Name Description
Keywords
Follow
Follow Instructions
• Change Distance
• Change Target
Change Distance
Description
Changes the offset distance between the Shot and the targeted object
Parameters
Name Description
Keywords
Change Target
Description
Parameters
Name Description
Keywords
Head bobbing
Head Bobbing Instructions
Description
Parameters
Name Description
Keywords
Head leaning
Head Leaning Instructions
Description
Parameters
Name Description
Keywords
Lock on
Lock On Instructions
• Change Anchor
• Change Distance
• Change Offset
Change Anchor
Description
Parameters
Name Description
Keywords
Change Distance
Description
Parameters
Name Description
Keywords
Change Offset
Description
Parameters
Name Description
Keywords
Look
Look Instructions
• Change Offset
• Change Target
• Enable Look
Change Offset
Description
Parameters
Name Description
Keywords
Change Target
Description
Parameters
Name Description
Keywords
Enable Look
Description
Parameters
Name Description
Keywords
Third person
Third Person Instructions
• Change Aim
• Change Alignment
• Change Sensitivity
Change Aim
Description
Parameters
Name Description
Keep Center If true the point at the center of the screen is kept when aiming
Layer Mask The layer mask for the hit-scan to check the focus point
Keywords
Cameras Shot
Change Alignment
Description
Changes whether and how the Shot aligns behind the targeted object
Parameters
Name Description
Align with Target If the Shot should move behind the target after some idle time
Delay If the Shot should move behind the target after some idle time
Keywords
Cameras Shot
Description
Parameters
Name Description
Max Pitch The amount the Shot is allowed to look up and down, in degrees
Keywords
Cameras Shot
Change Sensitivity
Description
Parameters
Name Description
Keywords
Cameras Shot
Zoom
Zoom Instructions
Description
Parameters
Name Description
Keywords
Cameras Shot
Description
Parameters
Name Description
Min Distance The minimum zoom distance between the target and the Shot
Keywords
Cameras Shot
Description
Parameters
Name Description
Keywords
Cameras Shot
CHARACTERS
Characters
Sub Categories
• Animation
• Busy
• Combat
• Footsteps
• Ik
• Interaction
• Navigation
• Player
• Properties
• Ragdoll
• Visuals
Animation
Animation Instructions
• Enter State
• Play Gesture
• Stop Gesture
• Stop State
Description
Parameters
Name Description
Smooth Time The target Smooth Time value. Values usually range between 0 and 0.5
Example 1
The Smooth Time controls how fast a Character animation blends into another when reacting to external factors.
A value of 0 makes the Character react instantly whereas a value of 0.5 takes half a second to completely
blend in. A value between 0.2 and 0.4 usually provide the best results, though it depends on the look and feel
the creator wants to achieve.
Keywords
Description
Changes the weight of the State over time at the specified layer
Parameters
Name Description
Keywords
Enter State
Description
Parameters
Name Description
Blend Mode Additively adds the new animation on top of the rest or overrides any lower layer
animations
Keywords
Play Gesture
Description
Parameters
Name Description
Avatar Mask (Optional) Allows to play the animation on specific body parts of the Character
Blend Mode Additively adds the new animation on top of the rest or overrides any lower layer
animations
Speed Speed coefficient at which the animation plays. 1 means normal speed
Transition Out The amount of seconds the animation takes to blend out
Keywords
Stop Gestures
Description
Parameters
Name Description
Delay Amount of seconds to wait before the animation starts to blend out
Keywords
Stop State
Description
Parameters
Name Description
Keywords
Busy
Busy Instructions
• Set Available
• Set Busy
Set Available
Description
Parameters
Name Description
Keywords
Set Busy
Description
Parameters
Name Description
Keywords
Combat
• Invincibility
• Poise
• Targeting
Invincibility
Invincibility Instructions
• Set Invincible
Set Invincible
Description
Parameters
Name Description
Wait Until Complete Whether to wait until the invincibility wears off
Keywords
Poise
Poise Instructions
• Set Poise
Set Poise
Description
Parameters
Name Description
Keywords
Character Combat
Targeting
Targeting Instructions
• Clear Target
• Set Target
Description
Parameters
Name Description
Keywords
Clear Target
Description
Parameters
Name Description
Keywords
Description
Cycles to the closest candidate target to the character from the Targets list
Parameters
Name Description
Keywords
Description
Cycles to the visually closest target candidate from the Targets list and camera
Parameters
Name Description
Direction The local space direction (only [X,Y] components are used)
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Set Target
Description
Parameters
Name Description
Keywords
Footsteps
Footsteps Instructions
• Play Footstep
Description
Changes the sound table that links textures with footstep sounds
Parameters
Name Description
Footsteps The sound table asset that contains information about how and when footstep sounds play
Keywords
Play Footstep
Description
Parameters
Name Description
Keywords
Ik
Ik Instructions
• Active Feet Ik
• Active Lean Ik
• Active Look Ik
• Start Looking At
• Stop Looking At
Active Feet IK
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Active Lean IK
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Active Look IK
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Start Looking At
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Stop Looking At
Description
Parameters
Name Description
Keywords
Inverse Kinematics IK
Interaction
Interaction Instructions
• Interact
Interact
Description
Parameters
Name Description
Keywords
Navigation
Navigation Instructions
• Cancel Dash
• Dash
• Jump
• Move Direction
• Move To
• Start Following
• Stop Following
• Stop Move
• Teleport
Cancel Dash
Description
Parameters
Name Description
Keywords
Dash
Description
Moves the Character in the chosen direction for a brief period of time
Parameters
Name Description
Wait to Finish If true this Instruction waits until the dash is completed
Mode Whether to use Cardinal Animations (4 clips for each direction) or a single one
Animation Speed Determines the speed coefficient applied to the animation played
Example 1
The Transition Out parameter is also used to determine the movement blend between the dash and the character's
intended movement. Higher values will make characters take longer to regain control after dashing
Keywords
Jump
Description
Parameters
Name Description
Keywords
Move Direction
Description
Parameters
Name Description
Keywords
Move To
Description
Parameters
Name Description
Stop Distance Distance to the destination that the Character considers it has reached the target
Cancel on Fail Stops executing the rest of Instructions if the path has been obstructed
Example 1
The Stop Distance field is useful if you want [Character A] to approach another [Character B]. With a Stop
Distance of 0, [Character A] tries to occupy the same space as the other one, bumping into it. Having a Stop
Distance value of 2 allows [Character A] to stop 2 units away from [Character B]'s position
Keywords
Description
Parameters
Name Description
Driver The Driver behavior that decides how the Character moves
Keywords
Description
Parameters
Name Description
Rotation The Rotation behavior that decides where the Character faces
Keywords
Start Following
Description
Parameters
Name Description
Min Distance Distance from the Target the Character aims to move when approaching the Target
Max Distance Maximum distance to the Target the Character leaves before attempting to move closer
Keywords
Lead Pursue Chase Walk Run Position Location Destination Character Player
Stop Following
Description
Parameters
Name Description
Keywords
Stop Move
Description
Parameters
Name Description
Keywords
Teleport
Description
Parameters
Name Description
Keywords
Player
Player Instructions
• Change Player
Change Player
Description
Parameters
Name Description
Keywords
Character Is Control
Description
Parameters
Name Description
Input The new input method that the Character starts to listen
Keywords
Properties
Properties Instructions
• Axonometry
• Can Collide
• Can Jump
• Change Gravity
• Change Height
• Change Mass
• Change Radius
• Is Controllable
• Kill Character
• Mannequin Position
• Mannequin Rotation
• Mannequin Scale
• Revive Character
Change Axonometry
Description
Parameters
Name Description
Keywords
Can Collide
Description
Changes whether the Character can collide with other objects or not
Parameters
Name Description
Can Collide Whether the character collides with other physic objects
Can Jump
Description
Parameters
Name Description
Keywords
Hop Elevate
Description
Parameters
Name Description
Angular Speed The target Angular Speed value for the Character, measured in degrees per second
Keywords
Change Gravity
Description
Parameters
Name Description
Mode Whether the upwards, downwards or both Gravity values are changed
Keywords
Space
Change Height
Description
Parameters
Name Description
Keywords
Length
Description
Parameters
Name Description
Jump Force The target Jump Force value for the Character
Keywords
Change Mass
Description
Parameters
Name Description
Keywords
Weight
Description
Parameters
Name Description
Keywords
Change Radius
Description
Parameters
Name Description
Keywords
Description
Changes the Character's maximum fall-speed over time. Useful for gliding
Parameters
Name Description
Terminal Velocity The target Terminal Velocity value for the Character
Keywords
Description
Parameters
Name Description
Keywords
Scale Game
Is Controllable
Description
Parameters
Name Description
Kill Character
Description
Parameters
Name Description
Keywords
Mannequin Position
Description
Changes the local position of the Mannequin object within the Character
Parameters
Name Description
Keywords
Mannequin Rotation
Description
Changes the local rotation of the Mannequin object within the Character
Parameters
Name Description
Keywords
Mannequin Scale
Description
Changes the local scale of the Mannequin object within the Character
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Fall Speed
Revive Character
Description
Parameters
Name Description
Keywords
Ragdoll
Ragdoll Instructions
• Recover Ragdoll
• Start Ragdoll
Description
Parameters
Name Description
Character The Character game object that recovers from the Ragdoll state
Keywords
Start Ragdoll
Description
Parameters
Name Description
Keywords
Visuals
Visuals Instructions
• Attach Prop
• Change Model
• Drop Prop
• Remove Prop
Attach Prop
Description
Parameters
Name Description
Position Local offset from which the prop is distanced from the bone
Rotation Local offset from which the prop is rotated from the bone
Keywords
Change Model
Description
Parameters
Name Description
Model The prefab object that replaces the current Character model
Footstep Sounds Optional parameter that replaces the current Footstep sounds
Keywords
Characters Model
Drop Prop
Description
Parameters
Name Description
Prop The prefab or instance object prop that is dropped from the character
Keywords
Description
Parameters
Name Description
Prefab Game Object reference with a Skin Mesh Renderer that is instantiated
On Character Target Character that uses its armature to wear the skin mesh
Keywords
Remove Prop
Description
Parameters
Name Description
Prop The prefab or instance object prop that is removed from the character
Keywords
Description
Parameters
Name Description
Prefab Game Object reference with a Skin Mesh Renderer that is removed
From Character Target Character that uses its armature to wear the skin mesh
Keywords
DEBUG
Debug
Sub Categories
• Console
• Gizmos
Instructions
• Beep
• Clear Console
• Comment
• Frame Step
• Log Number
• Log Text
• Pause Editor
• Toggle Console
Beep
Debug » Beep
Description
Plays the Operative System default 'beep' sound. This is intended for debugging purposes and doesn't do
anything on a runtime application
Keywords
Debug
Clear Console
Description
Keywords
Debug Terminal
Comment
Debug » Comment
Description
Displays an explanation or annotation in the instructions list. It is intended to make instructions easier for
humans to understand
Parameters
Name Description
Keywords
Frame Step
Description
Keywords
Debug
Log Number
Description
Parameters
Name Description
Keywords
Debug Log Print Show Display Test Float Double Decimal Integer Message
Log Text
Description
Parameters
Name Description
Keywords
Pause Editor
Description
Keywords
Toggle Console
Description
Keywords
Debug Terminal
Console
Console Instructions
• Console Close
• Console Command
• Console Open
• Console Text
• Console Toggle
Console Close
Description
Keywords
Console Command
Description
Parameters
Name Description
Keywords
Console Open
Description
Keywords
Console Text
Description
Parameters
Name Description
Keywords
Debug Log Print Show Display Name Test Message String Terminal
Console Toggle
Description
Keywords
Gizmos
Gizmos Instructions
• Gizmo Line
Gizmo Line
Description
Keywords
GAME OBJECTS
Game Objects
Sub Categories
• Components
• Pooling
Instructions
• Change Layer
• Change Name
• Change Tag
• Destroy
• Instantiate
• Set Active
• Toggle Active
Change Layer
Description
Parameters
Name Description
Children Too Whether to also change the layer of the game object's children or not
Keywords
Change Name
Description
Parameters
Name Description
Keywords
Change Tag
Description
Parameters
Name Description
Keywords
Destroy
Description
Parameters
Name Description
Keywords
Instantiate
Description
Parameters
Name Description
Save Optional value where the newly instantiated game object is stored
Keywords
Set Active
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Toggle Active
Description
Parameters
Name Description
Keywords
Components
Components Instructions
• Add Component
• Disable Collider
• Disable Component
• Disable Renderer
• Enable Collider
• Enable Component
• Enable Renderer
• Remove Component
Add Component
Description
Parameters
Name Description
Keywords
Disable Collider
Description
Parameters
Name Description
Keywords
Disable Component
Description
Parameters
Name Description
Keywords
Disable Renderer
Description
Parameters
Name Description
Keywords
Enable Collider
Description
Parameters
Name Description
Keywords
Enable Component
Description
Parameters
Name Description
Keywords
Enable Renderer
Description
Parameters
Name Description
Keywords
Remove Component
Description
Parameters
Name Description
Keywords
Pooling
Pooling Instructions
• Pool Destroy
• Pool Prewarm
Pool Destroy
Description
Parameters
Name Description
Game Object The Game Object reference is used as the template for the pool
Example 1
Use this Instruction to dispose those pools that have been pre-warmed. Pools created at runtime are
automatically disposed when their scene is unloaded.
Keywords
Pool Prewarm
Description
Creates or makes sure an existing game object pool has enough instances
Parameters
Name Description
Game Object The Game Object reference is used as the template for the pool
Example 1
Pre-warming a Pool moves it to the DontDestroyOnLoad scene. This means its contents will never be destroyed
even after loading new scenes. To delete a pre-warmed pool use the Pool Destroy instruction.
Keywords
INPUT
Input
Instructions
Description
Disables an Input Action asset which stops it from reading user input
Parameters
Name Description
Keywords
Deactivate Inactive
Description
Disables an Input Action asset with a Map value which stops reading user input
Parameters
Name Description
Keywords
Deactivate Inactive
Description
Parameters
Name Description
Keywords
Joystick
Description
Parameters
Name Description
Keywords
Joystick
Description
Enables an Input Action asset which allows it to start reading user input
Parameters
Name Description
Keywords
Description
Enables an Input Action asset with a Map value which allows reading user input
Parameters
Name Description
Keywords
LIGHTS
Lights
Instructions
• Light Color
• Light Intensity
Light Color
Description
Parameters
Name Description
Keywords
Colour Hue Mood RGB Light Light Spot Sun Point Strength Burn Dark
Light Intensity
Description
Parameters
Name Description
Keywords
MATH
Math
Sub Categories
• Arithmetic
• Boolean
• Geometry
• Shading
• Text
Arithmetic
Arithmetic Instructions
• Absolute Number
• Add Numbers
• Clamp Number
• Cosine
• Divide Numbers
• Increment Number
• Modulus Numbers
• Multiply Numbers
• Set Number
• Sign Of Number
• Sine
• Subtract Numbers
• Tangent
Absolute Number
Description
Parameters
Name Description
Keywords
Add Numbers
Description
Parameters
Name Description
Keywords
Clamp Number
Description
Parameters
Name Description
Keywords
Cosine
Description
Parameters
Name Description
Keywords
Divide Numbers
Description
Parameters
Name Description
Keywords
Increment Number
Description
Parameters
Name Description
Keywords
Modulus Numbers
Description
Calculates the modulus between the first and the second value
Parameters
Name Description
Keywords
Multiply Numbers
Description
Parameters
Name Description
Keywords
Set Number
Description
Parameters
Name Description
Keywords
Sign of Number
Description
Parameters
Name Description
Keywords
Sine
Description
Parameters
Name Description
Keywords
Subtract Numbers
Description
Parameters
Name Description
Keywords
Tangent
Description
Parameters
Name Description
Keywords
Boolean
Boolean Instructions
• And Bool
• Nand Bool
• Nor Bool
• Or Bool
• Set Bool
• Toggle Bool
AND Bool
Description
Parameters
Name Description
Keywords
NAND Bool
Description
Parameters
Name Description
Keywords
NOR Bool
Description
Parameters
Name Description
Keywords
OR Bool
Description
Parameters
Name Description
Keywords
Set Bool
Description
Parameters
Name Description
Keywords
Toggle Bool
Description
Parameters
Name Description
Keywords
Geometry
Geometry Instructions
• Add Directions
• Add Points
• Clamp
• Cross Product
• Distance
• Dot Product
• Normalize
• Project On Plane
• Reflect On Plane
• Remap Coordinates
• Scale Product
• Set Direction
• Set Point
• Set Vector X
• Set Vector Y
• Set Vector Z
• Subtract Directions
• Subtract Points
• Uniform Scale
Add Directions
Description
Adds two values that represent a direction in space and saves the result
Parameters
Name Description
Direction 1 The first operand of the geometric operation that represents a direction
Direction 2 The second operand of the geometric operation that represents a direction
Keywords
Add Points
Description
Adds two values that represent a point in space and saves the result
Parameters
Name Description
Point 1 The first operand of the geometric operation that represents a point in space
Point 2 The second operand of the geometric operation that represents a point in space
Keywords
Clamp
Description
Parameters
Name Description
Keywords
Cross Product
Description
Calculates the cross product of two direction values and saves the result
Parameters
Name Description
Direction 1 The first operand of the geometric operation that represents a direction
Direction 2 The second operand of the geometric operation that represents a direction
Keywords
Distance
Description
Calculates the distance between two points in space and saves the result
Parameters
Name Description
Point 1 The first operand of the geometric operation that represents a point in space
Point 2 The second operand of the geometric operation that represents a point in space
Keywords
Dot Product
Description
Calculates the dot product between two directions and saves the result
Parameters
Name Description
Direction 1 The first operand of the geometric operation that represents a direction
Direction 2 The second operand of the geometric operation that represents a direction
Keywords
Normalize
Description
Parameters
Name Description
Keywords
Project on Plane
Description
Projects a direction on a plane defined by a normal vector and saves the result
Parameters
Name Description
Plane Normal The plane represented by the direction of its normal vector
Keywords
Reflect on Plane
Description
Reflects a direction on a plane defined by a normal vector and saves the result
Parameters
Name Description
Plane Normal The plane represented by the direction of its normal vector
Keywords
Remap Coordinates
Description
Parameters
Name Description
Keywords
Scale Product
Description
Parameters
Name Description
Direction 1 The first operand of the geometric operation that represents a direction
Direction 2 The second operand of the geometric operation that represents a direction
Keywords
Set Direction
Description
Parameters
Name Description
Keywords
Set Point
Description
Parameters
Name Description
Keywords
Set Vector X
Description
Parameters
Name Description
Keywords
Set Vector Y
Description
Parameters
Name Description
Keywords
Set Vector Z
Description
Parameters
Name Description
Keywords
Subtract Directions
Description
Subtracts two values that represent a direction in space and saves the result
Parameters
Name Description
Direction 1 The first operand of the geometric operation that represents a direction
Direction 2 The second operand of the geometric operation that represents a direction
Keywords
Subtract Points
Description
Subtracts two values that represent a point in space and saves the result
Parameters
Name Description
Point 1 The first operand of the geometric operation that represents a point in space
Point 2 The second operand of the geometric operation that represents a point in space
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Uniform Scale
Description
Parameters
Name Description
Vector The first operand of the geometric operation that represents a direction
Value The second operand of the geometric operation that represents a decimal number
Keywords
Shading
Shading Instructions
• Lerp Color
• Lerp Lightness
• Lerp Saturation
• Set Color
Lerp Color
Description
Parameters
Name Description
Keywords
Change Value Transition Shade Tint Hue Colour Color Paint Tone
Lerp Lightness
Description
Parameters
Name Description
Keywords
Change Value Transition Shade Tint Hue Colour Color Paint Tone
Lerp Saturation
Description
Parameters
Name Description
Keywords
Change Value Transition Shade Tint Hue Colour Color Paint Tone
Set Color
Description
Parameters
Name Description
Keywords
Text
Text Instructions
• Join
• Replace
• Set Text
• Substring
Join
Description
Parameters
Name Description
Keywords
Replace
Description
Parameters
Name Description
Keywords
Set Text
Description
Parameters
Name Description
Keywords
Substring
Description
Parameters
Name Description
Keywords
PHYSICS 2D
Physics 2D
Instructions
• Add Force 2D
• Change Mass 2D
• Change Velocity 2D
• Gravity Scale 2D
• Is Kinematic 2D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody2D component that receives the force
Force The force of the explosion, which its at its maximum at the origin
Keywords
Add Force 2D
Description
Parameters
Name Description
Rigidbody The game object that will receive the force. A Rigidbody2D attached is required
Keywords
Change Mass 2D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody2D attached that will change its mass
Mass The new mass the game object will be set to have
Keywords
Change Velocity 2D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody2D attached that will change its velocity
Keywords
Gravity Scale 2D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody2D attached that changes its gravity scale
Keywords
Physics Rigidbody
Is Kinematic 2D
Physics 2D » Is Kinematic 2D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody2D attached that changes its kinematic usage
Is Kinematic If enabled, forces, collisions or joints do not affect the rigidbody anymore
Keywords
Physics Rigidbody
PHYSICS 3D
Physics 3D
Instructions
• Add Force 3D
• Change Mass 3D
• Change Velocity 3D
• Is Kinematic 3D
• Overlap Box 2D
• Overlap Box 3D
• Overlap Circle 3D
• Overlap Sphere 3D
• Trace Line 3D
• Use Gravity 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody component that receives the force
Force The force of the explosion, which its at its maximum at the origin
Keywords
Add Force 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody component that receives the force
Keywords
Change Mass 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody attached that changes its mass
Keywords
Change Velocity 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody attached that changes its velocity
Keywords
Is Kinematic 3D
Physics 3D » Is Kinematic 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody attached that changes its kinematic usage
Is Kinematic If enabled, forces, collisions or joints do not affect the rigidbody anymore
Keywords
Physics Rigidbody
Overlap Box 2D
Description
Parameters
Name Description
Store In The list where the colliders (if any) are stored
Layer Mask A mask that determines which colliders are ignored and which aren't
Keywords
Overlap Box 3D
Description
Parameters
Name Description
Store In The list where the colliders (if any) are stored
Layer Mask A mask that determines which colliders are ignored and which aren't
Keywords
Overlap Circle 2D
Description
Captures all colliders caught inside a Circle defined by a point and radius
Parameters
Name Description
Store In The list where the colliders (if any) are stored
Layer Mask A mask that determines which colliders are ignored and which aren't
Keywords
Overlap Sphere 3D
Description
Captures all colliders caught inside a sphere defined by a point and radius
Parameters
Name Description
Store In The list where the colliders (if any) are stored
Layer Mask A mask that determines which colliders are ignored and which aren't
Keywords
Trace Line 3D
Description
Parameters
Name Description
Store In The list where the colliders (if any) are stored
Layer Mask A mask that determines which colliders are ignored and which aren't
Keywords
Use Gravity 3D
Description
Parameters
Name Description
Rigidbody The game object with a Rigidbody attached that changes its gravity usage
Keywords
Physics Rigidbody
RENDERER
Renderer
Instructions
• Change Material
• Change Sprite
Description
Changes over time the Color property of an instantiated material of a Renderer component
Parameters
Name Description
Keywords
Description
Changes over time the Float property of an instantiated material of a Renderer component
Parameters
Name Description
Float Decimal target that the instantiated Material's property turns into
Keywords
Description
Parameters
Name Description
Keywords
Change Material
Description
Parameters
Name Description
Keywords
Change Sprite
Description
Parameters
Name Description
Keywords
Texture Renderer
SCENES
Scenes
Instructions
• Load Scene
• Unload Scene
Load Scene
Description
Parameters
Name Description
Mode Single mode replaces all other scenes. Additive mode loads the scene on top of the others
Async Loads the scene in the background or freeze the game until its done
Scene Entries Define the starting location of the player and other characters after loading the scene
Keywords
Change
Unload Scene
Description
Parameters
Name Description
Keywords
Change Remove
STORAGE
Storage
Instructions
• Delete Game
• Load Game
• Reset Game
• Save Game
Delete Game
Description
Parameters
Name Description
Keywords
Load Game
Description
Parameters
Name Description
Save Slot ID number to load the game from. It can range between 1 and 9999
Keywords
Description
Keywords
Reset Game
Description
Parameters
Name Description
Keywords
Save Game
Description
Parameters
Name Description
Save Slot ID number to save the game. It can range between 1 and 9999
Keywords
TESTING
Testing
Instructions
• Instruction Tester
Tester
Description
Appends a character to a static Chain field. For internal testing use only
Parameters
Name Description
Example 1
Note that this Instruction is not accessible through the Inspector to avoid confusing new users. To run the
test suit environment, create a new InstructionList object and append as many InstructionTester instances as your
test requires.
InstructionTester.Clear();
instructions.Run(null);
Debug.Log(InstructionTester.Chain);
// Prints: 'abc'
TIME
Time
Instructions
• Time Scale
• Wait Frames
• Wait Seconds
Time Scale
Description
Parameters
Name Description
Time Scale The scale at which time passes. This can be used for slow motion effects
Blend Time How long it takes to transition from the current time scale to the new one
Layer Any time scale values using the same Layer is overwritten by this one.
Example 1
Setting a Time Scale of 0 will freeze the game. Useful for pausing the game
Example 2
The resulting Time Scale will be equal to the lowest time scale value between all Layers. For example, if the
Time Scale with Layer = 0 has a value of 0.5 (which makes characters move in slow motion), and another Time
Scale with Layer = 1 with a value of 0, the resulting Time Scale will be 0
Keywords
Wait Frames
Description
Parameters
Name Description
Example 1
This instruction is particularly useful in cases where you want to control the order of execution of two
Actions. For example, imagine there are two Triggers executing at the same time, but you want to execute the
instructions associated with one after the execution of the other one. You can use the 'Wait Frames'
instruction to defer its execution 1 frame so the other one has had time to complete its own execution
Keywords
Wait Seconds
Description
Parameters
Name Description
Keywords
TRANSFORMS
Transforms
Instructions
• Change Position
• Change Rotation
• Change Scale
• Clear Parent
• Look At
• Set Parent
Change Position
Description
Parameters
Name Description
Keywords
Change Rotation
Description
Parameters
Name Description
Keywords
Change Scale
Description
Parameters
Name Description
Keywords
Clear Parent
Description
Parameters
Name Description
Keywords
Look At
Transforms » Look At
Description
Parameters
Name Description
Keywords
Set Parent
Description
Parameters
Name Description
Keywords
UI
Ui
Instructions
• Change Dropdown
• Change Height
• Change Image
• Change Slider
• Change Text
• Change Toggle
• Change Width
• Focus On
• Submit
• Unfocus
Description
Changes the opacity of the Canvas Group and affects all of its children
Parameters
Name Description
Canvas Group The Canvas Group component that changes its value
Description
Parameters
Name Description
Canvas Group The Canvas Group component that changes its value
Block Raycasts If true, the canvas group and its children block raycasts
Description
Parameters
Name Description
Canvas Group The Canvas Group component that changes its value
Change Dropdown
UI » Change Dropdown
Description
Parameters
Name Description
Text The Text or Text Mesh Pro component that changes its value
Description
Changes the size of the Text or Text Mesh Pro component content
Parameters
Name Description
Text The Text or Text Mesh Pro component that changes its font size
Keywords
Text
Description
Parameters
Name Description
Change Height
UI » Change Height
Description
Parameters
Name Description
Change Image
UI » Change Image
Description
Parameters
Name Description
Description
Changes the value of an Input Field or Text Mesh Pro Input Field
Parameters
Name Description
Input Field The Input Field or TMP Input Field component that changes its value
Change Slider
UI » Change Slider
Description
Parameters
Name Description
Change Text
UI » Change Text
Description
Parameters
Name Description
Text The Text or Text Mesh Pro component that changes its value
Change Toggle
UI » Change Toggle
Description
Parameters
Name Description
Change Width
UI » Change Width
Description
Parameters
Name Description
Focus On
UI » Focus On
Description
Parameters
Name Description
Keywords
Select
Submit
UI » Submit
Description
Keywords
Unfocus
UI » Unfocus
Description
Keywords
Deselect Lose
VARIABLES
Variables
Instructions
• Change Id
• Clear List
• Collect Characters
• Collect Markers
• Filter List
• Iterator Next
• Iterator Previous
• Iterator Random
• Loop List
• Move List
• Reverse List
• Shuffle List
• Swap List
Change ID
Variables » Change ID
Description
Changes the Local Name or List Variable's ID. It only works on non-Savable variables
Parameters
Name Description
Keywords
Unique Guid
Clear List
Description
Parameters
Name Description
List Variable Local List or Global List which elements are removed
Keywords
Collect Characters
Description
Parameters
Name Description
Origin The position where the rest of the game objects are collected
Max Radius How far from the Origin the game objects are collected
Min Radius How far from the Origin game objects start to be collected
Example 1
Note that in most cases it is not desirable to set the Min Radius to 0. Doing so will also collect game
objects at a distance of 0 from the Origin. For example, if we want to collect all enemies around the Player
and we set a Min Radius of 0, the Player will also be collected because it's a Character at a distance 0 from
himself
Keywords
Collect Markers
Description
Parameters
Name Description
Origin The position where the rest of the game objects are collected
Max Radius How far from the Origin the game objects are collected
Min Radius How far from the Origin game objects start to be collected
Example 1
Note that in most cases it is not desirable to set the Min Radius to 0. Doing so will also collect game
objects at a distance of 0 from the Origin. For example, if we want to collect all enemies around the Player
and we set a Min Radius of 0, the Player will also be collected because it's a Character at a distance 0 from
himself
Keywords
Filter List
Description
Checks Conditions against each element of a list and removes it if the Condition is not true
Parameters
Name Description
List Variable Local List or Global List which elements are filtered
Filter Checks a set of Conditions with each collected game object and removes the element if the
Condition is not true
Example 1
The Filter field runs the Conditions list for each element in a Local List Variables or Global List Variables.
It sets as the 'Target' value the currently examined game object. For example, filtering by the tag name
'Enemy' can be done using the 'Tag' Condition and comparing the field 'Target' with the string 'Enemy'. All
game objects that are not tagged as 'Enemy' are removed
Keywords
Iterator Next
Description
Increases in one unit the value used as an iterator for a List Variable
Parameters
Name Description
Mode Whether the index loops back to the first index or is clamped
Keywords
Iterator Previous
Description
Decreases in one unit the value used as an iterator for a List Variable
Parameters
Name Description
Mode Whether the index loops back to the last index or is clamped at zero
Keywords
Iterator Random
Description
Parameters
Name Description
Keywords
Loop List
Description
Loops a Game Object List Variables and executes an Actions component for each value
Parameters
Name Description
List Variable Local List or Global List which elements are iterated
Actions The Actions component executed for each element in the list. The Target argument of any
Instruction contains the object inspected
Keywords
Move List
Description
Parameters
Name Description
List Variable Local List or Global List which elements are moved
Keywords
Description
Parameters
Name Description
List Variable Local List or Global List which elements are removed
Keywords
Reverse List
Description
Reorders the elements of a list so the first ones become the last ones
Parameters
Name Description
List Variable Local List or Global List which elements are reversed
Keywords
Shuffle List
Description
Parameters
Name Description
List Variable Local List or Global List which elements are shuffled
Keywords
Description
Parameters
Name Description
List Variable Local List or Global List which elements are sorted
Ignore Case Whether the string comparison should ignore upper/lower case
Keywords
Description
Sorts the List Variable elements based on their distance to a given position
Parameters
Name Description
List Variable Local List or Global List which elements are sorted
Position The reference position that is used to measure the sorting distance
Order From Closest to Farthest puts the closest elements to the Position first
Keywords
Swap List
Description
Parameters
Name Description
List Variable Local List or Global List which elements are swapped
Keywords
VISUAL SCRIPTING
Visual Scripting
Instructions
• Activate Hotspots
• Broadcast Message
• Check Conditions
• Emit Signal
• Invoke Method
• Restart Instructions
• Run Actions
• Run Conditions
• Run Trigger
• Stop Actions
• Stop Conditions
• Stop Trigger
Activate Hotspots
Description
Parameters
Name Description
Keywords
Broadcast Message
Description
Invokes any method on any component found on the target game object
Parameters
Name Description
Game Object The target game object that receives the broadcast message
Send Upwards If true the message travels from the game object towards the root
Example 1
By default all broadcast messages travel from the target game object and towards all its children. Setting the
Send Upwards field to true makes the message travel from the game object towards the root parent
Keywords
Check Conditions
Description
If any of the Conditions list is false it early exits and skips the execution of the rest of the Instructions
below
Parameters
Name Description
Keywords
Emit Signal
Description
Parameters
Name Description
Keywords
Invoke Method
Description
Parameters
Name Description
Keywords
Restart Instructions
Description
Stops executing the current list of Instructions and starts again from the top
Keywords
Run Actions
Description
Parameters
Name Description
Wait Until Complete If true this instruction waits until the Actions object finishes running
Keywords
Run Conditions
Description
Parameters
Name Description
Wait Until Complete If true this instruction waits until the Conditions object finishes running
Keywords
Run Trigger
Description
Parameters
Name Description
Wait Until Complete If true this instruction waits until the Trigger object finishes running
Keywords
Execute Call
Stop Actions
Description
Parameters
Name Description
Keywords
Cancel Pause
Stop Conditions
Description
Parameters
Name Description
Keywords
Cancel Pause
Stop Trigger
Description
Parameters
Name Description
Keywords
Cancel Pause
Custom Instructions
Game Creator allows to very easily create custom Instructions and use them along with the rest.
This section assumes you have some programming knowledge. If you don't know how to code you might be interested
in checking out the Game Creator Hub page. Programmers altrusitically create custom Instructions for others to
download and use in their project.
CREATING AN INSTRUCTION
The easiest way to create an Instruction C# script is to right click on your Project panel and select Create
Game Creator Developer C# Instruction. This will create a template script with the boilerplate structure of
an Instruction:
using System;
using System.Threading.Tasks;
using GameCreator.Runtime.Common;
using GameCreator.Runtime.VisualScripting;
[Serializable]
public class MyInstruction : Instruction
{
protected override Task Run(Args args)
{
// Your code here...
return DefaultResult;
}
}
Anatomy of an Instruction
An Instruction is a class that inherits from the Instruction super class. The abstract Run(...) method is the
entry point of an Instruction's execution, which is automatically called when it's this instruction's time to
be executed.
The Run(...) method has a single parameter of type Args , which is a helper class that contains a reference to
the game object that initiated the call ( args.Self ) and the targeted game object ( args.Target ), if any.
Yielding in Time
Most instruction will be executed in a single frame. However, some instructions might require to put the
execution on hold for a certain amount of time, before resuming the execition. The most simple example is with
the "Wait for Seconds" instruction, which pauses the execution for a few seconds before resuming.
The Instruction super class contains a collection of methods that helps with time management.
Async/Await
Instructions use the async/await methodology to manage the flow of an instruction over the course of time. Using
the await symbol requires the Run() method to have the async symbol on its method definition:
NextFrame
The NextFrame() methods pauses the execution of the Instruction for a single frame, then resumes.
Time
The Time(float time) method pauses the execution of an Instruction for a certain amount of time. The time
parameter is in seconds.
While
The While(Func<bool> function) method pauses the execution of an Instruction for as long as the result of the
method passed as a parameter returns true. This method is executed every frame and the execution will resume
as soon as it returns false .
Until
The Until(Func<bool> function) method pauses the execution of an Instruction for as long as the result of the
method passed as a parameter returns true. This method is executed every frame and the execution will resume
as soon as it returns true .
It is highly recommended to document and decorate the Instruction so it's easier to find and use. It is done
using class-type attributes that inform Game Creator of the quirks of this particular instruction.
For example, to set the title of an instruction to "Hello World", use the [Title(string name)] attribute right
above the class definition:
using System;
using System.Threading.Tasks;
using GameCreator.Runtime.Common;
using GameCreator.Runtime.VisualScripting;
[Title("Hello World")]
[Serializable]
public class MyInstruction : Instruction
{
protected override Task Run(Args args)
{
// ...
}
}
Title
The title of the Instruction. If this attribute is not provided, the title will be a beautified version of the
class name.
[Title("Title of Instruction")]
Description
A description of what the Instruction does. This is both used in the floating window documentation, as well as
the description text when uploading an Instruction to the Game Creator Hub.
Image
The [Image(...)] attribute changes the default icon of the Instruction for one of the default ones. It consists
of 2 parameters:
• Icon [ Type ]: a Type class of an IIcon derived class. Game Creator comes packed with a lot of icons although
you can also create your own.
• Color [ Color ]: The color of the icon. Uses Unity's Color class.
For example, one of the icons included is the "Solid Cube" icon. To display a red solid cube as the icon of
the instruction, use the following attribute:
[Image(typeof(IconCubeSolid), Color.red)]
Category
A sequence of sub-categories organized using the slash ( / ) character. This attribute helps keep the
Instructions organized when the Instructions list dropdown is displayed.
[Category("Category/Sub Category/Name")]
The example above will display the Instruction under the sub directory Category Sub Category Name.
Version
A semmantic version to keep track of the development of this Instruction. It's important to note that when
updating an Instruction to the Game Creator Hub, the version number must always be higher than the one on the
server.
The semmantic version follows the standard Major Version, Minor Version, Patch Version. To know more about how
semmantic versioning works, read the following page: https://semver.org.
[Version(1, 5, 3)]
Parameters
When an Instruction has exposed fields in the Inspector, it's a good idea to document what these do. You can
add as many [Parameter(name, description)] attributes as exposed fields has the Instruction.
Keywords
Keywords are strings that help the fuzzy finder more easily search for an instruction. For example, the
"Change Position" instruction doesn't reference the word "move" or "translate" anywhere in its documentation.
However, these words are very likely to reference this instruction when the user types them in the search box.
[Keywords("Move", "Translate")]
Example
The Example attribute allows to display a text as an example of use of this Instruction. There can be more
than one [Example(...)] attribute per instruction. This is particularly useful when uploading instructions on
the Game Creator Hub.
Markdown
Multiple Lines
You can use the @ character in front of a string to break the example text in multiple lines. To create a new
paragraph, simply add two new lines. For example:
[Example(@"
This is the first paragraph.
This is also in the first paragraph, right after the previous sentence
Dependency
This attribute is optional and only used in the Game Creator Hub. If this Instruction uses some particular
feature of a specific module, it will first check if the user downloading this instruction has that module
installed. If it does not, it will display an error message and forbid downloading it. This is useful to avoid
throwing programming errors.
[Dependency("gamecreator.inventory", 1, 5, 2)]
1.5.3 Triggers
Triggers
Triggers are components attached to game objects that listen to events that happen on the scene and react by
executing a sequence of instructions.
Triggers
Example
In the image above, the Trigger is listening for the Space keyboard key to be pressed down. As soon as that
happens, it calls the instructions list from below, which prints the message "Space key pressed!"
CREATING A TRIGGER
Right click on the Hierarchy panel and select Game Creator Visual Scripting Trigger. A game object named
'Trigger' will appear in the scene with a component of the same name.
Alternatively you can also add the Trigger component to any game object clicking on the Inspector's Add
Component button and searching for Trigger.
Deleting Triggers
To delete a Trigger component, simply click on the component's little cog button and select "Remove Component"
from the dropdown menu.
Triggers listen to very specific events, chosen by the user. To change the type of Event a Trigger listens,
click on the event name and a dropdown menu will appear. Navigate it using the mouse or searching for a
specific event in the seach box field.
INSTRUCTIONS
The Instructions list that appear below work exactly the same was the Actions component. For more information
about this component, visit the Actions page.
Events
EVENTS
Sub Categories
• Audio
• Cameras
• Characters
• Input
• Interactive
• Lifecycle
• Logic
• Physics
• Storage
• Ui
• Variables
AUDIO
Audio
Events
• On Change Ui Volume
Description
Keywords
Description
Keywords
Description
Keywords
Description
Keywords
Description
Keywords
On Change UI Volume
Description
Keywords
CAMERAS
Cameras
Events
• On Camera Change
• On Change To Shot
On Camera Change
Description
Keywords
Description
Keywords
On Change to Shot
Description
Keywords
CHARACTERS
Characters
Sub Categories
• Combat
• Navigation
• Ragdoll
Events
• On Become Npc
• On Become Player
• On Change Model
• On Die
• On Revive
On Become NPC
Description
On Become Player
Description
On Change Model
Description
On Die
Characters » On Die
Description
On Revive
Characters » On Revive
Description
Keywords
Resurrect Respawn
Combat
Combat Events
• On Defense Change
• On Dodge
• On Invincibility Change
• On Poise Break
• On Poise Change
• On Target Change
On Defense Change
Description
Keywords
On Dodge
Description
On Invincibility Change
Description
On Poise Break
Description
Keywords
Resistance Combat
On Poise Change
Description
Keywords
Resistance Combat
On Target Change
Description
Keywords
Navigation
Navigation Events
• On Dash
• On Jump
• On Land
• On Step
On Dash
Description
On Jump
Description
On Land
Description
On Step
Description
Keywords
Ragdoll
Ragdoll Events
• On Recover Ragdoll
• On Start Ragdoll
On Recover Ragdoll
Description
On Start Ragdoll
Description
INPUT
Input
Events
• On Cursor Click
• On Input Button
• On Input Flick
• On Touch
On Cursor Click
Description
Parameters
Name Description
Min Distance If set to None, the mouse input acts globally. If set to Game Object, the event only fires
if the target object is within a certain radius
Keywords
On Input Button
Description
Parameters
Name Description
Min Distance If set to None, the input acts globally. If set to Game Object, the event only fires if
the target object is within the specified radius
Keywords
On Input Flick
Description
Parameters
Name Description
Min Distance If set to None, the input acts globally. If set to Game Object, the event only fires if
the target object is within the specified radius
Keywords
Left Right Down Up Press Move Direction Keyboard Mouse Button Gamepad Controller Joystick
On Touch
Input » On Touch
Description
Parameters
Name Description
Min Distance If set to None, the touch input acts globally. If set to Game Object, the event only fires
if the target object is within a certain radius
Keywords
INTERACTIVE
Interactive
Events
• On Blur
• On Focus
• On Interact
On Blur
Interactive » On Blur
Description
On Focus
Interactive » On Focus
Description
On Interact
Interactive » On Interact
Description
Parameters
Name Description
Use Raycast Checks if there is something between the character and the Trigger
Example 1
The 'Use Raycast' option checks if there is no other collider between the Character and the Trigger
LIFECYCLE
Lifecycle
Events
• On App Focus
• On App Pause
• On App Quit
• On Become Invisible
• On Become Visible
• On Disable
• On Enable
• On Fixed Update
• On Interval
• On Invoke
• On Late Update
• On Start
• On Update
On App Focus
Description
Keywords
Foreground
On App Pause
Description
Keywords
Background Suspend
On App Quit
Description
Keywords
Exit Close
On Become Invisible
Description
Executed when the game object it is attached to is no longer visible by any camera
Keywords
Hide Disappear
On Become Visible
Description
Executed when the game object it is attached to becomes visible to any camera
Keywords
On Disable
Lifecycle » On Disable
Description
Keywords
On Enable
Lifecycle » On Enable
Description
Executed when the game object it is attached to becomes enabled and active
Keywords
On Fixed Update
Description
Executed every fixed frame as long as the game object is enabled (physics loop
Keywords
On Interval
Lifecycle » On Interval
Description
Parameters
Name Description
Keywords
On Invoke
Lifecycle » On Invoke
Description
Keywords
Script Manual
On Late Update
Description
Executed every frame after all On Update events are fired, as long as the game object is enabled
Keywords
On Start
Lifecycle » On Start
Description
Executed on the frame when the game object is enabled for the first time
Keywords
Initialize
On Update
Lifecycle » On Update
Description
Keywords
LOGIC
Logic
Events
• On Hotspot Activate
• On Hotspot Deactivate
• On Receive Signal
On Hotspot Activate
Description
Keywords
Spot
On Hotspot Deactivate
Description
Keywords
Spot
On Receive Signal
Description
Keywords
PHYSICS
Physics
Events
• On Collide Exit
• On Collide
• On Trigger Enter
• On Trigger Exit
• On Trigger Stay
On Collide Exit
Description
Executed when the Trigger that collided with a game object, stops colliding
Keywords
On Collide
Physics » On Collide
Description
Keywords
Description
Executed when a game object with a Tag enters the Trigger collider
Parameters
Name Description
Keywords
On Trigger Enter
Description
Keywords
Description
Executed when a game object with a Tag exists the Trigger collider
Parameters
Name Description
Keywords
On Trigger Exit
Description
Keywords
On Trigger Stay
Description
Keywords
STORAGE
Storage
Events
• On Delete
• On Load
• On Save
On Delete
Storage » On Delete
Description
Keywords
On Load
Storage » On Load
Description
Keywords
On Save
Storage » On Save
Description
Keywords
UI
Ui
Events
• On Deselect
• On Hover Enter
• On Hover Exit
• On Select
On Deselect
UI » On Deselect
Description
Keywords
On Hover Enter
UI » On Hover Enter
Description
Keywords
On Hover Exit
UI » On Hover Exit
Description
Keywords
On Select
UI » On Select
Description
Keywords
VARIABLES
Variables
Events
Description
Description
Description
Description
Custom Events
Game Creator allows to create custom Events that listen to events and react accordingly. Note that it's up to
the programmer to determine the most performant way to detect an event.
This section assumes you have some programming knowledge. If you don't know how to code you might be interested
in checking out the Game Creator Hub page. Programmers altrusitically create custom Events for others to download
and use in their project.
CREATING AN EVENT
The easiest way to create an Event C# script is to right click on your Project panel and select _Create Game
Creator Developer C# Event. This will create a template script with the boilerplate structure:
using System;
using GameCreator.Runtime.VisualScripting;
[Serializable]
public class MyEvent : Event
{
protected override void OnStart(Trigger trigger)
{
base.OnStart(trigger);
_ = trigger.Execute(this.Self);
}
}
Anatomy of an Event
An Event is a class that inherits from the Event super class. It contains a large collection of virtual
methods to inherit from, which are very similar to MonoBeheaviour methods.
Example
For example, to detect when the Trigger component is initialized, you can override the OnAwake() or the OnStart()
methods. For a full list of all available methods to override, check the Event.cs script file.
All methods come with a trigger parameter, which references the Trigger component that owns this Event.
Fire an Event
Once you have setup the necessary code to detect an event, it's time to tell the Trigger to exeecute the
specified reaction. This is done using the Execute(target) method from the Trigger component:
trigger.Execute(this.Self);
Async/Await
Note that the Execute(...) method returns an async task so the code can wait until the reaction completes before
resuming the execution. Most of the times however, you will prefer to fire and forget about the reaction. In
those cases you can use the discard ( _ ) modifier:
_ = trigger.Execute(this.Self);
On the other hand, if you want to wait until the instruction sequence has completed, you can await for the
resolution of these:
await trigger.Execute(this.Self);
The Execute(target) method allows to pass a game object parameter, which is the Target game object of the
instructions list. For example, if the Event you are programming is trying to detect the collision between 2
colliders, the target should reference the other collider game object.
It is highly recommended to document and decorate the Event so it's easier to find and use. It is done using
class-type attributes that inform Game Creator of the quirks of this particular event.
For example, to set the title of an Event to "Hello World", use the [Title(string name)] attribute right above
the class definition:
using System;
using GameCreator.Runtime.VisualScripting;
[Title("Hello World")]
[Serializable]
public class MyEvent : Event
{
protected override void OnStart(Trigger trigger)
{
base.OnStart(trigger);
_ = trigger.Execute(this.Self);
}
}
Title
The title of the Event. If this attribute is not provided, the title will be a beautified version of the class
name.
[Title("Title of Event")]
Description
A description of what the Event does. This is used as the description text when uploading an Event to the Game
Creator Hub.
Image
The [Image(...)] attribute changes the default icon of the Event for one of the default ones. It consists of 2
parameters:
• Icon [ Type ]: a Type class of an IIcon derived class. Game Creator comes packed with a lot of icons although
you can also create your own.
• Color [ Color ]: The color of the icon. Uses Unity's Color class.
For example, one of the icons included is the "Solid Cube" icon. To display a red solid cube as the icon of
the event, use the following attribute:
[Image(typeof(IconCubeSolid), Color.red)]
Category
A sequence of sub-categories organized using the slash ( / ) character. This attribute helps keep the Events
organized when the dropdown list is displayed.
[Category("Category/Sub Category/Name")]
The example above will display the Event under the sub directory Category Sub Category Name.
Version
A semmantic version to keep track of the development of this Event. It's important to note that when updating
an Event to the Game Creator Hub, the version number must always be higher than the one on the server.
The semmantic version follows the standard Major Version, Minor Version, Patch Version. To know more about how
semmantic versioning works, read the following page: https://semver.org.
[Version(1, 5, 3)]
Parameters
When an Event has exposed fields in the Inspector, it's a good idea to document what these do. You can add as
many [Parameter(name, description)] attributes as exposed fields has the Event.
Keywords
Keywords are strings that help the fuzzy finder more easily search for an Event. For example, the "On Become
Visible" event doesn't reference the word "hide" anywhere in its documentation. However, these words are very
likely to reference this event when the user types them in the search box.
[Keywords("Hide")]
Example
The Example attribute allows to display a text as an example of use of this Event. There can be more than one
[Example(...)] attribute per event. This is particularly useful when uploading events on the Game Creator Hub.
Markdown
Multiple Lines
You can use the @ character in front of a string to break the example text in multiple lines. To create a new
paragraph, simply add two new lines. For example:
[Example(@"
This is the first paragraph.
This is also in the first paragraph, right after the previous sentence
Dependency
This attribute is optional and only used in the Game Creator Hub. If this Event uses some particular feature
of a specific module, it will first check if the user downloading this event has that module installed. If it
does not, it will display an error message and forbid downloading it. This is useful to avoid throwing
programming errors.
[Dependency("gamecreator.inventory", 1, 5, 2)]
1.5.4 Conditions
Conditions
Conditions are components attached to game objects that, when executed, start checking the conditions in each
Branch, from top to bottom. If all the Conditions of a branch return success, then the Instructions associated
to that branch are executed, and stops checking any further.
If any of the Conditions of a Branch returns false , it skips to the next branch.
Conditions
Example
In the image above, the Conditions component has just one Branch. This branch checks whether the player is moving
or not. If it happens to move moving while this Conditions component is executed, it will print the "Player is
moving" message on the console.
CREATING CONDITIONS
Right click on the Hierarchy panel and select Game Creator Visual Scripting Conditions. A game object named
'Conditions' will appear in the scene with a component of the same name.
Alternatively you can also add the Conditions component to any game object clicking on the Inspector's Add
Component button and searching for Conditions.
Deleting Conditions
To delete a Conditions component, simply click on the component's little cog button and select "Remove Component"
from the dropdown menu.
ADDING BRANCHES
To add a new Branch simply click on the Add Branch button. This will create a new branch at the bottom of the
Conditions component. You can then click and drag the = symbol on the right and reorder the branch list.
Branch Order
Remember that top branches have higher priority than lower ones when executed.
All Branches have a Description field, which can be used to more easily identify what that branch does. It has
no gameplay effect.
A Branch is composed of a list of Conditions and a list of Instructions. Adding them is as easy as clicking on
the Add Condition and Add Instruction respectively and choose the desired element.
Negate Condition
It is important to note that a specific Condition can be negated. For example, if the condition "Is Player
Moving" returns success when the player is moving, but false when it's not, you can check for the opposite effect
clicking on the small green toggle. It will now return true of the player is not moving, and true otherwise.
Toggle Condition
Conditions
CONDITIONS
Sub Categories
• Audio
• Cameras
• Characters
• Game Objects
• Input
• Math
• Physics
• Platforms
• Scenes
• Storage
• Text
• Transforms
• Variables
• Visual Scripting
AUDIO
Audio
Conditions
• Is Ambient Playing
• Is Music Playing
• Is Speech Playing
• Is Ui Playing
Is Ambient Playing
Description
Parameters
Name Description
Keywords
Is Music Playing
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Is Speech Playing
Description
Parameters
Name Description
Keywords
Description
Returns true if the given target game object is playing any audio clip
Parameters
Name Description
Keywords
Is UI Playing
Audio » Is UI Playing
Description
Parameters
Name Description
Keywords
CAMERAS
Cameras
Conditions
• Is Shot Active
Is Shot Active
Description
Parameters
Name Description
Keywords
CHARACTERS
Characters
Sub Categories
• Animation
• Busy
• Combat
• Interaction
• Navigation
• Properties
• Visuals
Animation
Animation Conditions
Description
Returns true if the Character has a State running at the specified layer index
Parameters
Name Description
Layer The layer in which the Character may have a State running
Keywords
Busy
Busy Conditions
• Is Available
• Is Busy
• Is Humanoid
Description
Returns true if the Character's arms are available to start a new action
Parameters
Name Description
Keywords
Description
Returns true if the Character's legs are available to start a new action
Parameters
Name Description
Keywords
Is Available
Description
Returns true if the Character is not doing any action and is free to start one
Parameters
Name Description
Keywords
Is Busy
Description
Returns true if the Character doing an action that prevents from starting another one
Parameters
Name Description
Keywords
Is Humanoid
Description
Parameters
Name Description
Keywords
Description
Returns true if the Character's left arm is available to start a new action
Parameters
Name Description
Keywords
Description
Returns true if the Character's left leg is available to start a new action
Parameters
Name Description
Keywords
Description
Returns true if the Character's right arm is available to start a new action
Parameters
Name Description
Keywords
Description
Returns true if the Character's right leg is available to start a new action
Parameters
Name Description
Keywords
Combat
Combat Conditions
• Is Invincible
Is Invincible
Description
Parameters
Name Description
Keywords
Interaction
Interaction Conditions
• Can Interact
Can Interact
Description
Parameters
Name Description
Keywords
Character Button Pick Do Use Pull Press Push Talk Character Player
Navigation
Navigation Conditions
• Is Airborne
• Is Dashing
• Is Grounded
• Is Idle
• Is Moving
• Raycast Floor
Is Airborne
Description
Parameters
Name Description
Keywords
Is Dashing
Description
Parameters
Name Description
Keywords
Is Grounded
Description
Parameters
Name Description
Keywords
Is Idle
Description
Parameters
Name Description
Keywords
Is Moving
Description
Parameters
Name Description
Keywords
Raycast Floor
Description
Returns true if there is an obstacle the specified units below the character
Parameters
Name Description
Keywords
Properties
Properties Conditions
• Can Jump
• Compare Gravity
• Compare Height
• Compare Mass
• Compare Radius
• Compare Speed
• Is Controllable
• Is Dead
• Is Player
• Jump Force
• Terminal Velocity
Compare Mass
Description
Returns true if the character has the Can Jump property set to true
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Example 1
Phases are the name given to the feet system that detects when a limb is grounded
Example 2
Example 3
By default, humanoid characters assign the 'Phase 0' value to the left foot, and 'Phase 1' to the right foot.
This can be customized in the Footsteps section
Keywords
Compare Gravity
Description
Returns true if the comparison between a number and the Character's gravity is satisfied
Parameters
Name Description
Keywords
Compare Height
Description
Returns true if the comparison between a number and the Character's height is satisfied
Parameters
Name Description
Keywords
Compare Mass
Description
Returns true if the comparison between a number and the Character's mass is satisfied
Parameters
Name Description
Keywords
Compare Radius
Description
Returns true if the comparison between a number and the Character's radius is satisfied
Parameters
Name Description
Keywords
Compare Speed
Description
Returns true if the comparison between a number and the Character's speed is satisfied
Parameters
Name Description
Keywords
Is Controllable
Description
Parameters
Name Description
Keywords
Is Dead
Description
Parameters
Name Description
Keywords
Is Player
Description
Parameters
Name Description
Keywords
Description
Returns true if the comparison between a number and the Character's jump force is satisfied
Parameters
Name Description
Keywords
Description
Returns true if the comparison between a number and the Character's terminal velocity is satisfied
Parameters
Name Description
Keywords
Visuals
Visuals Conditions
Description
Returns true if the Character has a Prop attached to the specified bone
Parameters
Name Description
Keywords
GAME OBJECTS
Game Objects
Conditions
• Compare Layer
• Compare Tag
• Is Component Enabled
Description
Parameters
Name Description
Keywords
Compare Layer
Description
Returns true if the game object belongs to any of the layer mask values
Parameters
Name Description
Keywords
Compare Tag
Description
Parameters
Name Description
Keywords
Belong Has Is
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Is Component Enabled
Description
Parameters
Name Description
Keywords
Null Active
Description
Parameters
Name Description
Keywords
INPUT
Input
Conditions
• Is Input Pressed
• Is Input Released
• Is Key Pressed
• Is Key Released
• Is Mouse Pressed
• Is Mouse Released
Description
Returns true while the Input Action asset with a button behavior is being pressed
Parameters
Name Description
Input A reference to the Input Action asset with map and action name
Keywords
Is Input Pressed
Description
Returns true if the Input Action asset with a button behavior is pressed during this frame
Parameters
Name Description
Input A reference to the Input Action asset with map and action name
Keywords
Is Input Released
Description
Returns true if the Input Action asset with a button behavior is released during this frame
Parameters
Name Description
Input A reference to the Input Action asset with map and action name
Keywords
Description
Returns true if the keyboard key is being held down this frame
Parameters
Name Description
Keywords
Is Key Pressed
Description
Parameters
Name Description
Keywords
Button Down
Is Key Released
Description
Parameters
Name Description
Keywords
Button Up
Description
Parameters
Name Description
Keywords
Is Mouse Pressed
Description
Parameters
Name Description
Keywords
Is Mouse Released
Description
Parameters
Name Description
Keywords
MATH
Math
Sub Categories
• Arithmetic
• Boolean
• Geometry
Arithmetic
Arithmetic Conditions
• Compare Decimal
• Compare Integer
Compare Decimal
Description
Parameters
Name Description
Keywords
Compare Integer
Description
Parameters
Name Description
Keywords
Boolean
Boolean Conditions
• Always False
• Always True
• Compare Boolean
Always False
Description
Keywords
Boolean No Contradiction
Always True
Description
Keywords
Compare Bool
Description
Parameters
Name Description
Keywords
Boolean
Geometry
Geometry Conditions
• Compare Direction
• Compare Distance
• Compare Point
Compare Direction
Description
Parameters
Name Description
Keywords
Description
Returns true if a comparison of the flat XZ distance between two points is satisfied
Parameters
Name Description
Keywords
Description
Returns true if a comparison of the vertical distance between two points is satisfied
Parameters
Name Description
Keywords
Compare Distance
Description
Parameters
Name Description
Keywords
Compare Point
Description
Parameters
Name Description
Keywords
PHYSICS
Physics
Conditions
• Check Box 2D
• Check Box 3D
• Check Capsule
• Check Circle
• Check Sphere
• Is Kinematic
• Is Sleeping
• Raycast 2D
• Raycast 3D
Check Box 2D
Description
Parameters
Name Description
Position The scene position where the box's center is cast. Z axis is ignored
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 2D physics engine. It won't collide with any 3D objects
Keywords
Check Box 3D
Description
Parameters
Name Description
Half Extents Half size of the cube that extents along its local axis
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 3D physics engine. It won't collide with any 2D objects
Keywords
Check Capsule
Description
Parameters
Name Description
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 3D physics engine. It won't collide with any 2D objects
Keywords
Description
Returns true if the character fits with the new radius and height values
Parameters
Name Description
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 3D physics engine. It won't collide with any 2D objects
Keywords
Check Circle
Description
Parameters
Name Description
Position The scene position where the circle's center is cast. Z axis is ignored
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 2D physics engine. It won't collide with any 3D objects
Keywords
Check Sphere
Description
Parameters
Name Description
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 3D physics engine. It won't collide with any 2D objects
Keywords
Is Kinematic
Physics » Is Kinematic
Description
Parameters
Name Description
Keywords
Is Sleeping
Physics » Is Sleeping
Description
Parameters
Name Description
Keywords
Raycast 2D
Physics » Raycast 2D
Description
Parameters
Name Description
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 2D physics engine. It won't collide with any 3D objects
Keywords
Raycast 3D
Physics » Raycast 3D
Description
Parameters
Name Description
Layer Mask A bitmask that skips any objects that don't belong to the list
Example 1
Note that this Instruction uses Unity's 3D physics engine. It won't collide with any 2D objects
Keywords
PLATFORMS
Platforms
Conditions
• Check Platform
• Is Batch Mode
• Is Console
• Is Editor
• Is Mobile
Check Platform
Description
Is Batch mode
Description
Keywords
Server
Is Console
Platforms » Is Console
Description
Keywords
Is Editor
Platforms » Is Editor
Description
Keywords
Unity
Is Mobile
Platforms » Is Mobile
Description
Keywords
SCENES
Scenes
Conditions
• Is Scene Loaded
Is Scene Loaded
Description
Parameters
Name Description
STORAGE
Storage
Conditions
• Has Save
Description
Keywords
Has Save
Description
Keywords
TEXT
Text
Conditions
• Text Contains
• Text Equals
Text Contains
Description
Returns true if the second text string occurs in the first one
Parameters
Name Description
Keywords
Text Equals
Description
Parameters
Name Description
Keywords
String Char
TRANSFORMS
Transforms
Conditions
• Child Count
• Is Child Of
• Is Sibling Of
Child Count
Description
Parameters
Name Description
Comparison The comparison operation between the child count and a value
Keywords
Is Child Of
Transforms » Is Child Of
Description
Returns true if the game object is the parent of the other one
Parameters
Name Description
Child The game object instance further down in the hierarchy of the parent
Keywords
Is Sibling Of
Transforms » Is Sibling Of
Description
Returns true if the game object shares the same parent as the other one
Parameters
Name Description
Keywords
VARIABLES
Variables
Conditions
• List Is Empty
List is Empty
Description
Parameters
Name Description
Keywords
VISUAL SCRIPTING
Visual Scripting
Conditions
• Conditions As And
• Run Conditions As Or
Conditions as AND
Description
Returns true only if all the Conditions from the list are True
Keywords
Conditions as OR
Description
Returns true if at least one of the Conditions from the list is True
Keywords
| One Selector
Custom Conditions
This section assumes you have some programming knowledge. If you don't know how to code you might be interested
in checking out the Game Creator Hub page. Programmers altrusitically create custom Conditions for others to
download and use in their project.
CREATING A CONDITION
The easiest way to create an Condition C# script is to right click on your Project panel and select Create
Game Creator Developer C# Condition. This will create a template script with the boilerplate structure:
using System;
using GameCreator.Runtime.Common;
using GameCreator.Runtime.VisualScripting;
[Serializable]
public class MyCondition : Condition
{
protected override bool Run(Args args)
{
return true;
}
}
Anatomy of an Instruction
A Condition is a class that inherits from the Condition super class. The abstract Run(...) method is the entry
point of a Condition's execution, which is automatically called. This method must always return true if it's
successful, or false otherwise.
The Run(...) method has a single parameter of type Args , which is a helper class that contains a reference to
the game object that initiated the call ( args.Self ) and the targeted game object ( args.Target ), if any.
It is highly recommended to document and decorate the Condition so it's easier to find and use. It is done
using class-type attributes that inform Game Creator of the quirks of this particular condition.
For example, to set the title of a condition to "Hello World", use the [Title(string name)] attribute right
above the class definition:
using System;
using GameCreator.Runtime.Common;
using GameCreator.Runtime.VisualScripting;
[Title("Hello World")]
[Serializable]
public class MyCondition : Condition
{
protected override bool Run(Args args)
{
return true;
}
}
Title
The title of the Condition. If this attribute is not provided, the title will be a beautified version of the
class name.
[Title("Title of Condition")]
Description
A description of what the Condition does. This is both used in the floating window documentation, as well as
the description text when uploading a Condition to the Game Creator Hub.
Image
The [Image(...)] attribute changes the default icon of the Condition for one of the default ones. It consists
of 2 parameters:
• Icon [ Type ]: a Type class of an IIcon derived class. Game Creator comes packed with a lot of icons although
you can also create your own.
• Color [ Color ]: The color of the icon. Uses Unity's Color class.
For example, one of the icons included is the "Solid Cube" icon. To display a red solid cube as the icon of
the condition, use the following attribute:
[Image(typeof(IconCubeSolid), Color.red)]
Category
A sequence of sub-categories organized using the slash ( / ) character. This attribute helps keep the
Conditions organized when the dropdown list is displayed.
[Category("Category/Sub Category/Name")]
The example above will display the Condition under the sub directory Category Sub Category Name.
Version
A semmantic version to keep track of the development of this Condition. It's important to note that when
updating a Condition to the Game Creator Hub, the version number must always be higher than the one on the
server.
The semmantic version follows the standard Major Version, Minor Version, Patch Version. To know more about how
semmantic versioning works, read the following page: https://semver.org.
[Version(1, 5, 3)]
Parameters
When a Condition has exposed fields in the Inspector, it's a good idea to document what these do. You can add
as many [Parameter(name, description)] attributes as exposed fields has.
Keywords
Keywords are strings that help the fuzzy finder more easily search for a condition. For example, the "Is
Character Moving" condition doesn't reference the word "idle" or "walk" anywhere in its documentation.
However, these words are very likely to reference this condition when the user types them in the search box.
Example
The Example attribute allows to display a text as an example of use of this Condition. There can be more than
one [Example(...)] attribute per condition. This is particularly useful when uploading conditions on the Game
Creator Hub.
Markdown
Multiple Lines
You can use the @ character in front of a string to break the example text in multiple lines. To create a new
paragraph, simply add two new lines. For example:
[Example(@"
This is the first paragraph.
This is also in the first paragraph, right after the previous sentence
Dependency
This attribute is optional and only used in the Game Creator Hub. If this Condition uses some particular
feature of a specific module, it will first check if the user downloading this condition has that module
installed. If it does not, it will display an error message and forbid downloading it. This is useful to avoid
throwing programming errors.
[Dependency("gamecreator.inventory", 1, 5, 2)]
1.5.5 Hotspots
Hotspots
Hotspots are components attached to game objects that don't have any direct impact on gameplay. Instead, they
help the user understand what's interactive and what is not. For example, highlighting a specific object when
the player character is nearby, making the head turn towards an important object and so on.
Hotspots
Trigger + Hotspot
Triggers are usually placed along side with Hotspot components. One deals with the interaction itself, while the
other hints the player about the Trigger being an interactive object.
HOW IT WORKS
A Hotspot consists of a Target field and a Mode, which determine the object being followed and when it reacts.
There are 4 possible modes:
• Radius: Displays an extra field with a numeric value. The Hotspot will react when the target is inside its
radius.
• On Interaction Focus: The Hotspot will react whenever the Target's Interaction system focuses on the
Hotspot.
• On Interaction Reach: The Hotspot will react whenever the Target's Interaction system has the Hotspot is
within reach but isn't focused on it.
• Always Active: The Hotspot will always react regardless of the distance to the Target.
These two modes require the Target to be a Character component. To know more about how the Interaction system
works, see the Interaction section.
Hotspot Gizmo
Selecting a game object with a Hotspot component with a Radius mode will display in the scene a visual
representation of the distance at which the target is considered close enough to activate it.
Debugging
On playmode, the red gizmo appears in a much lighter color. If the targeted object activates the Hotspot, the
Hotspot's gizmo will change to green, to indicate the Hotspot is active.
No Phyics Engine
The Hotspot distance check doesn't use Unity's Phyics engine because it would force both the Hotspot and the
targeted object to have a Collider component attached to them. Instead it simply checks the distance between the
center of the hotspot and the targeted game object.
CREATING HOTSPOTS
There are two ways to create a Hotspot object. One is to create an object that contains a Hotspot component,
by right clicking on the Hierarchy panel and selecting Game Creator Visual Scripting Hotspot. This creates
a scene object with the component attached to it.
However, an Actions component can also be added to any game object. Simply click on any game object's Add
Component button and type Actions.
Deleting Actions
To delete an Actions component, simply click on the component's little cog button and select "Remove Component"
from the dropdown menu.
ADDING SPOTS
Spots are individual elements that highlight something specific and are evaluated from top to bottom.
To add a new Spot click on the Add Spot button and choose the desired one from the dropdown list. Note that
Spots are evaluated from top to bottom. There can be two spots of the same type, but if they both overlap, the
last one will override the effect.
Spots
SPOTS
Sub Categories
• Audio
• Characters
• Game Objects
• Materials
• Ui
AUDIO
Audio
Spots
• Play Sound
Play Sound
Description
Plays a User Interface sound effect when the Hotspot is activated or deactivated
Keywords
Audio Sounds
CHARACTERS
Characters
Spots
• Look At
Look At
Characters » Look At
Description
Makes the Character look at the center of the Hotspot when it's activatedand smoothly look away when it's
deactivated
GAME OBJECTS
Game Objects
Spots
• Activate Object
• Instantiate Prefab
Activate Object
Description
Activates a game object scene instance when the Hotspot is enabled and deactivates it when the Hotspot is
disabled
Instantiate Prefab
Description
Creates or Activates a prefab game object when the Hotspot is enabled and deactivates it when the Hotspot is
disabled
MATERIALS
Materials
Spots
• Change Material
Change Material
Description
Keywords
UI
Ui
Spots
• Change Text
• Cursor
Change Text
UI » Change Text
Description
Cursor
UI » Cursor
Description
Description
Displays a text in a world-space canvas when the Hotspot is enabled and hides it when is disabled. If no
Prefab is provided, a default UI is displayed
1.6 Variables
1.6.1 Variables
Variables are data containers that allow to dynamically change their value and let the game keep track of the
player's progress.
Example
A very simple use case of Variables is keeping track of the player's score. Let's say we have a named variable
called score and has an initial value of 0. Every time the player picks up a star, the score variable is
incremented and its value is displayed.
Types of Variables
NAME VARIABLES
Are identified by their unique name. For example, the name score can reference a numeric variable that keeps
track of the player's score value.
Name Variables
LIST VARIABLES
Are identified by their 0-based index. Think of them as a collection of values, placed one after another. For
example, to access the first value, use the index 0. To access the second position, use the index 1, etc...
List Variables
Name or List?
As a rule of thumb, it is recommended the use of Name Variables. List Variables are useful when you have an
unknown number of objects to choose from. For example, when locking on an enemy from a group that surrounds the
player.
Scope of Variables
LOCAL VARIABLES
Local Variables are bound to a particular scene and can't be used outside of it.
GLOBAL VARIABLES
On the other hand, Global Variables can be queried and modified from any scene.
Types
Both Global Variables and Local Variables can be List or Name based.
Value Types
All Variables have an initial value assigned to them that can be modifed at runtime. By default, Game Creator
comes with a limited number of types to choose from, but other modules might increment the amount available.
• Color: Stores an RGBA color value. Can also contain HDR information.
Saving Values
It is important to note that not all data types can be saved between play-sessions. Textures, Sprites and Game
Objects and not primitive types and thus, they can't be serialized at runtime.
Nested Access
Nested Access is a concept that allows jumping between different variables using one single command.
For example, let's say the Player object has a Local Named Variable called target of type Game Object. This
game object is dynamic but let's say the targeted object will always have another Local Named Variable called
health that contains how many hit points the enemy has.
The health variable can be accessed using the key target/health (with a slash). This means: Get the variable
value health that the variable target points to.
Global Name Variables are variables identified by a unique string of characters that live outside the scene
and can be accessed and modified from anywhere.
To create a Global Name Variable, right click on the Project Panel and select Create Game Creator Variables
Name Variables. A new asset will appear in the project panel, which can be used to define each of the
variables contained within.
Conflicting ID
Note that two Global Variables can't have the same unique ID. Otherwise they'll override each other's values. To
generate a new unique ID, expand the ID field and click the "Regenerate" button.
To add a new variable entry, type the name of the variable on the creation field and press enter (or click on
the little [+] button).
The name of a variable can be modified, as well as its value type. The Value field also contains the starting
value of this particular variable entry.
Values can be saved between play sessions to later be restored when loading a game. Disabling the save option
will make all variables keep the initial value as their starting value, even after loading a previously saved
game.
Global List Variables are variables identified by their numberic index value and can be accessed from
anywhere.
To create a Global List Variable, right click on the Project Panel and select Create Game Creator Variables
List Variables. A new asset will appear in the project panel, which can be used to define the collection of
variables.
Conflicting ID
Note that two Global Variables can't have the same unique ID. Otherwise they'll override each other's values. To
generate a new unique ID, expand the ID field and click the "Regenerate" button.
Vales can be saved between play sessions to later be restored when loading a game. Disabling the save option will
make all variables keep the initial value as their starting value, even after loading a previously saved game.
Local Name Variables are variables identified by a unique string of characters that live inside a scene and
can only reference objects that are contained inside this scene.
To create a Local Name Variable, right click on the Hierarchy Panel_ and select Game Creator Variables
Name Variables. A new game object will appear with the Local Name Variables component. Alternatively you can
also add this component to any existing game object.
Conflicting ID
Note that two Local Variables can't have the same unique ID. Otherwise they'll override each other's values. To
generate a new unique ID, expand the ID field and click the "Regenerate" button.
To add a new variable entry, type the name of the variable on the creation field and press enter (or click on
the little [+] button).
The name of a variable can be modified, as well as its value type. The Value field als contains the starting
value of this particular variable entry.
Vales can be saved between play sessions to later be restored when loading a game. Disabling the save option will
make all variables keep the initial value as their starting value, even after loading a previously saved game.
Local List Variables are variables identified by their numberic index value and can only be accessed from the
scene they are part of.
To create a Local List Variable, right click on the Hierarchy Panel_ and select Create Game Creator
Variables List Variables. A new game object with the component will appear in the scene and hierarchy.
Alternatively, you can also add the Local List Variables component to any existing game object.
Conflicting ID
Note that two Local Variables can't have the same unique ID. Otherwise they'll override each other's values. To
generate a new unique ID, expand the ID field and click the "Regenerate" button.
Vales can be saved between play sessions to later be restored when loading a game. Disabling the save option will
make all variables keep the initial value as their starting value, even after loading a previously saved game.
1.7 Advanced
1.7.1 Advanced
Game Creator includes a collection of tools used throughout the entire ecosystem. This section briefly goes
over all of them and provides a link to each tool's page, where they are explained in-depth, with use cases
and examples.
Advanced Level
This section of the Documentation assumes you are familiar with Unity and Game Creator. Some sections may require
you to also have some coding knowledge.
Audio
Game Creator has a 4 channel audio system that makes it very easy to change volume settings and play both
diegetic and non-diegetic sound effects.
Signals
Communication between game objects is handled using the visual scripting tools, such as Triggers and Actions.
However, there may be cases where the developer needs to respond to more tailored events that don't exist in
Game Creator.
Signals
The Raise Signal instruction broadcasts a message with a specific identifier and any Trigger(s) listening to
that specific id will be executed. To receive a signal message, use the On Receive Signal and specify the
identifier.
Mark as Favorite
To avoid misspelling mistakes you can mark a Signal name as favorite, which can be used selecting them from the
dropdown button on the right side. To unfavorite a name, simply click again on the star button.
Data Structures
Advanced Data Structures (also known as ADS) are generic data structures that help better perform certain
tasks.
• Singleton: It ensures there's zero or one instance of a class at any given moment and its value is globally
accessible.
• Tree: Generic structure that allows to have acyclic parent-child depenedencies between multiple class
instances.
• Ring Buffer: This structure is similar to a generic list, but sequentially accessing its elements yields in
an infinite circular loop, where the last element connects with the first one.
• State Machine: A data structure that allows to dynamically manipulate a state machine and define logic on
each of its nodes independently.
• Spatial Hash: An advanced data structure that allows to detect collisions of any radial size inside an
infinite spatial domain with an O complexity of log(n).
Variables API
Local Variables and Global Variables can be modified at runtime using the exposed API. Note that Local
variables are accessed via their component and Global variables require to be accessed through a singleton
manager that contain their runtime values.
Properties
Properties are a core feature that allows to dynamically access a value. They are usually displayed as a drop-
down menu and allow to retrieve them depending on the option selected.
For example, a PropertyGetPosition allows to get a Vector3 that represents a position, from different sources; A
constant value, the Player's position, the main camera's position, from a Local Variable, etc...
Game Creator comes with a fully extensible save and load system that allows to easily keep track of the game
progress and restore its state at any time. All that needs to be done is to implement an interface called
IGameSave and subscribe/unsubscribe inside the OnEnable() and OnDisable() methods respectively.
There is a special component called Remember that allows to cherry-pick the bits of data you want to save when
saving a game.
Tweening
Game Creator comes packged with a powerful Tweening (or automatic frame interpolation, from in-between-ing)
system. It allows to fire & forget a command that creates a tween between a starting value and end value. The
transition can be linear or an easing function can be specified.
Game Creator and all modules come with a collection of examples and templates ready to be used on your games
and applications. Other developers can leverage this feature in order to create reusable examples that can be
installed/uninstalled across multiple projects or share them if you are a module developer using the Example
Manager window.
Domain Reload
Game Creator supports skipping domain reloading, which reduces the time it takes for Unity to enter and exit
play-mode.
Make sure Enter Play Mode Options is ticked and the Reload Domain option is disabled.
1.7.2 Audio
Game Creator comes with an audio manager that automatically manages and optimizes the creation and decomission
of audio sources. There are 4 different types of audio channels, each with its own volume slider and
properties.
Ambient
Ambient sounds are what one could also call background music or ambience. It's a looped tracked played in the
background, and can be diegetic or non-diegetic. For example, a battle music track, the chirping of birds in a
forest, or the sound of a waterfall.
Use the Play Ambient Instruction to play an audio clip as an Ambient sound. It will keep playing until a Stop
Ambient Instruction is executed.
Sound Effects
Sound Effects (also known as SFX) are one-time clips played at a very specific time. The majority of sounds on
a game will be sound effects, for example: Punching a character, footstep sounds, or a slash of a sword. Most
sound effects are diegetic and thus, by default expect a spatial position.
Sound Variation
To avoid the jarring effect where the same sound effect is played over and over again in a small time window,
sound effects can automatically randomly alter the speed and pitch of sounds. This allows to, for example, play a
machine gun sound effect, where each shot is slightly different than the previous one.
Use the Play Sound Effect Instruction to play an audio clip as a Sound Effect. It will automatically decommision
the audio source once the clip finishes playing.
UI
UI sound effects are non-diegetic clips played when the player interacts with the user interface. For example,
hovering over a button, clicking it or crafting an item after the user waits a timeout.
Play UI Instruction
Speech
Speech clips are very similar to Sound Effects with the difference that they are bound to a Character, so that
a specific character can only play one speech clip at a time.
Use the Play Speech Instruction to play an audio clip as a Speech sound effect. If another clip is was being
played on the same target, it will stop the previous speech and play the new one. This is useful when the user
skips conversations.
Index
DATA STRUCTURES
Advanced Data Structures (also known as ADS) are generic data structures that help better perform certain
tasks.
• Singleton: It ensures there's zero or one instance of a class at any given moment and its value is globally
accessible.
• Tree: Generic structure that allows to have acyclic parent-child depenedencies between multiple class
instances.
• Ring Buffer: This structure is similar to a generic list, but sequentially accessing its elements yields in
an infinite circular loop, where the last element connects with the first one.
• State Machine: A data structure that allows to dynamically manipulate a state machine and define logic on
each of its nodes independently.
• Spatial Hash: An advanced data structure that allows to detect collisions of any radial size inside an
infinite spatial domain with an O complexity of log(n).
Unique ID
To generate unique identifiers, it is usually used the System.Guid class, because it provides a fast and
reliable mechanism to generate long enough IDs that the collision chance is almost zero.
However, this class is not serializable. That's why Game Creator comes with the UniqueID class, which serves
two purposes:
• Serializable: This means that any changes made to this ID will be kept between editor sessions.
• Custom UI: When showing this ID in a Unity Window, it automatically displays a nice and handy box with
buttons that allow to easily modify this ID or even regenerate it, in case that's necessary.
INITIALIZATION
To initialize a class instance of UniqueID is as easy as calling the constructor class. For example, let's say
we want to add a unique ID to a MonoBehaviour class:
This will automagically assign a unique ID to the myID field. If we drag and drop this component onto a scene
game object, we'll see this field with its associated ID.
ACCESSING ID
Accessing the ID value can be performed getting the IdString struct, which contains a string based ID and its
hash value. This last one is recommended when comparing to ids:
string id = this.myID.Get.String;
Best Practices
Accessing the string value of the UniqueID should only be done if you plan on serializing this value somewhere.
For comparing two IDs, it is best if you simply compare their hash value, as the probablity that two strings have
the same hash value its very, very very low. On the other hand, comparing two int values is extremely fast and
performant.
Singleton
The Singleton pattern ensures there's, at most, one instance of a class at any given time. Because of that, it
can be globally accessed from its class name. To make a singleton class, inherit from the Singleton<T> type:
To access this class, use MyClass.Instance which returns an instance of the MyClass. If none was present, it
creates one and then it returns it, so you don't have to worry about keeping track whether it has been created
or not.
MonoBehaviour
This Singleton pattern is specifically designed to work with Unity and thus, it requires the MyClass to inherit
from MonoBehaviour . However, this is defined automatically when inheriting from the Singleton<T> class.
If you need to perform some setup when creating a new class instance, override the the OnCreate() method.
Likewise, you can also override the OnDestroy() method to execute some logic when the instance is destroyed.
Singleton instances can survive or be destroyed every time their scene is unloaded. By default all singleton
classes survivde scene reloading. But if you want to destroy them when changing between scenes, override the
SurviveSceneLoads and set it to false :
Dictionary
The serializable dictionary allows to have the whole fully fledged functionality of System.Collections.Dictionary
but also allows to automatically serialize its values.
To create a serializable dictionary, simply inherit from TSerializableDictionary<TKey, TValue> . For example, to
create a dictionary that uses string as their key and GameObject as their value:
You can now create a dictionary that automatically serializes its values and use it as any normal dictionary:
Hash Set
The serializable hash set allows to have the functionality of System.Collections.HashSet but also allows to
automatically serialize its values.
To create a serializable hash set, simply inherit from TSerializableHashSet<T> . For example, to create a hash
set that uses string types:
You can now create a hash set that automatically serializes its values and use it as:
Link List
The serializable linked list allows to have the functionality of System.Collections.LinkedList but also allows to
automatically serialize its values.
To create a serializable linked list, simply inherit from TSerializableLinkList<T> . For example, to create a
hash set that uses GameObject types:
You can now create a list that automatically serializes its values and use it as:
Matrix 2D
The serializable 2D matrix allows to have an array of arrays (where all rows and columns have the same size)
and the structure can be serialized in order to persist in the Inspector or saving the game.
To create a serializable matrix, simply inherit from TSerializableMatrix2D<T> . For example, to create a matrix
that uses GameObject :
You can now create a matrix that automatically serializes its values:
Tree
The Tree class allows to create acyclic dependency graphs that start from a root node and end with leaf nodes.
A single node can have an unlimited number of branches.
To create a Tree, inherit from the Tree<T> class, where T is the value type of the node. For example, to
create a tree of game objects:
A Tree<T> class is both the tree and the node class. So any child of a tree returns a tree object too. A tree
can return its parent:
Ring Buffer
The Ring Buffer is a very interesting data structure that works very similar to an array, except that its
capacity is capped and iterating over its elements will automatically jump from its tail to its head when
reaching the end of the list. Think of it as an array with a limited capacity where the tail joins the head,
thus shaping it a ring.
To create a ring buffer, create a class that inherits from the Ring<T> class or directly use the Ring<T> type.
For example, to create a ring buffer with 5 elements:
The ring buffer starts with its index pointing to the first element. Calling Next() , Current() and Previous()
will change the pointer and return the new value. For example:
The previous code snippet will iterate the previous ring 20 times (100 / 5) and print the name of each entry.
An interesting method of the ring buffer is the Update(callback) . This method accepts a method as its parameter
and executes it for every element of the ring. For example:
myRing.Update(Debug.Log);
The previous method will print each of the entries of the ring buffer, as the Debug.Log() method is applied to
each one of them.
State Machine
A State Machine is a commonly used pattern that allows to isolated the complexity of multiple tasks in
different nodes, in a way that each node is not aware of what others do.
For a full description of what a finite state machine is check this Wikipedia article.
CREATING STATES
Let's start seeing how to create states before creating a state machine. A State is a single node unit from
the state machine. To create one, create a class that inherits from the StateMachine.State abstract class:
A State has 3 virtual methods that can be overriden in order to execute its custom logic:
A state has an IsActive property that can be queried to check if this state is currently the active one.
If you need to hook events to a State in order to make it work with other scripts, you can also subscribe to
its event system.
// Executed every frame while this state is active, before the WhenUpdate(...)
event Action<StateMachine, State> EventOnBeforeUpdate;
Now let's hook an external method that prints a message when the state is entered:
state1.EventOnEnter += this.OnEnterState;
First State
Note that a State Machine requires at least one state to be passed to the constructor. This is the first starting
state that the machine will begin with.
The developer is responsible for calling its Update() method. We recommend calling it in a MonoBehaviour's
Update() .
To instruct the machine to change from one state to another, use the Change(State) method:
// Change to state2
machine.Change(state2);
A State Machine also has 2 events that allow methods to be subscribed, which are launched as soon as there is
a change in the currently active state:
Spatial Hash
The Spatial Hash algorithm is a performant non-physics based query system that returns a list of objects
contained in a position and a certain radius.
Performance
This algorithm scales with the amount of objects tracked. Its performance shines the most when there are multiple
queries launched in a single frame. For more information about how this algorithm works check this Twitter post:
https://twitter.com/catsoftstudios/status/1201520331724333058
CREATING A DOMAIN
The first thing needed is to create a world domain from where to track all objects and organize the space
partitioning. We recommend setting up a static class that will handle registering all the changes that happen
in the scene. For example:
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
private static void OnSubsystemsInit()
{
Value = new SpatialHash();
}
}
The previous code snippet initializes the Value field with the default SpatialHash constructor. the
OnSubsystemInit() is a method that gets called at the very beginning of starting the game, before any scene is
loaded, thanks to its attribute.
TRACKING CHANGES
Each object instance is responsible for updating the domain value when it changes. To do so, the object must
implement the ISpatialHash interface, as well as call the Insert() , Remove() and Update() methods to start, stop
and update the spatial hash's domain. For example:
void OnDisable()
{
// Stop tracking this object
MySpatialHash.Value.Remove(this);
}
void Update()
{
// Update tracking position
MySpatialHash.Value.Update(this);
}
Boost Performance
This code is meant for demonstration purposes and might not be optimal on every case. If you want to squeeze
every drop of performance, you may want to cache the last tracked position and only call the Update(this) method
when its position has changed.
REQUESTING COLLECTIONS
To request all the objects around a point and within a specific radius, use the Query(Vector3 point, float radius)
method, which returns a list of game objects contained in the specified region.
The list contains all components that implement the ISpatialHash interface tracked in this domain that are
within the spherical region defined.
Local Variables
Local Name Variables and Local List Variables are components attached to game objects and their value is bound
to the scene they are. To access their runtime values you reference the component and call one of their public
methods.
Local Name Variables are components attached to game objects and can be referenced like any other script. To
access any of its values you can use the following methods:
Getting values
Returns the value of the variable. Requires to be casted to the correct value
Setting values
Listening to events
You can also register when a Local Name Variable changes using the following methods:
A Local List Variables component has the following methods for getting and manipulating its values:
Getting values
int Count
Setting values
void Clear()
Listening to events
You can also register when a Local List Variable changes any of its items using the following methods:
Global Variables
Global Name Variables and Global List Variables are scriptable objects and their runtime value is stored in a
separate singleton manager called GlobalNameVariablesManager and GlobalListVariablesManager .
Getting values
Returns the value of the variable. Requires to be casted to the correct value
Setting values
Listening to events
You can also register when a Global Name Variable changes using the following methods:
Executes the callback every time the variable changes its value
Gettings values
Setting values
Listening to events
You can also register when a Global List Variable changes any of its items using the following methods:
1.7.5 Properties
Game Creator properties are a special type of class that allows to dynamically specify the source of a field
value using a dropdown menu. The menu's options are dynamic and can be added without the need of overwriting
Game Creator core code, allowing to write maintainable and decoupled code.
Polymorphic Serialization
Properties take advantage of Unity's polymorphic serialzation, which means that the dropdown menu options are
decoupled from the core code. Anyone can plug in their own menu options without overwriting any scripts.
There are different types of Properties, each with its own set of options. All of them have in common that,
when retrieving them, an instance of Args parameter is passed, which contains two fields:
• Target: A reference to the Game Object responsible for calling the property
Args Parameter
There are some cases where the Target and Self fields will reference the same game object.
Property Get types allow to retrieve a value and Property Set types allow to set a value. Game Creator comes
with a collection of both types, but each module increases the amount available. You can even create your own
property types to extend the existing ones.
Property Types
There are a multiple default property types available, which start with PropertyGet ~ and end with the type.
For example PropertyGetNumber is the property type for numeric values, and PropertyGetBool is the analog for
boolean (true/false) values.
There are also property setters, which allow to set the value of a property. They start with PropertySet ~ and
also end with the type name. For example the PropertySetGameObject allows to set the value of a game object
reference.
Using Properties
UI Toolkit
Using properties requires the Editor scripts to be written using Unity's UI Toolkit. IMGUI is not supported.
To use a property it's very simple. You just need to declare them as you would with a primitive type, but
instead of getting the value directly, call the Get(args) method to retrieve its value.
For example, let's say that in a component, you want to get a string value. Instead of declaring a value like
this:
You could use a property so the source of that string value isn't hard-coded, but set from the Inspector. Like
this:
This will display a dropdown menu on the Inspector with the current option selected. By default it's a
constant string, but the value can be chosen to come from the name of a game object, a local or global
variable, etc.
Args
The Args (arguments) class is a two-field struct that contains the game object considered as the source of the
call as well as the targeted game object. This class is necessary in order to use properties that reference the
"Self" or "Target" values. If you are not sure what the self and target objects are, simply pass in the current
MonoBehaviour's game object:
Creating Properties
Just like Instructions and other visual scripting nodes, one can create custom properties to interact with
other assets or custom code. To create a new GET Property simply inherit the PropertyTypeGet[TYPE] .
For example let's say we want to create a custom number GET property that always returns 42 (for some reason). In
that case we create a new script that inherits from PropertyTypeGetNumber called GetNumber42 :
Adding fields
You can also expose fields just like you would do in a custom Inspector script. For example, if you want to
display an integer field which will be returned by the property you can do so:
You can add as many fields as you want. Even other properties.
To return the value the Get(args) method must be implemented. The Args parameter contains the Self and Target
values calling the property, which can be used to dynamically get the final value if necessary.
Optionally the PropertyTypeGetNumber child class can also override the String property to display a nicer title
in the Unity Inspector. For example:
Property classes can also be decorated with the Title , Category , Description and other attributes, just like it
is done on Instructions and other visual scripting nodes.
Game Creator comes with a flexible mechanism to keep track of changes made at runtime and store these by
calling a simple Save() method. Likewise, restoring any previously saved game can be done executing a Load()
method from the class responsible for managing this functionality.
STORAGE LOCATION
Game Creator makes it very easy to choose how data is saved. By default it uses the Player Prefs system from
Unity, which stores all the data in a file which varies its location depending on the runtime platform. See
the Unity documentation for Player Prefs for more information.
STORAGE ENCRYPTION
Game Creator also makes it very easy to encrypt your game saves using various encryption algorithms, which you
can choose from the dropdown button above the storage location.
The default algorithms are very simple ones that prioritize speed over security.
• XOR: A symmetric algorithm that obfuscates the data by performing a logic XOR operation with a pass-phrase.
• Caesar: Another symmetric algorithm that obfuscates the data by shifting each alphanumeric value by a number
specified.
The Save/Load system can save any primitive serializable field: integers, booleans, strings, positions,
rotations or any managed instance type marked with the [System.Serializable] attribute.
However, it does not serialize objects inheriting or fields referencing objects that inherit from Unity.Object .
For example: Game Objects, Transforms, MonoBehaviours, ...
SAVE SLOTS
Most games allow to store multiple saves and allow the user to choose which one to restore when loading a
previous saved play. With Game Creator, each one of these save spaces are called slots and they are
represented by an integer number ranging from 1 up to 999.
Note
Notice that you can have up to 998 slots. The number 0 is reserved for shared settings.
SAVING
To save a game, it's as easy as calling the Save(slot: integer) method through the SaveLoadManager singleton
class. This class is responsible for tracking all objects in the scene and silently collects their state in a
background process. Saving a game can be done using the following line, passing a constant save slot number 1
as a parameter:
SaveLoadManager.Instance.Save(1);
By default, the saving system uses Unity's PlayerPrefs system, which blocks the main thread until al data is
written. However, Game Creator provides tools that allow to customize how data is saved. You could even have
an online database where you dump the player's save files.
Because we can't assume the saving will be done synchronously, the Save(slot: int) method returns a Task that
can be awaited. This is very useful if you plan on synchronizing the game save with an external database, such
as Steam, Firebase or any other online data warehouse service.
To handle these cases, all that needs to be done is use an async method and await the result. Like so:
However, if you are using the default PlayerPrefs save system or your custom one does block the main thread
when saving, you can either await the task or use a discard operator:
LOADING
It is important to highlight that loading a game forces to unload the current scene and loads the saved one
afterwards. Even if they are the same.
SaveLoadmManager.Instance.Load(1);
The Load(slot: int) method returns a Task object, just like the Save(slot: int) . You can choose to either await
the load or, in most cases, use the discard operator:
DELETING
A user may want to delete all the information associated to a save slot. This can be done using the following
line:
SaveLoadManager.Instance.Delete(1);
The Delete(slot: int) method also returns a Task object. However, in this case, it may be more interesting
knowing when a delete operation has finished.
EVENTS
The saving and loading system contains 6 events that programmers can hook onto to detect when a saving and a
loading process has started.
For example, doing something when a save operation is about to start can be achieved subscribing to the
EventBeforeSave event:
void Start()
{
SaveLoadManager.Instance.EventBeforeStart += this.OnBeforeSave;
}
You can subscribe to as many methods as you need in each event. However, make sure to remove the subscription
when the class that is doing subscribing is destroyed. For example, following the excerpt from above, it would
also be optimal to do:
void OnDestroy()
{
SaveLoadManager.Instance.EventBeforeStart -= this.OnBeforeSave;
}
CUSTOMIZE
As mentioned before, Game Creator doesn't assume a specific save or load procedure. In fact, it provides with
tools to customize how data is collected and stored in order for the developer to customize it and tailor it
to its needs.
Custom Data
The SaveLoadManager class keeps track of all savable objects in the scene and collects their state in a
background process so when the Save() method is invoked, it contains all the information required to
successfully perfom the oepration.
In order to let the SaveLoadManager know what objects it needs to keep track of the developers need to
implement the IGameSave interface on each object that contains data to save.
As soon as the object is available, it must call the Subscribe(reference: IGameSave, priority: int) method.
Likewise, when the object is destroyed it should call Unsubscribe(reference: IGameSave) .
The IGameSave interface requires to fill the following methods and properties:
• bool IsShared : Tells whether this data is shared across all save games
• Type SaveType : Returns the type of the object to be serialized and stored
• object SaveData : Returns the instance of the object that's going to be saved
• LoadMode LoadMode : Define whether loading happens following a Greedy or a Lazy format
In order to understand better how this works, it's better to demonstrate this with an example.
Let's say that in our game we have one single chest in a scene that the player can only open once.
In order to keep track of whether the chest has been opened or not, we implement the IGameSave interface on
the component that defines the behavior of the chest:
Most fields should be self explanatory. It is important to highlight though, that it's up to the developer to
implement how the state is restored. The OnLoad(object value) is called when a game is loaded, and the value
parameter is the value from a previously saved game. It's the developer's responsibility to cast the object
value to a valid type and assign the values to whichever fields are necessary.
The Load Mode is a tricky concept. It's an enum that allows to choose between two options:
• Lazy: This should be the default option for 90% of the cases. When this option is selected, the save and
load system will restore the state of an object when this object is created. Not before.
• Greedy: This requires a persistent object that survives cross-scene transitions (set as DontDestroyOnLoad()
method). Most commonly used with singleton patterns, this mode forces the load as soon as the event is
triggered.
SUBSCRIPTION
Now, all that's left to do is tell the SaveLoadManager to keep track of this component as soon as it's
initialized, and unsubscribe from it when the component is destroyed. Following the previous example, we
implement the OnEnable() and OnDisable() Unity methods to subscribe and unsubscribe respectively:
void OnEnable()
{
_ = SaveLoadManager.Subscribe(this);
}
void OnDisable()
{
_ = SaveLoadManager.Unsubscribe(this);
}
This gives all the necessary information to the save and load system about the life-cycle of this object so it
can keep track of its state progress. If your object is never destroyed and survives scene transitions, you
can skip the un-subscription.
void OnEnable()
{
_ = SaveLoadManager.Subscribe(this);
}
void OnDisable()
{
_ = SaveLoadManager.Unsubscribe(this);
}
The hasBeenOpened property will always return false if the OnOpen() method has never been executed, but will
return true if it has at some point. If the user saves and loads back the game, its value will be kept.
Custom Location
By default, Game Creator saves games using the Player Prefs built-in system. However, although this solution
is cross-platform and will work for most users, some might prefer to sync their saves with an online database
or use a different system than Unity's PlayerPrefs.
TDATASTORAGE CLASS
To create a custom save location, one must create a class that inherits from the abstract class TDataStorage ,
which contains all the necessary methods to store game information.
Note
Notice that in the following example(s) aren't any error handling mechanism for sake of simplicity. A production-
ready product should also check and inform of the necessary errors that may occur.
Convention
When creating a new storage database, we precede the name of the class with the Storage word. So if your class is
called MyDB the convention would be to call it StorageMyDB .
[Image(typeof(IconDiskSolid), ColorTheme.Type.TextLight)]
[Description("Stores the data in a custom database location")]
[Serializable]
public class MyOnlineDatabase: TDataStorage
{
public async override Task DeleteAll()
{
// ...
}
The Title and Description attributes allow to define the name and give a brief description of what this
storage does, so it can be easily identified when choosing it from the Setting's dropdown menu.
The Image attribute determines the visual icon from the dropdown menu. We recommend using the disk icon and
only change the color.
The TDatabaseStorage class has a collection of abstract methods that need to be overridden and implemented in
order to use the custom storage.
• HasKey : Returns true or false depending on whether the database has a field with that key name.
• Get : Returns the contents of the database field with the specified key name.
• Set : Sets the new value on the database with the specified key name.
• Commit : Only used when setting multiple values on a database is very slow. The commit is always called after
a batch of data is send to be stored.
Using async/await
It is important to note though that all methods have the async prefix and either return a Task object or a Task
associated with an object.
This is because there's a certain amount of time elapsed between the http request and the answer from the server.
Being able to await requests let's you tailor how to safely chain commands and make sure each request is
successfully fulfilled.
Custom Encryption
To create a custom encryption algorithm you need to inherit from the TDataEncryption abstract class and
override both the Encrypt(...) and Decrypt(...) methods.
Each method has a single string argument and returns another string argument, which can either be the
decrypted message or the encrypted message.
[Image(typeof(IconCubeSolid), ColorTheme.Type.Yellow)]
[Description("Uses my own custom and super-secret encryption algorithm")]
[Serializable]
public class EncryptionMyCustom : TDataEncryption
{
public override string Encrypt(string input)
{
// Logic for taking the input and returning it as an encrypted output
}
The Title and Description attributes allow to define the name and give a brief description of what this
encryption algorithm does, so it can be easily identified when choosing it from the Setting's dropdown menu.
The Image attribute determines the visual icon from the dropdown menu.
The TDataEncryption class has two abstract methods that need to be overridden and implemented in order to use
the custom encryption.
Note that you can add serializable methods to the class and these values will appear in the Settings menu. For
example, if your encryption algorithm requires a private string key called privateKey and an integer number
called salt you can add them inside your class with the serialized attribute:
Remember
The Remember component allows to cherry-pick the data that is stored when saving the game. By default, it
stores the position, rotation and scale.
Remember
To add a new element to be saved, click on the Add Memory button and select the type of data to save.
CREATING A MEMORY
Game Creator comes with a set of default memories, but you can create custom ones that extend the data stored.
To create a new Memory create a new class that inherits from the Memory class. For this example, we'll create
a memory that saves name of the game object attached to this memory.
[Serializable]
public class MemoryName : Memory
{
public override string Title => "Name of Game Object";
The Title property determines the name of this memory. This has no effect on the data stored but it displays
this value on the Inspector.
The GetToken(...) method returns the Token instance of this memory and is called when the game data is
scheduled to be saved. A Token is a data container that contains the data to be stored. In this case, we'll
need to create a new class called TokenName that inherits from Token and has a serializable field to save the
name of the object.
[Serializable]
public class TokenName : Token
{
public string text;
The OnRemember(...) method is called when loading a previously saved game and is used to restore its state. In
this case, it changes the name of the game object to the one it tries to remember.
Decorations
The custom Memory class instance can be decorated using any of the attributes found in the Instruction , Condition
and Event classes.
1.7.7 Tween
Tweening is the process to define a starting positon and an end position, and let it transition from one to
the other over the course of a specifed duration.
For exmaple, opening a door can be easily achieved defining it's starting position as its current position and
its end point as the same as its starting one, plus 2 units up in the Y axis. Once you specify the duration,
the door will slide upwards when the tweening is activated.
The Tweening library has been created with Game Creator in mind, but can also be leveraged to be used in other
scripts. Use the Tween.To(...) static method to create a new transition.
The To(gameObject, input) has two parameters: The Game Object that recieves the tweening, and an instance of a
TweenInput class, which configures the animation.
Following the example from above, let's say we want to slide a "door" object 2 units up in the air. We can
define the TweenInput class instance like this:
Transition Type
In this example we use a Vector3 transition, but it accepts any value type, like numbers, colors, quaternions,
... It's up to the updateCall to interpolate between the initial and final value.
TweenInput<Vector3>(
Vector3 start,
Vector3 end,
float duration
Update updateCall,
int hash,
Easing.Type easing
);
• updateCall: A method called every frame while the transition occurs. Contains 3 parameters: The starting
value, the end value and the completion ratio between 0 and 1.
• hash: An integer that uniquely identifies this transition. If another transition with the same id starts, it
cancels the previous one.
• easing: An optional easing function. If none is provided, it will use a linear function.
Game Creator comes with the Install window, which allows a user to install and uninstall examples and
templates from all modules. This is something available to all module developers and here you'll learn how to
create, step by step, a template for a module called "My Module".
Installer
The installer directory is where the compressed file with the information about it is located. This folder is
usually found under the custom Module's path but can be anywhere on the project folder. It must contain two
files:
• An Installer configuration file, which contains all the information related to the example, including its
name, the module it belongs to, a description and the version of this package.
• A Package.unitypackage file, which contains the compressed assets that will be unpacked upon installing.
Installation Location
The installed location is the directory where the example is decompressed after installing an example in order
to be used by the user. This folder is always located at the following route:
Assets/Plugins/Game Creator/Installs/
An installed extension will always have a folder parent called after the name of the module, followed by a
dot, followed by the name of the example, followed by an @ symbol and the semmantic version of the example.
For example, if the example is called "My Example" and it's from a module called "My Module", the installation
location of the example will be:
Assets/Plugins/Game Creator/Installs/[email protected]/
The example installer can be placed anywhere in the project. For simplicity it should be created where you
have the rest of the module's assets. For example, if you are creating a module called "My Module" and an
example of that called "My Example", at the root of the Unity project, you may want to place the installer
inside the MyModule folder:
Assets/
MyModule/
Examples/
MyExample/
Scripts/
Textures/
...
Now that there is a folder where we can drop in the installation files, we'll create an Installer asset inside
the MyExample folder. To do so, right click on the aforementioned folder and select Create -> Game Creator ->
Developer -> Installer . If the option doesn't appear, you can also duplicate any existing Installer asset. Once
you have the Installer asset you can rename it so it makes sense for your project.
Name Convention
We recommend sticking to Game Creator's naming convention and name the asset following "[ModuleName].
[ExampleName]". This makes it easier to identify the asset and avoids conflicting names with other examples from
other modules.
With the Installer in place, click on the Configuration button to expand the properties available and fill in
the fields:
• Name: Name of the Example. Following the example from above, this would be "My Example.
• Module: Name of the module. It is important to note that this determines the category of the example. In the
use case from above, the name would be "My Module".
• Description: A thorough description of this example. Make sure to indicate any quirks the example may have
or how to get started once the example is installed.
• Author: Name of the creator of this example. This has no implication other than giving credit to the
creator.
• Version: The semmantic version of this example. Make sure to increase the value every time you create a new
version of the example.
• Complexity: How difficult it is for users to understand this example. This is for informational purposes
only.
• Dependencies: A collection of ID (module name + example name) that this example depends on.
The Install window will automatically install any dependencies that an example may depend on, without prompting
the user to do so. This allows to quickly resolve any conflicts between this example and others that are required
to be installed.
For example, if the example Example A has Example B as a dependency, and this last one is not yet installed,
attempting to install Example A will install both Example A and Example B.
If Example B cannot be found, it won't be possible to install Example A from the Install window and will prompt
the user an error message telling which module could not be found.
Now that we have the installer in place it's time to create the skeleton from which to build our example. To
do so, select the previously created Installer and in the Inspector, right click on the name of the installer.
This will make a dropdown menu appear with a bunch of options:
• Install Package: Forces the installation of this example. However, it is recommended to use the Install
window to perform any installation instructions.
• Build Package: Changes the name of the installation path to fit the version number and creates a
Package.unitypackage file at the installation location.
• Create Package: Creates the bare bones structure that allows to develop a new example.
In our case, we want to click on the "Create Package" option. This will create a new folder at:
Assets/Plugins/Game Creator/Installs/[email protected]/
Inside this folder you can place all prefabs, materials, scenes or any content that the example must have. To
generate (or compress) this folder so it can be shared, select the option "Build Package" from the previous
dropdown menu. This will export all assets inside the aforementioned folder and create a file called
Package.unitypackage at the same directory as the Installer.
Once you have the example built, it is ready to be distributed. To share this example installer, you just need
to export the folder with the installer and the Package.unitypackage file generated.
If you (or the user) opens the Install window, the module will be displayed as a sub category of the
specificed module with the option to install it, update it and/or delete it, depending on whether there is an
installed version or not.
1.8 Releases
1.8.1 Releases
2.17.51 (Latest)
New
Changes
Fixes
Removes
2.16.50
Changes
Fixes
Removes
2.15.49
New
Changes
Fixes
Removes
2.14.48
Fixes
2.14.47
New
Fixes
2.14.46
New
Enhances
Changes
Fixes
2.13.45
This update does not come with any breaking changes. However it requires to uninstall Game Creator first before
upgrading in order to replace the old search engine for the new one.
New
Enhances
Fixes
2.13.44
New
Fixes
2.13.43
This version comes with new features, but also breaks compatibility with the previous core and submodule
versions.
We recommend updating only if you're in a prototyping phase or you're far from releasing your project(s).
In order to upgrade, be sure to backup your project(s) first and uninstall any previous versions of Game Creator
and its modules.
New
Enhances
Changes
Fixes
Removes
2.12.42
New
Enhances
Changes
Fixes
Removes
2.11.41
New
Enhances
Changes
Fixes
2.10.40
New
Enhances
Fixes
Removes
2.9.39
New
Enhances
Fixes
2.9.38
Fixes
2.9.37
New
Enhances
Fixes
2.9.36
New
Enhances
Fixes
2.9.35
Enhances
Fixes
2.9.34
New
• Event: On Dash
• Event: On Dodge
Enhances
Changes
Fixes
2.8.33
Fixes
2.8.32
New
Enhances
Fixes
2.8.31
New
Enhances
Fixes
Removes
2.8.30
Fixes
2.8.29
New
Enhances
Changes
Fixes
2.7.28
New
Changes
Fixes
2.6.27
New
Enhances
Fixes
2.6.26
New
Enhances
Fixes
2.6.25
New
Enhances
Fixes
2.6.24
New
Enhances
Fixes
2.6.23
New
Enhances
Fixes
2.6.22
New
Fixes
2.6.21
New
• Property: No Sprite
Changes
Fixes
2.5.20
New
Enhances
Fixes
2.5.19
New
• Condition: Is Editor
• Condition: Is Console
• Condition: Is Mobile
• Memory: Exists
Enhances
Fixes
2.5.18
New
Enhances
Fixes
2.5.17
New
Changes
Fixes
2.4.16
New
Changes
Fixes
2.3.15
New
• Signal dispatching
Enhances
Changes
Fixes
2.2.14
New
Enhances
Changes
Fixes
2.1.13
New
• Interaction system
• Instruction: Interact
• Event: On Focus
• Event: On Blur
Enhances
• Character inspector UX
Changes
Fixes
2.0.12
New
• Ragdoll animations
Enhances
Fixes
2.0.11
New
Enhances
• Conditions redesign
Fixes
2.0.10
New
• Event: On Select
• Event: On Deselect
• Input: Interaction
Enhances
Fixes
2.0.9
New
Enhances
Fixes
2.0.8
New
Enhances
Fixes
2.0.7
New
Enhances
Fixes
2.0.6
New
Fixes
2.0.5
New
• Memory: Name
• Memory: Tag
• Memory: Layers
• Memory: Is Active
Fixes
2.0.4
New
Fixes
2.0.3
New
Fixes
2.0.2
New
• Input: Usage/Crouch
• Input: Usage/Walk
Fixes
2.0.1
New
• First release
2. Inventory
2.1 Inventory
Inventory
Using items, combining them, crafting new ones or trading them with other characters is at the heart of many
games.
The Inventory module has been meticulously crafted to support a wide variety of situations that involve the
use and management of items.
Get Inventory
Requirements
The Inventory module is an extension of Game Creator 2 and won't work without it
2.2 Setup
Welcome to getting started with the Inventory module. In this section you'll learn how to install this module
and get started with the examples which it comes with.
Before installing the Inventory module, you'll need to either create a new Unity project or open an existing
one.
Game Creator
It is important to note that Game Creator should be present before attempting to install any module.
If you haven't purchased the Inventory module, head to the Asset Store product page and follow the steps to
get a copy of this module.
Once you have purchased it, click on Window Package Manager to reveal a window with all your available
assets.
Type in the little search field the name of this package and it will prompt you to download and install the
latest stable version. Follow the steps and wait till Unity finishes compiling your project.
2.2.3 Examples
We highly recommend checking the examples that come with the Inventory module. To install them, click on the
Game Creator dropdown from the top toolbar and then the Install option.
The Installer window will appear and you'll be able to manage all examples and template assets you have in
your project.
• UI: Samples for creating loot user interfaces, inventories, merchants and crafting windows
• Examples: A collection of scenes that will help you understand each and every option of the Inventory
module, in an organized and tidy way.
Installer Inventory
The Examples requires both the Items and UI extensions in order to work.
There is also an extra skin for adventure games that allows to swap the default inventory for a typical old-
school point and click inventory.
Dependencies
Clicking on the Examples install button will install all dependencies automatically.
Once you have the examples installed, click on the Select button or navigate to Plugins/GameCreator/Installs/
Inventory.Examples/ .
Inventory Examples
2.3 Items
2.3.1 Items
Items are in-game objects that can be added to a Bag, and represent the name and description, properties,
visual representation, and other information that allows to craft, trade, use and equip them.
An Item is a scriptable object that contains all the generic information about a particular item. For example,
its name, its weight, what Item Properties it has and their default values, etc...
A Runtime Item on the other hand, is an instance of an Item that lives in the scene. This instance can be
saved between play-sessions and has specific values to that particular item instance.
Sword Durability
Let's say we have an Item called Metal Sword. All Metal Swords will come from the same Item definition. When you
give a Metal Sword to the player, you're creating a Runtime Item of Metal Sword, which can have its own unique
values, such as its own durability that decreases with every impact, for example.
Item and Runtime Item are conceptually similar to Unity's Prefabs and Prefab Instances, respectively. The
first one lives in the project and works as a template, from which you can spawn multiple instances.
Creating an Item
Items are scriptable objects and to create one, you'll need to right click on the Project Panel and navigate
to Create Game Creator Inventory Item.
Item
An Item asset will appear, with a list of sections that can be expanded or collapsed so it is easy for the
user to modify and organize your items.
The ID value is a unique text that represents an item. When creating a new asset, it will be completely
unique. However, duplicating an existing item will also duplicate the ID and a red message will appear above
stating that there are two items with the same ID.
To solve that, expand the field and click on the Regenerate button to create a new unique ID. You can also
type in a name if you follow a naming convention that ensures that all item IDs are unique.
The Prefab field is used to drop/instantiate an item onto the scene. If no prefab is provided, the item will
not be instantiated.
INHERITANCE
The Parent field allows an item to inherit values from another item, such as Properties and Sockets.
Comparing two items takes into account their parent-child relationship. For example, if Item A inherits from Item
B and a Condition is trying to determine if an object is equal to another one:
• B will always return success when comparing if B equals B but not to A, because A is further down in the
inheritance chain.
An Item will always return success if asked whether it is equal to itself or any of its parent items.
INFORMATION
This section allows to define the Name. Description, Sprite representation and Color of the Item.
Item Information
Localization
All these fields use dynamic properties so their values can be localized.
SHAPE
The shape of an Item determines the Width and Height the item occupies in the inventory bag, if it's a grid-
based inventory.
It also determines the Weight of the item, in case the bag has a max weight limit.
The Max Stack field determines how many of the exact same item can be stacked one on top of another.
Item Information
Stacking restrictions
If an Item has one or more Sockets, the Max Stack will be automatically restricted to 1, due to technical
constraints.
PRICE
An Item's trading value is determined by a Currency asset and a numeric value. This value is the total pure
one, without any discounts or modifiers applied.
Item Price
One Currency
Sockets
The price of an Item that can have other Items attached is the result of the sum of the price of all Items
attached, plus the price of the Item itself.
For example, if the item Sword has a price of 45 gold and a Magic Rune costs 20 gold pieces, the value of the
Sword with the rune attached will be 65 (45 + 20).
PROPERTIES
Properties define mutable values that an item defines. A Property is a data block that is identified by a name
and contains a value and a text that can be used to display information about this item and use it in-game.
Item Properties
The most common use-case of a property is definining the attack power of a weapon. One could easily use an item
that represents a Sword and add a property called attack and has a value of 35.
SOCKETS
Sockets allow to attach items onto other items. The type of item that can be attached is determined using item
inheritance.
Item Sockets
Attaching Runes
For example, a socket accepts the item Rune, then all items that inherit from the Rune item will be accepted.
EQUIPPING
Some items can be equipped by the wearer (usually the Character with the Bag component).
Item Equipment
USAGE
This section allows to define the behavior of an utility Item which can be used at any given time.
Item Use
A usable item can have a finite or infinite amount of usages. The Consume on Use toggle defines whether an
item is consumed upon use or not.
For example, a Health Potion is consumed when used. However a Whistle can be used many times.
The Can Use conditions are executed every time a runtime item is attempted to be used. If the result is
successful, the item is used.
When an Item is used, the On Use instructions are executed, where Self refers to the game object with the Bag
component the item belongs to, and the Target is the references the wearer of the Bag.
Both the Can Use conditions and the On Use instructions can optionally execute the parent Item's Can Use and On
Use instructions before executing itself.
This is very useful to avoid repeating the same logic over multiple items. For example, if drinking any potion
results in the character executing a particular animation and playing a sound effect, these instructions can be
placed in a parent Item called Potions so each child Item (Health Potion, Mana Potion, ...) does not have to.
CRAFTING
The Crafting section allows to define recipes to create new Items as well as dismantle them into multiple
ingredients.
Item Crafting
2.3.2 Properties
Properties are mutable values that compose a runtime item. For example, an Item's attack power, its durability
or whether they apply a special effect, such as Burn.
Item Properties
To create a new Property all that needs to be done is to click on the Add Property button.
The Property ID field determines the unique ID of this Property. It is used to identify it, so make sure it's
a name that's easy to remember and type.
Is Hidden determines if a Property is hidden in the UI. For more information, see the Hiding Properties
section.
• Color: Assigns a color to the Property. Useful to differentiate items in user interfaces.
• Number: A mutable value that can be used in-game, such as increasing stats.
• Text A dynamic value that is usually used to represent the in-game name of the Property.
Mutable vs Immutable
Mutable is a programming concept which means that the value is dynamic and can be changed at runtime. Immutable,
in contrast, means that its value can't be changed once a value is assigned.
Inheriting Properties
Checking the Inherit Properties toggle found at the top will automatically inherit all properties from its
parent(s).
The value of an inherited Property can be overridden by checking its left toggle and changing the field value.
It is very common to have a type of item that shares the same properties with all its child items. Setting a base
value for the parent item type will make it much easier to define what each sub-item does.
For example, let's say all shield items have a defense value. We could add this property on the base item
"Shield" and propagate this property to all other shields that inherit from this item, and just change the final
value, so a "Wooden Shield" has a lower defense value than a Steel Shield .
Hiding Properties
When displaying properties in the UI, these can be sequentially displayed, without having to manually set them
one by one. If the Is Hidden checkbox is ticked, these properties will not be displayed in the user interface.
Item UI Properties
This is specially useful when a property represents something that the user should not be aware of.
For example, some items could have the is-metal property that determines if an item is a metallic one or not.
2.3.3 Sockets
Sockets allow to attach items onto other items. For example, a Sword can have a socket that allows to attach a
Rune so it increases its properties.
Item Sockets
Ticking the Inherit from Parent checkbox will instruct the Item to inherit all Sockets from its parent(s).
The socket section is divided in two parts: The part that defines the object attached to the socket, and the
part that accepts attachments.
The Socket Prefab field accepts a prefab game object, which is instantiated when attaching this Item onto
another Item's Socket.
To configure where the prefab is instantiated, the scene prefab object must have a Prop component. This
component automatically updates and correctly instantiates the attachment prefabs in the right places, defined
in the component's Editor.
In this case, the Metal Shield has a Prop component that inserts the instance of a prefab of any attached rune
at the center of the socket.
Configuration of Sockets
A Socket is defined by a Base Item that determines which types of objects can be attached to, and a Socket ID,
which is used by the Prop component.
Base Item
It is important to note that the Base item determines the type of item that the Sockets accepts, not the specific
item. In the example above, it accepts a Rune item, but will also accept any item that has a Rune item parent,
such as the Rune of Attack and Rune of Defense included in the examples.
When attaching an Item onto another one's Socket, only their shared Properties are added.
• attack = 10
• attack = 5
• defense = 5
Attaching the Rune to the Sword results in the latter have an attack value of 15 (10 + 5), but will ignore the
defense Property because it is not present in the Sword.
2.3.4 Equipping
To define an equippable Item, the Is Equippable checkbox must be ticked, which enables the rest of the
options.
Item Equipment
When attempting to equip an Item, the Conditions Can Equip will first be checked.
If it succeeds, it will instantiate the prefab and execute the On Equip instruction list. The Prefab field is
the game object prefab instantated when equipping this particular Item.
Attempting to equip an Item on a slot that is already filled by another Item will automatically unequip the
current one so the new Item can be equipped.
Equipment
To know more about how to define which Equipment slots are available for a character, see Equipment in the Bag
section.
When executing the Can Equip conditions and the On Equip and On Unequip instructions:
• The Self property references the game object that contains the Item being equipped/unequipped.
• The Target references the wearer of the Bag (which usually is the same as the Bag object itself).
It is important to note that when a currently equipped item changes the value of one of its Sockets, it will
first unequip it, change the Socket value and equip it again.
If the Execute From Parent checkbox is marked, the instructions and conditions from the item's parent item will
be executed first (and its parent too, if the parent has Execute From Parent marked).
This is very useful to avoid repeating the same logic over multiple items. For example, if the parent type Swords
contains a Property called attack and all sub-items from Swords have different attack values, there is no need
for all sword sub-items to add a Stat Modifier with that property.
Instead, the Swords item can execute the common logic between all swords, and each sub-item just needs to have
the Execute From Parent checkbox enabled.
2.3.5 Crafting
The Crafting section both defines a way to craft the Item being examined, as well as tear it apart and
dismantle it into multiple Items.
Item Crafting
Ingredients
Ingredients are Items that can be used to craft the current one, or dismantle it into these ingredients.
This will create a new ingredient entry with an Item field and the amount of those necessary.
Infinite ingredients
Craft
When attempting to craft an Item it will first check if the Conditions are sufficient. If so, it will then
require a certain amount of Ingredients defined.
If there are enough ingredients, these will be subtracted from the Bag.
Empty Conditions
Leaving the Conditions field empty will always return success and means there are no conditions to craft it,
outside from the Igredients.
Once the Conditions and Ingredients requirements are fulfilled, it will create a new instance of the Item and
add it to the Bag.
Afterwards, it will call the Instructions, in case the designer wants to do something afterwards, such as
increasing the proficiency of the Player in crafting.
Dismantle
Dismantling an Item is the inverse process of Crafting: Instead of creating the current Item from a collection
of Ingredients, it destroys the Item and reclaim the Ingredients.
Reclaim Probability
When Dismantling an Item there is a Reclaim Chance value that determines the chance to recover each of the
Ingredients. A value of 1 will always recover all ingredients, while a value of 0.5 will only have a chance to
recover around 50% of them.
2.4 Bags
2.4.1 Bags
A Bag is a component that can be attached to any game object, and contains Items and Currencies.
Bag
• List: Sequentially displays the items one after the other and all occupy the same amount of space.
• Grid: Each item occupies a certain amount of cells and these can be manually arranged inside the inventory
grid-view.
Recommendation
We recommend sticking with the List type, as it is easier to understand and manage. Grid inventory systems should
be only used by experienced users.
To change the type of Bag click on the right-side arrow button and choose the type from the dropdown menu.
Bag Options
• If a maximum weight is defined, if the sum of all Item's weight exceeds the maximum value, the Bag is
considered overloaded.
It is important to note that a Bag can't exceed a maximum amount of height (if any is defined). However, a Bag
will still accept new Items even if its content weight exceeds the maximum weight defined.
Equipment
The Equipment field is an optional value that accepts an Equipment Asset. If provided, it allows the wearer of
the Bag to equip Items.
To know more about how to configure it, see the Equipment section.
Some Bags may contain a certain amount of Items and Currency by default. For example, a Merchant may have some
default stock available.
• Clicking on the Add Stock button creates a new Stock option that accepts an Item and a certain amount of it.
• Clicking on the Add Wealth button creates a new Wealth option that accepts a Currency and its value.
Random Loot
A Bag can also be used as a Chest where the player loots its contents. To generate random loot, we recommend
using Loot Tables, instead of Stock options.
Skin UI
The Skin UI field is a UI skin asset that displays a different type of user interface that depends on what the
purpose of the Bag is. For example, a Bag attached to the Player character could display an Inventory UI,
while a Chest displays a UI with its content and a button to transfer all of them to the Player's bag.
Custom Skins
To know more about designing custom skins, see the User Interface section.
Wearer
The Wearer selector refers to the targeted game object that wears the Bag's equipment. By default it is set to
Self because the Bag is usually attached along the Character component. However, if for some reason that is
not the case, you can choose which character should be targeted as the equipment wearer.
2.4.2 Equipment
The Equipment asset is a scriptable object that lives in the Project Panel which contains information about
the amount of equippable slots and what bone matches each one of them.
To create an Equipment asset, right click on the Project Panel and select Create Game Creator Inventory
Equipment.
Equipment
An Equipment initially has no equipment. Click on the Add Equipment Slot button to add a new slot.
Equipment Slot
• The Base Item is the type of Item it accepts. For example, if all Helmets inherit from a Head item, using
the Head template item will allow to equip all helmets in this slot.
• The Bone is a reference to the chosen skeletal bone. If the targeted character is a Humanoid, the bone can
be picked from a dropdown list. If the character is a non-humanoid, the bone must be referenced using its
hierarchy path.
Once the Equipment asset is created, this can be linked to a Bag component so the character knows which
equipment slots it has available and where each is mapped to which bone.
Example
For example, the equipment that comes with the Inventory module has 4 equippable slots (head, body, right and
left hand), plus three extra slots for consumable items:
Equipment Example
We can assign this Equipment asset to a Bag and all available slots will appear below.
After assigning an Equipment asset to a Bag, the bone that is linked to each slot can be overridden. This is
specially useful for non-humanoids, where their bone hierarchy names might not match.
Loot Tables are probablility sheets that when executed, pick an option from its entries based on a weighted
chance and send the chosen element (if any at all) to a Bag component.
To create one, right click on the Project Panel and select Create Game Creator Inventory Loot Table.
Loot Table
To add a new loot entry, click on the Add Loot button. A new entry will appear with the following options:
• Rate: A number that represents the weight of the chance. The higher the value, the greater the chance.
• Amount: The amount picked if the entry is chosen. It can either be a constant value or a random one.
Weight vs Probability
It is important to note the distinction between a Rate (or weight) and a probability percentage.
The Rate depends on the total sum of all rates from all entries. For example, two entries with a Rate of 1 is
equal to two entries with a Rate of 5. In both cases, the chance of picking them is 50%.
Optionally there is a No Drop Rate field that enables the Loot Table to pick nothing.
To execute a Loot Table it is as easy as using the Loot Table instruction and choosing both a Loot Table asset
and the targeted Bag where the items/currency will be sent to.
Note that each time a Loot Table is executed, it picks one entry from the table. A Loot Table can be used
multiple times in sequence to fill, for example, a Chest with multiple items.
One easy way to randomize the loot of a level is to populate them with a Chest prefab that has an On Start
Trigger. This Trigger then runs one or more times a Loot Table and sends its contents to the Chest's Bag
component.
This allows to very easily populate all the Chests of a level with different content, while at the same time
controlling the kind of content they contain.
2.5 Currencies
To determine the value of an Item, Game Creator uses the concept of Currency.
A Currency is an asset that contains one or more Coins. Each Coin has a value relative to a single unit. To
create one, right click on the Project Panel and select Create Game Creator Inventory Currency.
Single Currency
Most games make use of a single Currency. However, some mobile games and hard-core resource management games use
multiple ones.
Currency
In the example above, the Currency just has a single Coin called Gold which value is 1. This is the most
simple currency one can create and it's the most commonly used in most games.
No decimals
It is important to note that a currency cannot have a decimal value. If you wish to represent a value with 2
decimals, one can multiple the value x100 and then shift the comma two units left.
However, some games make use of a multi-coin Currency where each coin represents a different value.
Let's say we are making a game where the currency has three different coins, each with a different value:
• Gold: Is equal to 5 silver coins, which cost 25 copper coins each, so it has a value of 125.
Currency In-Game
It is important to note that when adding or subtracting a value of a particular Currency the value used is
relative to the unit. Following the example above, if we want to give one Gold Coin to the Player, we simply
increase its wealth by 125.
2.6 Merchants
The Inventory module comes with a built-in system that allows two Bags to trade their contents in exchange for
a specified Currency.
Merchant
To initiate a trade between two Bags, one of them (the merchant) must have a Merchant component attached along
a Bag component.
Merchant Component
Merchant Info
The Merchant Info section allows to give the Merchant a name and a description. This is completely optional,
but can be useful to display the type of trading made by a certain Merchant.
Example
For example, having a merchant called Herbologist already gives a clue of the type of Items this merchant trades
with.
Configuration
• Infinite Currency: If checked, the Merchant will have an infinite amount of currency supply to buy Items
from the client (Player). Otherwise it will use the Bag's wealth.
• Infinite Stock: If checked, the number of available Items will not decrease after the client (Player)
purchases them. Otherwise, the available stock decreases with each purchase made.
• Allow Buy Back: If checked, every Item sold by the client (Player) is automatically added to the Merchant's
stock. Otherwise, any Item sold cannot be recovered.
• Sell Niche Type: If checked, it allows to filter the type of Items sold by this merchant, regardless of its
Bag content. For example, if a Merchant only sells Herbs, even if its Bag contains a Sword, it will not be
available for sale.
The Buy Rate is the discount coefficient that the Merchant provides when buying Items from the client
(Player). A value of 1 indicates the Items sold have no discount. To provide a 90% discount on all Items, this
field should be set to 0.9.
The Sell Rate is the coefficient applied when the Merchant purchases Items from the client (Player). In most
games, the selling price of an Item is lower (commonly half the price) than its real one.
The Bag field is a reference to the Bag component from where the Merchant takes its stock.
Reference a Bag
If your Bag is placed along another game object, you can change the value of this field from Self to Bag and
manually reference the correct object.
2.7 Tinkering
Tinkering
The process of transforming items into other ones is called Tinkering, which includes:
Open Tinkering UI
This instruction uses a Tinker Skin that determines whether the UI crafts new items or dismantles existing
ones.
The Input Bag and Output Bag are the bags used by the tinker process. In most games, both bag references will
match, but there might be some cases where the game outputs the new items onto another bag, from where the
player can pick them.
Filtering by Type
Blacksmithing and brewing potions use the exact same process. The only difference between an Alchemy station and
a Forge is that the first one filters the types of items to craft by Potion type and the latter filters by
Equipment type.
To know more about how to create your own custom tinkering UI elements, see the Tinker UI section and the
examples that come with the Inventory module.
The Inventory module symbiotically works with Game Creator and the rest of its modules using its visual
scripting tools.
• Instructions
• Conditions
• Events
Each scripting node allows other modules to use any Inventory feature, and adds a list of Properties ready to
be used by other interactive elements.
2.8.2 Conditions
Conditions
SUB CATEGORIES
• Inventory
Inventory
INVENTORY
Sub Categories
• Bags
• Cooldowns
• Equipment
• Merchant
• Properties
• Tinker
• Ui
• Wealth
Conditions
• Can Add
• Has Item
• Is Overloaded
• Is Type Of Item
• Is Usable
CAN ADD
Description
Parameters
Name Description
Keywords
HAS ITEM
Description
Returns true if the Bag component contains, at least, the specified amount of an item
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
IS OVERLOADED
Inventory » Is Overloaded
Description
Parameters
Name Description
Keywords
IS TYPE OF ITEM
Description
Parameters
Name Description
Keywords
Inventory Compare
IS USABLE
Inventory » Is Usable
Description
Parameters
Name Description
Keywords
BAGS
Bags
Conditions
• Enough Space
Enough Space
Description
Parameters
Name Description
Keywords
COOLDOWNS
Cooldowns
Conditions
• Is Item Cooldown
Is Item Cooldown
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Runtime Item The Runtime Item that checks its cooldown state
Keywords
EQUIPMENT
Equipment
Conditions
• Can Equip
• Is Equippable
• Is Equipped
Can Equip
Description
Returns true if the chosen Item can be equipped by the targeted Bag's wearer
Parameters
Name Description
Keywords
Description
Returns true if the Bag's equipment slot does not have any Item assigned
Parameters
Name Description
Keywords
Is Equippable
Description
Parameters
Name Description
Keywords
Is Equipped
Description
Returns true if the Bag's wearer has an Item of that type currently equipped
Parameters
Name Description
Keywords
Inventory Wears
Description
Returns true if the Bag's wearer has the Runtime Item currently equipped
Parameters
Name Description
Keywords
Inventory Wears
MERCHANT
Merchant
Conditions
• Can Buy
• Can Sell
Can Buy
Description
Parameters
Name Description
Keywords
Can Sell
Description
Parameters
Name Description
Keywords
PROPERTIES
Properties
Conditions
Description
Returns true if the chosen Item has the specified item Property
Parameters
Name Description
Keywords
Description
Returns true if the chosen Runtime Item has the specified item Property
Parameters
Name Description
Keywords
TINKER
Tinker
Conditions
• Can Craft
• Can Dismantle
• Enough Ingredients
• Is Craftable
• Is Dismantable
Can Craft
Description
Parameters
Name Description
To Bag The target destination Bag after creating the new Item
Keywords
Can Dismantle
Description
Parameters
Name Description
To Bag The destination Bag for all ingredients after dismantling the Item
Keywords
Enough Ingredients
Description
Parameters
Name Description
Keywords
Is Craftable
Description
Parameters
Name Description
Keywords
Is Dismantable
Description
Parameters
Name Description
Keywords
UI
Ui
Conditions
• Is Bag Ui Open
• Is Merchant Ui Open
• Is Tab Ui Active
• Is Tinker Ui Open
Is Bag UI Open
Description
Keywords
Is Merchant UI Open
Description
Keywords
Is Tab UI Active
Description
Keywords
Is Tinker UI Open
Description
Keywords
WEALTH
Wealth
Conditions
• Compare Wealth
Compare Wealth
Description
Returns true if a comparison between the wealth and another integer is satisfied
Parameters
Name Description
Keywords
2.8.3 Events
Events
SUB CATEGORIES
• Inventory
Inventory
INVENTORY
Sub Categories
• Currency
• Equipment
• Merchant
• Sockets
• Tinker
• Ui
Events
• On Add
• On Drop Item
• On Instantiate Item
• On Remove
ON ADD
Inventory » On Add
Description
Keywords
ON DROP ITEM
Description
ON INSTANTIATE ITEM
Description
ON REMOVE
Inventory » On Remove
Description
Keywords
CURRENCY
Currency
Events
• On Change Currency
On Change Currency
Description
EQUIPMENT
Equipment
Events
• On Equip
• On Unequip
On Equip
Description
Keywords
On Unequip
Description
Keywords
MERCHANT
Merchant
Events
• On Buy
• On Sell
On Buy
Description
On Sell
Description
SOCKETS
Sockets
Events
• On Socket Attach
• On Socket Detach
On Socket Attach
Description
On Socket Detach
Description
TINKER
Tinker
Events
• On Craft
• On Dismantle
On Craft
Description
On Dismantle
Description
UI
Ui
Events
• On Close Bag Ui
• On Close Merchant Ui
• On Close Tinker Ui
• On Open Bag Ui
• On Open Merchant Ui
• On Open Tinker Ui
On Close Bag UI
Description
On Close Merchant UI
Description
On Close Tinker UI
Description
On Open Bag UI
Description
On Open Merchant UI
Description
On Open Tinker UI
Description
2.8.4 Instructions
Instructions
SUB CATEGORIES
• Inventory
Inventory
INVENTORY
Sub Categories
• Bags
• Cooldowns
• Currency
• Equipment
• Loot
• Sockets
• Ui
• Variables
BAGS
Bags
Instructions
• Add Item
• Drop Item
• Remove Item
Add Item
Description
Parameters
Name Description
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Buy Purchase Sell Steal Rob
Description
Parameters
Name Description
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Buy Purchase Sell Steal Rob
Drop Item
Description
Parameters
Name Description
Distance The distance from the Bag where the Item is dropped
Keywords
Description
Parameters
Name Description
Distance The distance from the Bag where the Item is dropped
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
From Bag The Bag component where its contents are removed
Keywords
Bag Inventory Container Stash Chest Take All Give Take Borrow Lend Buy Purchase Sell Steal Rob
Description
Parameters
Name Description
From Bag The Bag component where its wealth is taken from
Keywords
Bag Inventory Container Stash Chest Take All Give Take Borrow Lend Buy Purchase Sell Steal Rob Currency Cash
Money Coins
Remove Item
Description
Parameters
Name Description
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Buy Purchase Sell Steal Rob
Description
Parameters
Name Description
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Buy Purchase Sell Steal Rob
COOLDOWNS
Cooldowns
Instructions
• Clear Cooldowns
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Clear Cooldowns
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
CURRENCY
Currency
Instructions
• Change Currency
Change Currency
Description
Parameters
Name Description
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Buy Purchase Sell Steal Rob Coin Cash Bill Value Money
EQUIPMENT
Equipment
Instructions
• Equip Item
• Unequip Item
Equip Item
Description
Equips an Item from the Bag that inherits from the specified type
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Unequip Item
Description
Unequip an Item from the Bag that inherits from the specified type
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
LOOT
Loot
Instructions
• Instantiate Item
• Loot Table
Instantiate Item
Description
Parameters
Name Description
Location The position and rotation where the item instance is placed
Keywords
Loot Table
Description
Picks a random choice from a Loot Table and sends it to the specified Bag
Parameters
Name Description
Loot Table The Loot Table that generates the Item instance
Keywords
Bag Inventory Container Stash Give Take Borrow Lend Corpse Generate
SOCKETS
Sockets
Instructions
Description
Attaches a Runtime Item onto the first available Runtime Item socket
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Detach The item instance to detach from the other runtime item
Keywords
UI
Ui
Instructions
• Close Bag Ui
• Close Merchant Ui
• Close Tinker Ui
• Open Bag Ui
• Open Merchant Ui
• Open Tinker Ui
• Set Bag Ui
Close Bag UI
Description
Keywords
Close Merchant UI
Description
Keywords
Close Tinker UI
Description
Keywords
Open Bag UI
Description
Parameters
Name Description
Keywords
Open Merchant UI
Description
Parameters
Name Description
Keywords
Open Tinker UI
Description
Parameters
Name Description
Output Bag The Bag component where new items are placed
Keywords
Set Bag UI
Description
Parameters
Name Description
Description
Changes whether a Bag drops a single item or the whole stack when dropping them
Parameters
Name Description
Keywords
Description
Changes whether a Bag splits by unstacking a single item or the whole stack is split in half
Parameters
Name Description
Keywords
Description
Changes whether a Bag moves a single item or the whole stack when transferring them
Parameters
Name Description
Keywords
VARIABLES
Variables
Instructions
• Set Item
Set Item
Description
Parameters
Name Description
Keywords
Save Keep
Description
Parameters
Name Description
Keywords
Save Keep
The Inventory module comes with a large collection of components so you have complete freedom to make your own
game UI.
UI Examples
To get started, it is recommended to install the UI examples that come with this module, which include a HUD, a
classic inventory, as well as a merchant and crafting/dismantle interfaces.
Skins
Skins are assets that contain a prefab with a specific UI component. There are three types of skins:
• Bag Skins: These skins are linked to Bag components and require a Bag UI component at the root of the
prefab.
• Merchant Skins: These skins are linked to Merchant components and require a Merchant UI component at the
root of the prefab.
• Tinker Skin: These skins are directly accessed when opening a Craft/Dismantle interface. They require a
Tinker UI component at the root of the prefab.
Skins
The Inventory module comes with a lot of components that make it very easy to build a user interface that
synchronizes with a Bag, Merchant or Tinkering object. Each component has a very specific use-case that is
covered in each relevant sub-section.
Component Dependency
Some UI components depend on others that feed information to them. For example, the Coin UI component depends on
the Price UI component, that instantiates and reuses a prefab with a Coin UI component for each currency coin.
2.9.2 Bag UI
The Bag UI is the root component for any UI prefab that displays information about a Bag. There are two types
of Bag UI components, which depend on the type of Bag used:
Lists vs Grids
This documentation focuses on Bags with a List-type, as they are most commonly used. The use of a Grid-type
requires a deeper understanding on how each UI component works, but the concepts and components used are mostly
the same.
Bag List UI
Prefab Cell is a prefab game object with a Bag Cell UI component. This component is automatically instantiated
and updated by its parent, for each Item in the Bag displayed.
Filter by Parent is an optional Item-type filter. If none is provided, it will display all Items of all types.
This is particularly useful when creating tabs or sections.
Content is the parent game object where all prefab cells will be instantiated - One for each Item in the Bag.
Can Drop Outside determines whether an Item can be dragged outside of the UI canvas to drop it into the scene
world.
Max Drop Distance determines the maximum distance that an Item can be dropped from the Bag object.
Drop Amount determines whether a dropped object removes the whole stack of objects or just the top-most.
Dropping Items
Note that only Items that have a Prefab object in their Item definition can be dropped.
Components
There are a few extra components that can synchronize a Bag's information with UI controls, which can either
be linked to a Bag, or to the Bag linked to a Bag List/Grid UI component.
CELL UI
This component is automatically set up and refreshed by its Bag List UI or Bag Grid UI parent component.
Bag Cell UI
The Cell Info section contains an optional collection of UI control fields that can be plugged in order to be
updated when the Item(s) associated with this inventory cell change.
This component requires a Graphic component (either an Image or a Text) in order to receive input events, such as
clicks and drags.
The Merchant Info field is optional and only useful if the Bag Cell UI component is part of a Merchant UI
component.
The Can Drag toggle determines whether an Item can be dragged and dropped.
On Drop and On Select defines the behavior when this Item cell is dragged and dropped, and when it is focused.
When a Bag Cell UI is selected, any Selected Cell UI component will be refreshed with the information of the
currently selected cell. This allows to display information about a particular cell outside from the cell itself.
In both Bag Cell UI and Selected Cell UI components, one can create a prefab with a Socket UI/Property UI
component that displays the current sockets/properties.
EQUIP UI
This component is used for equipping items and assigning consumables to hotbars.
Bag Equip UI
The Bag and Equipment fields determine the targeted Bag and the equipment slot that this refers to.
• Base UI: Allows to display a collection of optional controls that reference the base-type Item
• Equipped UI: Allows to display a collection of optional controls that reference the currently equipped Item
(if there is one).
The rest of the fields define the behavior when the Bag Equip UI is interacted with.
WEALTH UI
The Bag Wealth UI component is used to display the selected Currency and how much of it the Bag carries.
Bag Wealth UI
This component requires a prefab that represents each coin's Currency value, and must contain the Coin UI
component.
WEIGHT
This component displays the current and max weight of the selected Bag.
Bag Weight UI
2.9.3 Merchant UI
The Merchant UI is a very simple component that acts as a middle-man between two Bag UI components - Allowing
both ends to transfer or trade their contents based on a particular set of rules.
Merchant UI
• Merchant Bag UI: A Bag UI component that contains information about the Bag that represents the merchant.
• Client Bag UI: A Bag UI component that contains information about the Bag that represents the client
(usually, the Player).
Trading
When a Bag UI component is referenced by a Merchant UI, the Bag UI obtains information about the trading rules,
which cascade and can be accessed from the Merchant Info section on a Bag Cell UI component.
There are also a couple of Instruction lists at the bottom that are executed when this Merchant UI executes a
transaction.
Note that Buy and Sell are from the client's perspective (aka the Player). So the On Buy instructions run when
the client purchases an item, and On Sell run when the client sells an item.
2.9.4 Tinker UI
Tinkering involves both Crafting and Dismantling items, and the Tinker UI component allows to display a list
of UI controls that handle the transformation.
Tinker UI
There are two distinct sections in this component, but both work very similarly: There is a container object
where all available recipes/items are displayed, from where the user can pick one and begin the transformation
process.
• Filter By Parent allows to display only those Items that inherit, at some point, from the selected type. If
none is set, it will not filter any items.
• Selected UI references a Crafting UI or Dismantling UI component, which is used to display the currently
selected Item from the list.
• The Content field must reference a UI game object which will be populated by an instance of a prefab for
each element in the list.
• The Prefab field references a prefab game object, which will be instantiated in the container object.
The Prefab field requires a Crafting Item UI or a Dismantling Item UI component in order to work. This will be
automatically synchronized and refreshed with the information provided by the Tinker UI list.
Crafting Item UI
The Crafting Item UI component is both used when selecting an Item from the recipe list as well as to display
each entry from the list.
Crafting Item UI
This component is automatically refreshed with the correct information about the current Item.
The On Start and On Complete instructions are executed when either a dismantle or crafting operation starts, and
successfully finishes. This is the perfect place to add sound and visual effects.
Dismantling Item UI
The Dismantling Item UI component is both used when selecting an Item from the available item list as well as
to display each entry from the list.
Dismantling Item UI
This component is automatically refreshed with the correct information about the current Item.
Recover Chance is a value between 0 and 1 that determines the chance to recover each and every one of the
ingredients that constitute the dismantled Item.
2.10 Releases
2.10.1 Releases
2.8.19 (Latest)
New
Enhances
2.8.18
Fixes
2.8.17
New
Enhances
Fixes
2.8.16
New
Enhances
Fixes
2.8.15
New
Enhances
Fixes
2.8.14
This version breaks compatibility with previous versions and will only work with Game Creator 2.13.43 or higher.
New
Changes
Fixes
2.7.13
New
Enhances
Changes
Fixes
2.6.12
New
Fixes
2.6.11
New
Enhances
Fixes
2.6.10
New
Enhances
Fixes
2.6.9
Enhances
Fixes
2.6.8
New
Changes
Fixes
2.5.7
New
Enhances
Fixes
2.4.6
New
Enhances
Changes
Fixes
2.3.5
New
Enhances
Fixes
2.3.4
New
Enhances
Fixes
2.2.3
New
Enhances
Changes
Fixes
2.1.2
New
• Condition: Is Equippable
• Condition: Is Equipped
• Condition: Is Craftable
• Condition: Is Dismantable
• Condition: Is Usable
Changes
2.0.1
New
• First release
3. Dialogue
3.1 Dialogue
Dialogue
Most games allow verbal communication between the player and other characters - Whether that's using barks,
cinematic sequences or dialogues where the player is prompted to choose between different choices.
The Dialogue module caters all these using simple and intuitive tools that help keep dialogues at a glance
while allowing to fully tailor it to the user's needs.
Get Dialogue
Requirements
The Dialogue module is an extension of Game Creator 2 and won't work without it
3.2 Setup
Welcome to getting started with the Dialogue module. In this section you'll learn how to install this module
and get started with the examples which it comes with.
Before installing the Dialogue module, you'll need to either create a new Unity project or open an existing
one.
Game Creator
It is important to note that Game Creator should be present before attempting to install any module.
If you haven't purchased the Dialogue module, head to the Asset Store product page and follow the steps to get
a copy of this module.
Once you have purchased it, click on Window Package Manager to reveal a window with all your available
assets.
Type in the little search field the name of this package and it will prompt you to download and install the
latest stable version. Follow the steps and wait till Unity finishes compiling your project.
3.2.3 Examples
We highly recommend checking the examples that come with the Dialogue module. To install them, click on the
Game Creator dropdown from the top toolbar and then the Install option.
The Installer window will appear and you'll be able to manage all examples and template assets you have in
your project.
Installer Dialogue
Dependencies
Clicking on the Examples install button will install all dependencies automatically.
Once you have the examples installed, click on the Select button or navigate to Plugins/GameCreator/Installs/
Dialogue.Examples/ .
Dialogue Examples
3.3 Dialogues
3.3.1 Dialogues
All conversations are written in a Dialogue component. To create one, right click on the Hierarchy Panel and
select Dialogue Dialogue.
Add Component
Alternatively, you can select any existing game object and click on the Add Component button and search for
Dialogue.
Dialogue Component
This is the basic view of the Dialogue component, and it's where all the text is written and configured.
However, there are multiple sidebars and windows that can be hidden/shown in order to make it easier to work.
The Dialogue component, fully expanded, has 4 different sections, two of which can be collapsed to increase
the amount of space available when these are not needed.
Dialogue Sections
Top Toolbar
Dialogue Toolbar
The buttons on the left allow to add new nodes to the conversation. These nodes can either be:
• A Text element, which is the most common type. It displays a text on screen.
• A Random selection element, which is similar to the Choice element, but automatically selects a random
value.
Shortcuts
Holding the 'Shift' key while clicking on any of the buttons will perform the opposite operation stated next to
the buttons.
For example, clicking on a Text node that is set as a Sibling, while holding the Shift key, it will create a new
node as a Child of the current one.
To learn more about the different nodes, head to the Nodes section
This section also allows to select where to create the new element. By default, it will always create it right
below the currently selected entry, as a sibling. However, this can be changed to create a new element as a
child of the selection.
• The first one with the gear icon, toggles the left sidebar, which is the Settings window.
• The second one with the square, toggles the right sidebar, which is the Inspector window.
Settings
The Settings window allow to configure the general values of the current conversation. There are 3 sections:
• Configuration: Determines the skin used by the Dialogue when displaying the conversation, as well as whether
it is affected by the time scale or not.
• Actors: This section is automatically filled when new Actors are added or removed, and allows to link a
scene reference with the Actor.
• Editor: This allows to customize how the Editor looks like, in order to have more real estate and work more
comfortable. These options have no impact on gameplay.
Dialogue Settings
Conversations
This section is the most important one, which allows to overview the whole conversation flow at a glance. Each
row is a spoken dialogue line, and they are executed from top to bottom, and examining the child nodes first,
before jumping to the next sibling.
Double Click
Because opening and closing the Inspector sidebar is a very common operation, double clicking on any node will
open (and focus on the current node) or hide the sidebar.
Inspector
The inspector sidebar allows to set and modify the currently selected node of a Dialogue.
Dialogue Inspector
Starting from the top, any node allows to change its type, which can either be a Text, Choice or Random.
Node Types
For more information about node types, see the Nodes section.
The Conditions list below determines whether this node can be executed or not.
The Portrait field allows to choose where the Actor's portrait is displayed (if any at all). It allows three
options:
• Alternate: An alternate position where to show the portrait, if the skin supports it.
The Actor field allows to reference an Actor asset. If one is provided, it also allows to choose which
expression to use for this dialogue line (if any are available).
Actors
Note that whenever an Actor field is modified, the Dialogue component re-scans the whole conversation tree and
gathers which Actors are being used, which can be configured in the Settings sidebar.
The Text field is probably the most important one, and it defines the text displayed by the dialogue.
There's a button below that reads Add Value..., which allows to create a list of key-value pairs. These values
can be used by the text to add dynamic values. For example, displaying the real name of the Player saved in a
global variable.
Dynamic values are incredibly powerful. Read more on how to use them at the Dynamic Values section.
The Audio field, as it name implies, allows to use a voice clip while the text is being displayed.
The Animation field allows to choose an animation field, which is played on the object linked to the current
Actor. If none is provided or the scene reference is empty, the animation is ignored.
Animation Timeline
The Animation field is more powerful than regular Gestures, as it allows to play instructions at any point of the
animation.
For more information about the animation timeline tool, see the Animation Timeline section.
The On Start and On End instructions are executed when the text starts to display and disappears,
respectively.
The Duration field determines how long the text will stay on screen. By default, it waits until the user
presses any button to jump to the next line. However, this can be changed with one of the following options:
• Until Interaction: The default value. Waits until the element is ordered to skip to the next line.
No Audio or Animation
It's important to note that if Audio or Animation are selected, but no asset for those values are present, the
duration will be zero seconds and will skip immediately to the next text line.
The Jump field, by default, indicates the next dialogue line to play is the natural one (child if any,
otherwise the next bottom sibling). However, this field can also be changed to jump to any arbitrary point
marked with a specific Tag, or even exit the Dialogue after the current line is executed.
3.3.3 Nodes
A Dialogue is composed of nodes displayed from top to bottom, and can even be set as children of other nodes.
Nodes can be dragged and dropped to change their position in the conversation tree. Dragging and dropping onto
another node, will convert the dragged one into a child of the targeted.
There are three different node types: Text, Choices and Random nodes.
Text
Text nodes are the most common and used to display conversations. They display a text message on screen and
simply jump to the next node when they are finished.
It's important to note that a Text node can contain children nodes. These will be executed if, and only if, the
parent Text node's conditions are satisfied. This is specially useful if you want to display a conversation only
after meeting certain conditions.
Any text can be enhanced with rich text tags, which allow to change the color, size and other properties of
specific regions. For example, to display the word James in white in the phrase Hello James , you can surround
the specified word between <color> tag:
Hello <color=#FFFFFF>James</color>
Choices
Choice nodes prompt the user with a collection of choices. How these choices are presented and their behavior
is configured below with a new set of fields that appear.
Since version 2.2.8 Choice options are configured in the Dialogue Skin by default. However, you can change the
dropdown option from From Skin to From Node and a list of options that override those from the Skin will appear.
The available choices are picked from the direct children of the Choices node, which should usually be Text
nodes.
• Hide Unavailable: Determines whether unavailable choices (their Conditions return false) should be displayed
(but greyed out) or hide them completely.
• Hide Visited: Determines whether the choice is skipped if the line has already been visited.
• Skip Choice: Allows to skip the execution of the Text choice selected, and skip to the next immediate one.
• Shuffle Choices: When ticked, the choices order will be shuffled and displayed randomly.
• Timed Choice: Determines if the choice has a time limit. If checked, two new fields wil appear down below.
• Duration: Specifies the amount of time the user has to pick a choice, in seconds.
• Timeout: Defines what happens if the user fails to input a choice, which can either be picking one at
random, the first option or the last one (both prior to shuffling, if enabled)
Skipping Choices
Choosing Skip Choice allows the player to not speak the dialogue line when picking it from the prompt. For
example, let's say a bartender asks the player whether they want a drink. The Player could see the option "Yes, a
Moonlight Specter". If left unchecked, the Player would then execute the Text node. Some games, however, don't
repeat the choice made by the user and assume the player already said it when the user picked the choice.
Single Choice
If the Choices does only have a single choice available, it will be automatically selected without requiring the
user to choose it.
Random
Random picks are similar to Choices, except for the fact that the user is not prompted to pick them, and
instead, they are randomly picked.
Since version 2.2.8 Random options are configured in the Dialogue Skin by default. However, you can change the
dropdown option from From Skin to From Node and a list of options that override those from the Skin will appear.
The Random node also has the field Allow Repeat which determines whether the same choice can be picked in a
row, or not.
Greeting
Random choices are useful to allow characters to pick a random line from a collection. For example, a shop keeper
could greet the player differently every time they talk.
There are times where a dialogue text must contain some sort of variable value. For example, displaying the
player's name that has previously been prompted.
Dynamic Values allow to replace special symbols on the text with values that come from more dynamic sources,
such as Local Variables, Stats, etc...
There are two types of dynamic values: Local and Global ones.
Local dynamic values are set up inside the Dialogue component, right under the Text field of a node.
Each value is assigned an index value, starting from 0 at the top. Using the index number between curly braces
{ and } .
Player Name
In the screenshot above, the text {0} will be replaced by the Global Variable value called name .
A Local dynamic value can also have a specific color assigned to it, appear in bold and/or in italic
characters.
Global dynamic values are very similar to the local ones, but their scope is project-wide, so they only need
to be set up once. In the previous example, in order to display the player's name, we'd need to configure a
Local dynamic value for each dialogue line that displays the player's name.
Instead, it's much more efficient to define a global value that any Dialogue can make use of.
To edit or create Global dynamic values, click on the top toolbar's Game Creator button and navigate to
Settings. Click on the Dialogue tab and a list of all created values will appear, with a button to add new
ones.
Global dynamic values have an extra field called Key, which is the unique ID assigned to that particular
value.
In order to use a Global dynamic value, one must type the Key value between brackets. For example, if the key
value is "player-name", the symbol that replaces itself with the Global dynamic value is {player-name} .
Global dynamic values also allow to specify whether the replaced text should be printed in Bold, Italic and/or
in a specific color.
The Animation field available in every Dialogue node is a fully-featured Timeline-like sequencing tool that
allows to play, preview and add events at different timestamps of an animation.
Dragging and dropping an Animation Clip onto the Animation field reveals a sequencing tool below.
The first section is called Configuration and contains all the setup options any other Gesture has.
The second one is the Sequencing tool, where the animation clip can be previewed in the scene view if the
Actor referenced is present in the Editor scene. To disable scrubbing the preview, click on the squared blue
button.
The timeline has rhomboid-like shapes called Markers, which execute instructions when the animation clip plays
that specific point.
Moving Markers
Markers can be dragged and slide around the timeline. Doing so will automatically enter animation preview mode,
so it's easier to adjust the exact point where the instructions should be called.
• Clicking on the plus icon will place a new Marker on the timeline where the head is.
• The minus button removes the currently selected Marker and any instructions associated with them.
Executing Instructions
It is very important to note that if the Dialogue line stops executing before the animation clips has finished,
the Animation sequence will be canceled at that point and the rest of Markers won't be executed.
If there are some critical events that need to be executed before skipping to the next line, these should be
placed inside the On Start or On End instruction lists of the Node.
3.3.6 Tags
Each Dialogue line can be marked with a Tag, which is a unique name that identifies that line from the rest.
• Jumping to a specific line after a node has been executed (useful for looping conversations).
To add a Tag to a node, right click it and select Tag.... A pop up window will appear with a text prompt.
After giving it a name, click Save and it will display on the right side of the node.
Dialogue Tags
Unique Tags
Note that Tags should have unique names across the Dialogue component and their name can't contain any spaces or
non-alphanumeric characters.
Here's an example of a Condition checking if the my-tag Tag has been executed or not.
3.4 Actors
3.4.1 Actors
Actors are assets that represent a character speaking in a Dialogue and allow to configure their name, how
they speak, appear and writing effects.
Dialogue Actor
Actors Name
The first two fields allow to give the Actor a Name and a Description.
Both fields are optional, but can be used in the Dialogue component to automatically display the name of the
speaker when a character linked to this actor says something.
Expressions
The Expressions list is a collection of states in which a character can be when speaking a line. You can use
these to express anger, surprise, confusion or any other mental state when a line is spoken, with their
respective animation, sound and visual queues.
Effects
The Typewrite section allows Dialogue lines to appear word by word at a certain pace. This is very useful when
different characters have different voice cadence and you want to reflect that without using voice-over.
Dialogue Actor
The Frequency field determines how many characters per second appear.
Gibberish is an audio effect played during non-voice acted characters that provide a cheap and easy way to
imbue mood into each spoken line. Commonly used in older RPG games, each character plays a random collection
of sounds with varying pitch and speed.
Default Gibberish
The Dialogue module comes with a built-in gibberish sound effect ready to be used and customized. Simply select
it from the Audio Clip drop down and change the Pitch value to fit your needs.
Custom Skin
Most of the time, all characters will use the same speech bubble displayed in the user interface. However,
some games require some characters to have a custom speech bubble, like a robot character using a different
typography and speech bubble aesthetic.
The Optional Skin field allows a character to override its speech bubble whenever this Actor is used.
About Skins
For more information about how Skins work, see the Skins section.
The field Default Portrait allows to define a default position for this Actor's portrait. This is used by the
Dialogue's component, when a node portrait is set to Actor Default.
3.4.2 Expressions
Expressions allow to deliver dialogue lines in a specific mood. For example, changing the Sprite character
that represents the speaker with the associated emotion, show an onomatopoeia, sound effect and/or an
animation.
Default Expression
It's important to note that the top most Expression is considered the default expression, and thus it should be
the most commonly used one.
The ID field determines the unique name that identifies this Expression among the rest.
The Sprite is a texture that is used as a portrait when the speaker uses this emotion.
The Speech Skin is an optional field that allows to override the speech UI skin used when the Actor uses this
particular expression. If none is provided, the Actor skin is used. And if the Actor doesn't have any either,
the default one is used.
To know more about what a Speech Skin is and how to use it, visit the UI section.
The On Start and On End instructions are executed at the very beginning and end of the Expression. This can be
used to play a Gesture or even enter/exit a State when using a specific expression.
When a new Expression is used, the On Start instructions will be executed. However, the On End instructions won't
be called until a new Expression is used, or the Dialogue is finished.
For example, let's say the Player delivers a new dialogue line with the Angry expression. If the next line also
uses the Angry expression, the On End instructions won't be called until the Player delivers a new line with a
different expression, or the dialogue finishes.
3.5 Skins
3.5.1 Skins
Skins are assets that allow a Dialogue to quickly change its looks by swapping them, as well as configure
various aspects, such as sound effects and animations.
• Dialogue Skins: Also known as Theme skins, are the most general ones.
• Speech Skins: They require to be part of a Dialogue Skin and can override the speech bubble of a speaker.
Built-in Skins
The Dialogue module comes with a collection of skins that you can use in your games. To install them, click on
the toolbar and select Game Creator Install...
You'll see a list of Skins to install with a short description next to them. Select the one you want to use (or
all of them) and click on the Install button.
Dialogue Skins
Dialogue skins change the look and feel of a conversation, and contains all the necessary information to
display speech bubbles (through the use of Speech Skins), history logs, present choices to the user and show
or hide speaker's portraits.
You can drag and drop any available Dialogue Skins onto this field and it will automatically use it for this
particular conversation component.
A Dialogue Skin contains a prefab field, which is the UI schematic with the different components that conform
the interface.
To learn more about creating a custom skin, see the User Interface section.
Dialogue Skin
The Animations section allows to define which UI animations are played when a Dialogue component starts, loops
and when it ends. These fields are optional and if none a provided, no animation will be played.
The Sound Effects section allows to define which sounds are played at different times.
Since version 2.2.8 the Dialogue options are configured globally in each skin.
At the end of the Dialogue Skin asset there's another section called Nodes where the default options for Text,
Choice and Random nodes are configured. Unless a node overrides the values, these will be used.
Speech Skins
A Speech Skin is used by the Dialogue Skin to display a speech bubble by the current speaker.
A Dialogue Skin requires to have a default Speech Skin. However, this can be overridden by any speaker,
assigning a new Speech Skin onto its Actor asset.
A Speech Skin contains a Prefab object field which defines the UI schema.
To learn more about creating a custom skin, see the User Interface section.
The Animations section allows to optionally define which animation clips will be played when a new dialogue
line is spoken and a looped animation, if any is needed.
It also allows to configure whether the animation should be played only if a new speaker is delivering the
line, or should the animation be played for every new line, even if the same character is delivering two or
more of them in a row.
The Sound Effects section allows to play a sound effect when a dialogue line starts to be delivered, and when
it finishes.
The Override Log field is an optional one that allows to customize the log entry (if any available). This is
specially useful if you want, for example, the Player to have a different log design than the rest of the
characters.
Creating custom interfaces for a Dialogue is fairly straight forward, although we recommend duplicating an
existing one and modifying it in order to make the process easier.
Advanced Section
Customizing the UI requires certain degree of expertise with Unity and its UI system.
A custom Dialogue Skin interface must have, at the top level game object, a Canvas component and a Dialogue UI
component.
The Dialogue UI component is te entry point of a conversation and delegates to its the rest of the child
dialogue UI components what to do and when to do it.
Dialogue UI component
• Default: The default Speech Skin to use, if the current Actor speaker doesn't override it.
Optional Components
There rest of the components mention below are all completely optional.
The Dialogue Unit Timer UI is a component that allows to display a countdown when a choice is presented to the
user and has to make a selection before the time runs out.
The Dialogue Unit Choices UI is a component that allows to configure where the choices of an interface go and
look like.
Choice by Index
Since version 2.1.7 the Dialogue Choice UI component contains a field called Index which references a Text or
Text Mesh Pro Text component, which indicates the index of the choice, starting from 1.
You can use the Choice Index Instruction to attempt to choose an choice by its index. If a choice is available
with that idex, it will automatically be chosen.
We recommend using a layout component, such as Horizontal Layout Group or a Vertical Layout Group in order to
automatically align and distribute the choices.
The Dialogue Unit Logs UI is a component that collects and stores past lines delivered and choices, so the
user can review them.
The Dialogue Unit Portraits UI is a component that displays Sprite of the current speaker, if any at all.
A Speech Skin UI prefab must contain, at the root of the game object, the Speech UI component.
Speech UI component
The Active field references a game object from itself that is set as active/inactive, depending on whether a
dialogue text is being delivered.
Similarly, the Actor Active field is a optional game object reference that is set as active/inactive,
depending on whether the currently delivered line contains an Actor reference or not.
Actor Name and Actor Description, as their name implies, reference a Text component which changes into the
current Actor's name and description (if any).
The Active Portrait field is another optional one that sets the game object as active or inactive, depending
on whether there Actor asset and chosen Expression contains a Sprite to be used. If it does, the Portrait
Image field is used to fill it with the texture value.
The Text field is the most important one, and it references a Text component that changes with the text of the
current line being delivered.
The Skip game object is an optional game object reference that is used to mark the end of a sentence. It
indicates that the user can press any key to jump to the next dialogue line, and it usually has the shape of a
small arrow pointing right or downwards.
The Dialogue module symbiotically works with Game Creator and the rest of its modules using its visual
scripting tools.
• Instructions
• Conditions
• Events
Each scripting node allows other modules to use any Dialogue feature.
3.7.2 Conditions
Conditions
SUB CATEGORIES
• Dialogue
Dialogue
DIALOGUE
Conditions
• Dialogue Played
• Tag Visited
DIALOGUE PLAYED
Description
Parameters
Name Description
Keywords
TAG VISITED
Description
Parameters
Name Description
Keywords
3.7.3 Events
Events
SUB CATEGORIES
• Dialogue
Dialogue
DIALOGUE
Events
• On Finish Dialogue
• On Start Dialogue
Description
Executed when any or a specific Dialogue finishes playing the current line
Keywords
ON FINISH DIALOGUE
Description
Keywords
Description
Keywords
ON START DIALOGUE
Description
Keywords
3.7.4 Instructions
Instructions
SUB CATEGORIES
• Dialogue
Dialogue
DIALOGUE
Sub Categories
• Ui
Instructions
• Play Dialogue
• Stop Dialogue
PLAY DIALOGUE
Description
Plays a dialogue
Parameters
Name Description
Keywords
STOP DIALOGUE
Description
Parameters
Name Description
Keywords
UI
Ui
Instructions
• Choice Index
• Skip Line
Choice Index
Description
Parameters
Name Description
Keywords
Skip Line
Description
Parameters
Name Description
Keywords
3.8 Releases
3.8.1 Releases
2.5.15 (Latest)
Changes
Removes
2.5.14
New
Changes
2.4.13
This version breaks compatibility with previous versions and will only work with Game Creator 2.13.43 or higher.
New
Changes
Fixes
2.3.12
Fixes
2.3.11
New
Fixes
2.3.10
Fixes
2.3.9
New
Enhances
Fixes
2.2.8
New
Fixes
2.1.7
New
Enhances
Changes
Fixes
2.0.6
Enhances
Fixes
2.0.5
New
Enhances
Fixes
2.0.4
Fixes
2.0.3
New
Enhances
Fixes
2.0.2
Fixes
2.0.1
New
• First release
4. Stats
4.1 Stats
Stats
Nearly all games one can play has some kind of Stat system; Whether it is a simple health bar with a fixed
amount of hit points or a complex RPG with dozens of stats that influence the progress of the player and the
outcome of any interaction.
The Stats module has been envisioned to help game designers more naturally and easily architect their games.
Get Stats
Requirements
The Stats module is an extension of Game Creator 2 and won't work without it
4.2 Setup
Welcome to getting started with the Stats module. In this section you'll learn how to install this module and
get started with the examples which it comes with.
Before installing the Stats module, you'll need to either create a new Unity project or open an existing one.
Game Creator
It is important to note that Game Creator should be present before attempting to install any module.
If you haven't purchased the Stats module, head to the Asset Store product page and follow the steps to get a
copy of this module.
Once you have purchased it, click on Window Package Manager to reveal a window with all your available
assets.
Type in the little search field the name of this package and it will prompt you to download and install the
latest stable version. Follow the steps and wait till Unity finishes compiling your project.
4.2.3 Examples
We highly recommend checking the examples that come with the Stats module. To install them, click on the Game
Creator dropdown from the top toolbar and then the Install option.
The Installer window will appear and you'll be able to manage all examples and template assets you have in
your project.
• Classes: A template with Stats, Attributes and Classes to kickstart your game
Installer Stats
The Examples requires both the Classes and UI extensions in order to work.
Dependencies
Clicking on the Examples install button will install all dependencies automatically.
Once you have the examples installed, click on the Select button or navigate to Plugins/GameCreator/Installs/
Stats.Examples/ .
Stats Examples
4.3 Classes
4.3.1 Classes
Taking inspiration from classic pen and paper RPG games, the Stats module lets you create character Classes
which contain a collection of Stats and Attributes. On the other end, Classes can be assigned to any number of
characters or game objects using the Traits component.
Stats Overview
Example
This concepts are more easily understood with an example. Let's say we want to create a Warrior character. In
this case, we would create a Class called "Warrior" which would contain the following Attributes:
• Health
• Stamina
• Strength
• Constitution
Now that we have the Warrior class, we can create a scene Character with the Traits component and assign it the
Warrior Class defined above. This same class can be reused for other characters, such as enemies and NPCs.
4.3.2 Stats
Stats are objects that represent a particular numeric trait of a character. This value can evolve throughout
the whole game and its final value can be modified using a Formula.
Common Stats
Common stat values on games are strength , dexterity , wisdom , luck , ...
To create a Stat asset, right click on the Project panel folder you want to create it and select Create Game
Creator Stats Stat.
Stat Asset
The ID value must be unique throughout the whole project and it is used to identify this particular numeric
trait. It is also used in Formulas so be sure to give it a name that's easy to remember.
Naming Stats
We recommend sticking to acronyms or short and single worded names. For example, if the Stat represents the
strength of the character, its ID should be str or strength .
The Base Value is the numeric value that the Stat starts with. It is worth noting this value is not
necessarily the final value of the Stat, just a mutable numeric value.
The final value of a Stat is calculated applying a Formula. If none asset is provided, the final value is
simply the Base Value.
Let's say we have a stat with a Base value of 100 and a Formula that multiplies this value by the level (another
stat value) of the character. In this case, the resulting final value of the stat would depend on the character's
level.
For example, if the character is at level 1, the value would be 100 (100 * 1). At level 2, it would be 200 (100 *
2), at level 3 it would be 300 (100 * 3), etc...
The UI dropdown contains a list of fields that can be used to display information about this particular Stat
on the game scene, including a name, acronym, description, color and icon.
4.3.3 Attributes
Attributes are objects that represent a numeric trait of a character, but its value is clamped between a min/
max range.
Common Attributes
The most common attribute is the health of a character. Its value could a value clamped between 0 and 100.
To create an Attribute asset, right click on the Project panel folder you want to create it and select Create
Game Creator Stats Attribute.
Attribute Asset
The ID value must be unique throughout the whole project and it is used to identify this particular numeric
trait. It is also used in Formulas so be sure to give it a name that's easy to remember.
Naming Attributes
We recommend sticking to acronyms or short and single worded names. For example, if the Attribute represents the
health of the character, its ID should be hp or health .
The Min Value and Max Value are numeric values that represent the minimum and maximum range of the value. The
Max Value comes from a Stat as this value can change at runtime.
For example, if the attribute represents the health of the player, levelling up could increase the maximum
health. In this case, increasing a Stat called "Max_Health" would automatically increase the max cap of the
health Attribute.
The Start Percent field defines the percent at which the character's attribute starts. By default most games
should start with their attributes completely filled.
The UI dropdown contains a list of fields that can be used to display information about this particular
Attribute on the game scene, including a name, acronym, description, color and icon.
4.3.4 Classes
Classes are objects that represent a type of character or object with RPG traits, and contains a list of Stats
and Attributes.
Classes in an RPG
Just like in most RPGs, a Class defines a type character with different values. For example, a Mage will have the
same Stats and Attributes as a Knight, but their values and progression may differ, making the Mage grow his
magic abilities at a much higher rate than the Knight, which focuses on its physical ones.
Class
To create a Class asset, right click on the Project panel folder you want to create it and select Create
Game Creator Stats Class.
By default, a Class has an empty list of fields. The image below represents a Class filled with a collection
of Stats and Attributes.
Class Asset
Eye Icon
The eye icon that appears next to all Attributes and Stats is a button that can be toggled. It has no impact on
the game whatsoever. Instead it hides the option from the Traits component. This is useful if you have hundreds
of Stats and Attributes and want to keep the important ones at a glance.
The Class and Description fields are used to display information about the current class in the game's user
interface.
Attributes
The Attributes list defines all the attributes linked to this particular class.
To add a new Attribute, click on the "Add Attribute" button at the bottom and pick (or drag and drop) the
desired Attribute asset.
Class Attributes
In this section, the selcted Attribute's starting percent can be overriden, in case a particular Class has a
different starting value than another.
Stats
The Stats list defines all the stats linked to this particular class, including the ones that define the max
cap of Attributes.
To add a new Stat, click on the "Add Stat" button at the bottom and pick (or drag and drop) the desired Stat
asset.
Class Stats
In this section, the selected Stat base value and formula can be overriden.
When creating multiple RPG classes, such as Mages, Knights and Archers, it's a good practice to have the same
Attributes and Stats. In order to change their progression rates, their values can be overriden within the Class
asset itself.
For example, the wisdom base stat value may have a much higher one in a Mage class than in a Knight.
4.3.5 Traits
Traits are components that link a Class asset with a scene game object.
It is important to note that, although Characters will most likely be the objects with a Traits component, these
can be attached to any game object.
For example, to assign the Player with the Knight Class one just has to click on the Player game object "Add
Component" button at the bottom of the Inspector and look for the Traits component.
Traits in Editor
Once the Player has the Traits component a message appears prompting to assign it a Class asset.
Drag and drop any Class asset onto the designated field and it will change its appearance to display the
asset's information.
Each Attribute and Stat can be expanded and their values can be overriden, just like in the Class asset.
Traits at Runtime
Once the game object has a Traits component linked with a Class asset, it is ready to interact in play mode.
To help the designer understand what's happening in play mode and debug any possible problems, the Traits
component changes its Inspector appearance to display real-time information about its current Attribute and
Stat values.
Traits in Playmode
4.4 Formulas
Formulas are at the core of the Stats module; They allow the game designer to elaborate simple or complex
systems that intertwine different stat and attribute values.
Math Expressions
Formulas are written using math expressions. For example the following formula:
source.stat[attack] - target.stat[defense]
Can be used to calculate the damage dealt to an enemy. It calculates the output taking into account the attack
stat from the player and subtracting the defense stat from the enemy.
It is up to the game designer defining how simple or complex these formulas should be.
To create a Formula asset, right click on the Project panel folder you want to create it and select Create
Game Creator Stats Formula.
Formula Asset
The Formula asset has a text field at the top, where the the math expression can be written.
The Help section contains a list of all possible symbols that can be used. For example, to retrieve the final
value of a Stat called "strength" from the caller, use the source.stat[strength] symbol.
Each section can be expanded and collapsed to keep the important information at a glance.
Formula Help
Symbols
The Table field is an optional one, that can be used to reference a Table asset from within the formula
expression.
4.4.2 Symbols
A formula expression is composed of a series of symbols, joined together by a math expression, such as the
sum, subtraction, product and division.
For example, the attack power of a character could be it's base strength value multiplied by its level. In
this case, the expression would be:
source.base[strength] * source.stat[level]
Stats
This section covers all values found inside a game object with a Traits component. A stat or attribute can
either come from the Source object or the Target object. For example, when calculating the damage dealt to an
enemy, Source references the attacker and Target the attacked object.
In some cases, there may be no distinction between source and target. For example, when calculating the level of
a character. In this case, we recommend ignoring the Target symbols and use Source.
To get the value of a Stat or Attribute, the target object of the query is first specified, followed by a dot
(.) and the value type. Between brackets, the id of the stat or attribute is specified.
Stat Example
For example, to retrieve the attribute "mana" from the source object it's done using:
source.attr[mana]
Circular Formulas
It is up to the game designer to avoid circular dependencies, and Game Creator will not warn about them. A
circular dependency happens when a formula requires a value, which must be calculated using the first formula.
This locks the process in an infinite loop.
Variables
Variables work very similarly to retrieving Stats and Attributes. The targeted object is first specified,
followed by a dot (.) and the keyword var. And between brackets, the name of the variable.
Example
For example, if a numeric Local Variable attached to the targetted object with the id "hit-counter" should be
accessed, the expression would be:
target.var[hit-counter]
Local Variables
For the moment, a Formula can only access Local Variables by name. In a future update, List Variable access will
be supported.
Random
Most skill checks use some sort of random values. The Formula analyzer provides three symbols to generate a
random value.
• random[min, max] : Returns a value between min and max, both included.
Random[min, max]
• dice[rolls, sides] : For those old-school game designers, you can roll X amount of dices of Y sides and this
symbol will return the sum of values.
Dice[rolls, sides]
Using dice[2, 6] returns the result of rolling 2 dices of 6 sides (the most common one).
• chance[value] : Returns 1 if a random value between 0 and 1 is lower or equal than the value specified.
Chance[value]
Using chance[0.2] has a 20% chance of returning a value of 1 and an 80% chance of returning 0.
Arithmetic
Number manipulation is also useful and commonly used. For example, to round numbers or choosing between two.
Tables
Tables are mostly used for player progression, as they map a certain input value to another value. For more
information about Tables see this link.
Table asset
Table symbols start with table followed by a dot (.) and the type of value to retrieve. The value is specified
between brackets afterwards.
For example, let's say we have a stat called experience and we want to calculate the character's level based on
that. We can use a Table that transforms the accumulated experience points to a value that represents the level.
In this case, the expression would be:
table.level[experience]
• level[value] : Returns the level at from the table based on the input cummulative value.
• value[level] : Returns the cummulative value necessary to reach the input level.
• next[value] : Returns the value left to gain to reach the next level.
• ratio[value] : Returns a unit ratio that represents the progress made at the current level.
4.5 Tables
Commonly used for character progression, Tables are charts that map a range of values to an integer.
4.5.1 Concepts
• Cumulative Value: This is the total amount of value (or experience) accumulated.
• Value: The difference between the current level's cumulative value and the total cumulative value.
Table concepts
To create a Table asset, right click on the Project panel folder you want to create it and select Create
Game Creator Stats Table.
Table
A Table asset has a visual chart and a configuration box at the bottom. The chart can be scrubbed to reveal
the different cumulative values at each level.
Example
In the example above, at Level 13, the cumulative value is 1248 and it will require 208 more (for a total of
1455) to reach Level 14.
A character can progress linearly, exponentially, or at a custom rate. That's why Game Creator provides a
range of different tables for the user to choose from.
Tables Progression
To change the type of progression, click onl the Table field and choose one from the dropdown menu:
• Constant: Each level requires the same amount of value (or experience).
• Linear: Each level requires a value equal to the product of a constant and the current level.
• Geometric: Each level requires a value equal to the current level multiplied by a fixed coefficient rate.
Recommendation
We recommend using Linear Progression for most cases, as it's the one commonly used in games where the player
progressively receives more experience. Geometric Progression is recommended for short games where power ramps up
very quickly (like in MOBAS).
This is where Stat Modifiers come into play: They increase or decrease a Stat value by a certain amount, and
can be added and removed at any time.
To add a Stat Modifier to a Traits component, use the visual scripting Instruction Add Stat Modifier. This
instruction allows to specify a target object, which must have a Traits component, a Stat to affect and a
value.
This value can either be a percentage or a constant and can be displayed separately in the UI.
Stat Modifiers in UI
You may have raised an eyebrow when Stat Modifiers can use constant and percentage values, as the result is
different when applying a product after an addition or vice versa. The Stats module always applies percentage
based modifiers first, and then adds any constant modifiers.
Removing a Stat Modifier is as easy as adding one. All that needs to be done is to use the visual scripting
instruction Remove Stat Modifier and input the same values as a previously added one.
Most RPG games use the same Status Effects, such as Poison, which drains the character's health for a period
of time. However, you can create your own and completely customize the afliction.
To create a Status Effect asset, right click on the Project panel folder you want to create it and select
Create Game Creator Stats Status Effect.
Status Effects
A Status Effect has an ID which is used to uniquely identify it among all other afflictions. It is very
important to keep this value unique across the whole project.
The Type field determines whether this effect is positive, negative or neutral for the targeted character.
This is useful when using the instruction Remove Status Effects, where you can choose to remove only those
that have a negative impact.
Max Stack determines how many of the same Status Effect can be active at a give time on a target.
By default, most Status Effects will have a stack of 1, and adding subsequent effects refresh the duration.
However, it is entirely possible to stack multiple (for example) Poison aflictions, increasing their health
drain.
The Save toggle determines whether the Status Effect persists after saving and loading back the game. Saving a
Status Effect keeps track of the remaining time.
Has Duration allows the Status Effect to run for a certain amount of time (specified in the Duration field, in
seconds).
If this field is unticked, the Status Effect will continue until it's manually removed, using the appropriate
visual scripting instruction.
The UI section allows the user to define any information displayable to the player, such as the name, a
description of what the ailment does, its color and even an icon.
Inside the OnStart, On End and While Active sections is where the logic of the Status Effect goes and it uses
Game Creator's visual scripting tools.
• On Start: A list of instructions executed as soon as the Status Effect is added onto a target.
• On End: A list of instructions executed when the Status Effect stops taking effect on a target.
• While Active: A list of instructions that runs every frame, as long as the Status Effect is active.
Poison
For example, a Poison status effect could start spawning a particle effect onto the targeted character using the
On Start instruction list. To damage the player, it would use the While Active instruction list and subtract a
bit of the Target's health every few seconds.
To add a Status Effect onto a target you can use the visual scripting instruction Add Status Effect.
All that needs to be done is to select the targeted character, which must have a Traits component, and specify
the type of Status Effect.
The Stats module makes it really easy to build flexible user interfaces (UI) using Unity UI.
It comes with a few components that work fairly similar. You can attach each component to any UI game object
and drag and drop any Text and Images to each of its fields.
• Stat UI
• Attribute UI
• Formula UI
• Status Effects UI
These components are all found under the Add Component submenu on any game object and navigating to Game
Creator UI Stats. For example, this is the Stat UI component.
Stat UI example
The first two fields are required: Target is the game object with a Traits component and Stat is the asset to
be referenced by this UI component.
All other fields are optional and will only be updated if a change is detected.
Stat UI
For example, dragging a Text component onto the Value field will change the contents to a numeric value that
represents the selected Stat value.
4.8.2 Stat UI
The Stat UI component allows to display the runtime information about a specific target's Stat. To create one,
click on a game object's Add Component button and navigate to Game Creator UI Stats Stat UI.
Stat UI
All fields are optional and all that needs to be done is to drag Text and Image components to the
corresponding fields.
Stat UI
For example, to display the Name of a Stat, drag and drop the Text component onto the Name field and it will
automagically update its content, even if the targeted game object changes.
4.8.3 Attribute UI
The Attribute UI component allows to display the runtime information about a specific target's Attribute. To
create one, click on a game object's Add Component button and navigate to Game Creator UI Stats
Attribute UI.
Attribute UI
All fields are optional and all that needs to be done is to drag Text and Image components to the
corresponding fields.
Attribute UI
For example, to display the Name of an Attribute, drag and drop the Text component onto the Name field and it
will automagically update its content, even if the targeted game object changes.
Transitions are a feature that allow the Image fill progress to animate and stall for a certain amount of
time.
Attribute UI Transitions
Transitions
This is mostly used on health and mana bars, where getting hit makes the HP bar display a second bar below that
decreases after a few seconds, in order for the player to get a sense of the amount of damage taken.
• Stall Duration: Amount of seconds debounced between the value change and the start of the transition
• Transition Duration: Amount of seconds it takes to animate towards the targeted value.
4.8.4 Formula UI
The Formula UI component allows to display the result of an expression between two game objects with a Traits
component. To create one, click on a game object's Add Component button and navigate to Game Creator UI
Stats Formula UI.
Formula UI
All fields are optional and all that needs to be done is to drag Text and Image components to the
corresponding fields.
Formula UI
For example, to display the resulting value of a Formula applied to the Player and another character, drag and
drop the Text component onto the Value field and it will automagically update its content, even if any of the
targeted game objects changes.
• Status Effect List UI: Gathers information about a targeted game object and manages the concrete list of
activet aflictions.
• Status Effect UI: Displays information about a particular afliction. It is spawned by the Status Effect List
UI component.
To create one, click on a game object's Add Component button and navigate to Game Creator UI Stats
Status Effect List UI.
The Target field should point at the game object with a Traits component.
Types allows to filter which status effects to display: Negative, Positive, Neutral, or any combination of
them.
Container and Prefab Status Effect are the most important ones: For each afliction on the targeted character,
the Status Effect List UI component will spawn (or reuse) an instance of a prefab. The spawn location is as a
child of the Container rect transform.
Example
So if the Player has 3 ailments: Poison, Paralyzed and Bleeding, the Status Effect List UI component will spawn 3
instances of the prefab as a child of the Container transform.
Each spawned instance must have, at the root level, the component Status Effect UI component, which communicates
with the Status Effect List UI which afliction to display.
Status Effect UI
To create one, click on a game object's Add Component button and navigate to Game Creator UI Stats
Status Effect UI.
Status Effect UI
As can be seen, this component does not have a Target field. Instead, its the Status Effect List UI component
that feeds it the target and concrete afliction.
All fields are optional and automatically update the values according to changes sent by the parent component.
The Stats module symbiotically works with Game Creator and the rest of its modules using its visual scripting
tools.
• Instructions
• Conditions
• Events
Each scripting node allows other modules to use any Stats feature.
The Stats module also comes with a collection of custom Properties. Any interactive element can request the
value of a Stat, Attribute and Formula using the value dropdown, as seen in the image below.
Properties
4.9.2 Conditions
Conditions
SUB CATEGORIES
• Stats
Stats
STATS
Conditions
• Check Formula
• Compare Attribute
• Compare Stat
• Is Traits Of Class
CHECK FORMULA
Description
Returns the comparison between the result of a Formula against another value
Parameters
Name Description
Source The game object that the Formula identifies as the Source
Target The game object that the Formula identifies as the Target
Keywords
COMPARE ATTRIBUTE
Description
Parameters
Name Description
Keywords
COMPARE STAT
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
Description
Returns true if the game object has a particular Status Effect active
Parameters
Name Description
Min Amount The minimum amount of stacked and active Status Effects
Keywords
Buff Debuff Enhance Ailment Blind Dark Burn Confuse Dizzy Stagger Fear Freeze Paralyze Shock Silence Sleep
Silence Slow Toad Weak Strong Poison Haste Protect Reflect Regenerate Shell Armor Shield Berserk Focus Raise
IS TRAITS OF CLASS
Description
Returns true if the targeted Traits component has the specified Class
Parameters
Name Description
Description
Returns true if the targeted Traits component has the specified Attribute
Parameters
Name Description
Description
Returns true if the targeted Traits component has the specified Stat
Parameters
Name Description
4.9.3 Events
Events
SUB CATEGORIES
• Stats
Stats
STATS
Events
• On Attribute Change
• On Stat Change
ON ATTRIBUTE CHANGE
Description
Parameters
Name Description
When Determines if the event executes when the Attribute increases, decreases or both
Attribute The Attribute from which the event detects its changes
Keywords
ON STAT CHANGE
Description
Executed when the value of a specific game object's Stat is modified. Including due to Stat Modifiers
Parameters
Name Description
When Determines if the event executes when the Stat increases, decreases or both
Stat The Stat from which the event detects its changes
Keywords
Description
Parameters
Name Description
Status Effect Determines if the event detects any Status Effect change or a specific one
Keywords
Buff Debuff Enhance Ailment Blind Dark Burn Confuse Dizzy Stagger Fear Freeze Paralyze Shock Silence Sleep
Silence Slow Toad Weak Strong Poison Haste Protect Reflect Regenerate Shell Armor Shield Berserk Focus Raise
4.9.4 Instructions
Instructions
SUB CATEGORIES
• Stats
Stats
STATS
Sub Categories
• Ui
Instructions
• Change Attribute
• Change Stat
• Set Attribute
• Set Formula
• Set Stat
Description
Adds a value Modifier to the selected Stat on a game object's Traits component
Parameters
Name Description
Keywords
Slot Increase Equip Fortify Vitality Constitution Strength Dexterity Defense Armor Magic Wisdom Intelligence
Description
Parameters
Name Description
Keywords
Buff Debuff Enhance Ailment Blind Dark Burn Confuse Dizzy Stagger Fear Freeze Paralyze Shock Silence Sleep
Silence Slow Toad Weak Strong Poison Haste Protect Reflect Regenerate Shell Armor Shield Berserk Focus Raise
CHANGE ATTRIBUTE
Description
Parameters
Name Description
Keywords
CHANGE STAT
Description
Parameters
Name Description
Keywords
Description
Clears any Status Effects based on their type from the selected game object's Traits component
Parameters
Name Description
Keywords
Buff Debuff Enhance Ailment Blind Dark Burn Confuse Dizzy Stagger Fear Freeze Paralyze Shock Silence Sleep
Silence Slow Toad Weak Strong Poison Haste Protect Reflect Regenerate Shell Armor Shield Berserk Focus Raise
Description
Removes an equivalent Modifier from the selected Stat on a game object's Traits component.
Parameters
Name Description
Keywords
Slot Decrease Unequip Weaken Vitality Constitution Strength Dexterity Defense Armor Magic Wisdom Intelligence
Description
Removes a Status Effect from the selected game object's Traits component
Parameters
Name Description
Keywords
Buff Debuff Enhance Ailment Blind Dark Burn Confuse Dizzy Stagger Fear Freeze Paralyze Shock Silence Sleep
Silence Slow Toad Weak Strong Poison Haste Protect Reflect Regenerate Shell Armor Shield Berserk Focus Raise
SET ATTRIBUTE
Description
Parameters
Name Description
SET FORMULA
Description
Parameters
Name Description
SET STAT
Description
Parameters
Name Description
Description
Parameters
Name Description
UI
Ui
Instructions
Description
Parameters
Name Description
Description
Parameters
Name Description
Description
Parameters
Name Description
Description
Parameters
Name Description
Description
Parameters
Name Description
Status Effects List UI The game object with the Status Effects List UI component
4.10 Releases
4.10.1 Releases
2.6.18 (Latest)
Enhances
2.6.17
Enhances
Fixes
2.6.16
Fixes
2.6.15
This version breaks compatibility with previous versions. Stats, Attributes, Status Effects and Formulas are now
dynamic Properties and can be stored and retrieved using Local and Global Variables.
New
Changes
Fixes
2.5.14
This version breaks compatibility with previous versions and will only work with Game Creator 2.13.43 or higher.
Changes
Fixes
2.4.13
New
Fixes
2.4.12
Fixes
2.4.11
New
Changes
Fixes
2.3.10
New
Changes
2.2.9
New
Changes
Fixes
2.1.8
Fixes
2.1.7
Fixes
2.1.6
New
Fixes
2.1.5
Fixes
2.1.4
New
Enhances
Changes
Fixes
2.0.3
Enhances
2.0.2
New
Enhances
Fixes
2.0.1
New
• First release
5. Quests
5.1 Quests
Quests
Between main quests, side quests, bestiary and flora information gathering, lore, ... Managing the progress of
the game can quickly become a daunting task (no pun intended).
The Quests module aims to help automatizing the creation and management of quests using a simple set of rules.
These rules allow to easily create any type of quests while keeping it intuitive and easy to modify and
iterate over.
Moreover, the Quests module also comes with common user interface tools, such as a Minimap, visual Indicators
and a Navigation Compass system that automagically displays active Tasks and where the destination is.
Get Quests
Requirements
The Quests module is an extension of Game Creator 2 and won't work without it
5.2 Setup
Welcome to getting started with the Quests module. In this section you'll learn how to install this module and
get started with the examples which it comes with.
Before installing the Quests module, you'll need to either create a new Unity project or open an existing one.
Game Creator
It is important to note that Game Creator should be present before attempting to install any module.
If you haven't purchased the Quests module, head to the Asset Store product page and follow the steps to get a
copy of this module.
Once you have bought it, click on Window Package Manager to reveal a window with all your available assets.
Type in the little search field the name of this package and it will prompt you to download and install the
latest stable version. Follow the steps and wait till Unity finishes compiling your project.
5.2.3 Examples
We highly recommend checking the examples that come with the Quests module. To install them, click on the Game
Creator dropdown from the top toolbar and then the Install option.
The Installer window will appear and you'll be able to manage all examples and template assets you have in
your project.
Installer Quests
Dependencies
Clicking on the Examples install button will install all dependencies automatically.
Once you have the examples installed, click on the Select button or navigate to Plugins/GameCreator/Installs/
Quests.Examples/ .
Quests Examples
5.3 Quests
5.3.1 Quest
The Quest asset contains a collection of Tasks that are required to be completed in order to consider the
Quest fulfilled.
Splitting Quests
A naive approach is to consider a single Quest as the main quest, while having multiple Quest assets for each
side-quest of a game. However, because the main quest of a game might quickly become very big, it's advisable to
split it into multiple Quests and activate these when completing the previous ones.
At the end though, it's you who decides how to organize the Quests of your game.
To create a new Quest asset, right click on the Project Panel and select Create Game Creator Quests
Quest.
Overview
The top section includes general information about the Quest such as its Name or a Description (if any). It
also optionally allows to determine a Color and a Sprite image used in UI.
The Type field determines whether the Quest is a hidden quest, or a normal one.
Hidden Quests
Hidden quests can be hidden from UI elements and are useful for setting up missions that should not be displayed
to the user. For example, an achievement system.
The Sorting Order determines the priority of the Quest compared to the rest, when being displayed as a list on
UI elements. A Quest with a higher value will be displayed above other Quest assets.
If there are two Quest assets with the same ID value, an error message will appear above. To resolve it, click on
any of the fields and it will reveal a button that regenerates the current value with a unique one.
The second section of the Quest asset is the Tasks Hierarchy, which controls how the Quest runs. We cover this
section in detail on the Tasks page.
The last section contains a collection of Instructions that are executed when the Quest changes its state.
Quest Callbacks
For example, the On Complete instructions will be executed as soon as the Quest is successfully completed. This
can be used to give the Player some rewards, display a notification, etc...
States
A Quest starts in an Inactive state. In order to start a quest, the instruction Quest Activate can be used,
which will enable it in a particular Journal component.
Quest Activate
When activating a Quest, the first root Task is also activated. This process cascades to any other subtasks
the Task may have. Once the first Task is completed, its next sibling is Activated. This process is repeated
until all root Tasks are finished.
About Tasks
See the Tasks States for more information about running tasks.
An Active quest can then either transition to Inactive, or one of the following Finished states:
• Completed
• Abandoned
• Failed
A quest is automatically Completed if all of its root tasks are completed (in sequence, from top to bottom).
If a root task is Abandoned or Failed, the quest will also be automatically Abandoned or Failed respectively.
At any point, a quest can be deactivated using the Quest Deactivate instruction.
Quest Deactivate
5.3.2 Tasks
At the bottom section of the Quest asset there's the Tasks Hierarchy panel, which controls the logic behind
the Quest.
What is a Task
A Task is a node that can contain a series of Subtasks, which in turn may contain other Subtasks.
The two buttons at the left of the top toolbar allow creating a new Task: The left one creates a Task node as
a sibling of the current selected one, while the right one creates a child Task.
The right button toggles the Task Inspector tab, which allows to edit the currently selected Task details.
You can hold the left mouse button over a Task and drag it somewhere else to reorganize your Tasks
Task States
• Active: An active task is currently being executed and can transition to a finished state.
• Abandoned: The task has been abandoned, with similar effects to the failed state.
Tasks Transitions
A Task can't transition to and from any state. Instead, there's a set of rules that define those.
Finished States
If an Inactive task tries to change its state to Completed, the command will be ignored because only an Active
task can be completed.
Task Anatomy
To modify the properties of a Task, select it from the Tasks Hierarchy and reveal the Inspector on the right
side by clicking on the top-right button of its toolbar.
Task Details
SETTINGS
The Completion mode field determines how this Task is completed, if it has any subtasks.
More Information
The Is Hidden field determines whether this particular task should be considered as hidden. This is used to
skip displaying a particular task-line in the UI.
The Name and Description fields are also used by the user interface to communicate the information about this
particular task.
The next fields, Color and Sprite, are optional and can be used to customize the appearance of different
tasks.
For example, it may be desirable to display a different icon on the HUD depending on the task at hand. Some
investigation tasks might display a magnifier, while an assassination task could display a skull icon.
COUNTERS
The Use Counter allows to define a task as a countable one or not. The options available are None, Value and
Property.
No Counter
By default, a task is set to None by default. This means that the task must be completed using the Complete
Task instruction. However, tasks can also include a counter that automatically completes the quest when the
value and the counter become equal.
The most common example of a Counter task is when an NPC asks the player to kill a certain number of enemies. The
counter would be the amount of enemies to kill, while the value would be the enemies killed so far.
As soon as the value and the counter are the same, the task is automatically completed.
Value Counter
This option displays a single Count To field, which is the value to reach in order to complete this task.
Kill 5 boars
For example, if an NPC tasks the player to kill 5 boars, the Count To field would be 5. The starting value is
zero at the beginning, and can be changed using the Task Value instruction.
In this case, the instruction would increment in +1 the value of the task, automatically completing it after
defeating 5 boars.
Property Counter
The Property option is a bit more advanced, and allows to also count up to a certain amount in order to
automatically complete the task, but the value is synchronized with a dynamic property.
The Count To field, just like in the previous option, defines the desired value to reach.
The Value From field is a dynamic property that allows to choose the source from which the current value is
taken. For example, a Global Variable.
This option allows to seamlessly combine Quests with other Game Creator modules. For example, a quest giver may
ask to collect a certain amount of Potions, which is defined as an item in the Inventory module. The Value From,
in this case, would be the amount of Potions.
The Detect When event is used to determine when the synchronization should be executed. For example, if the
dynamic value comes from a Global Name Variable, the detection should be set to run when a global variable
changes.
Similarly, if we are using the amount of a particular Item of the Inventory module as the value of a counter
task, the detection should be set whenever the Bag component changes.
INSTRUCTIONS
A Task, just like a Quest, has a collection of Instructions that can be executed whenever a task changes its
state.
Running Subtasks
A Task that has one or more child Subtasks will be automatically Completed, Abandoned or Failed, depending on
the value of its Completion field.
SUBTASKS IN SEQUENCE
This type of Task activates the first Subtask as soon as it is activated, leaving any subsequent subtasks
inactive.
Subtasks in Sequence
When the Subtask is completed, the next sibling task is activated. This is repeated until all Subtasks are
completed, at which point the Task is automatically completed too.
If any Subtask is abandoned or failed, the Task is also abandoned or failed, respectively.
Use case
Running a series of tasks in order is the most common type. For example, a quest-giver asking to find its Magic
Sword and return it to them. In this case, finding the Magic Sword would be the first subtask, and completing it
would activate the second subtask: returning the item to the quest-giver.
SUBTASKS IN COMBINATION
Subtasks in Combination
These Subtasks can be completed in any order, and as soon as all of them are completed, the Task will also
become completed.
If any Subtask is abandoned or failed, the Task is also abandoned or failed, respectively.
Use case
This type is mostly used during investigation segments: The player arriving at a crime scene and having to
investigate multiple clues, in any order. For example, talking to a witness, investigating the footprints and
doing a preliminary autopsy on the victim. After all these subtasks have been completed, the task will be
completed too.
ANY SUBTASK
Any Subtask
As soon as any Subtask is completed, the Task will automatically be completed too and leave the rest of the
Subtasks as active.
Because it only requires a single Subtask to be completed in order to complete the Task, the Task won't be
abandoned or failed unless there are no other inactive Subtasks.
Use case
This type is used when making branching decisions where completing one subtask determines a different path than
completing another subtask. For example, killing a targeted enemy or sparing its life. Once a decision has been
made (aka a subtask has been completed), it locks the player from doing the other one.
MANUAL
This type of Task does not activate any Subtasks when activated.
Manual Subtask
If the other modes do not fit a particular quest flow, this one can be selected in order to customize each
step, as it doesn't automatize any changes.
Use case
There aren't any particular use cases. However, if you want to take full control over when a task is completed
(for example, despite its children subtasks not being completed), this might be useful.
5.3.3 Tracking
Tracking a Quest means the player will prominently see that particular quest highlighted among the rest.
HUD
For example, by default, the HUD will only display those Quests being tracked, so the player is not overwhelmed
having too many quests active at a time.
The Quests module allows to either limit the amount of quests tracked to a single one, or multiple ones. You
can customize this behavior by changing it in the dropdown menu field in the Journal component.
To start Tracking a quest, you can either use the Quest Track instruction, or let the UI components that the
Quests module comes with, handle it.
Working examples
The UI Journal template that the Quests module comes with, contains an example where a list of active quests are
displayed on the left side, and selecting one allows to toggle its tracking state.
To Untrack a quest, you can either toggle it from the UI elements or use the Quest Untrack instruction.
Alternatively, you can also stop tracking all quests by using the Quests Untrack All instruction.
Setup
Defining one is done by adding either the Task Point of Interest or the Custom Point of Interest.
• Task Point of Interest: Defines a point of interest linked to a specific Task. When the task is in an Active
state, the point of interest is enabled. Otherwise, it's disabled.
• Custom Point of Interest: Defines a point of interest not bound to any specific task or quest. Useful for
positioning objects that are not related to quests, such as enemies, collectibles, etc, ...
A Point of Interest is automatically displayed using one of the Points of Interest UI components.
The Quests module comes with a collection of game-ready systems that you can drag and drop onto your game and
they will automagically work.
For example, the Minimap prefab from the examples displays a rectangle on the bottom right corner of the
screen.
The Compass from the examples shows a minimalist line at the top of the screen with elements that fade in and
out as they are shown on-screen.
The Indicators prefab displays the icon of the Task directly on top of the screen space position of the scene
object.
Off-Screen Indicators
By default, the Indicators prefab displays off-screen elements at the closest edge of the screen, with an arrow
indicating its direction.
However, this can be disabled unticking the Keep in Bounds field from the Indicators UI component.
5.4 Journal
The Journal is a component that keeps track of the current state of Quests and its tasks.
Journal on Player
It is usually attached to the Player character object so it's easy to access. However, you can decide to attach
it to some other object or even have multiple characters, each with their own quests log.
5.4.1 Tracking
The Journal component determines whether it can track only one Quest at a time, or multiple quests. If the
value is set to Single Quest, attempting to track a quest will untrack any previous tracked one.
However, if the value is set to Multiple Quests, tracking another one will insert it to the list of tracked
quests, without untracking any others.
More information
To know more about tracking quests and how is it used, see the Tracking section.
5.4.2 Debugging
After entering play-mode, the Journal component changes its appearance and will display real-time information
about the current state of Quests and Tasks.
This allows to easily debug whether a Quest has been properly activated, which Tasks are completed, and so on.
You can click on the Quest and Task to toggle its expand state, in case there is a lot of visual noise due to the
amount of elements.
The Journal doesn't automatically store the quests and tasks states. In order to do so, simply add the
Remember component to where the Journal component is and add the Journal memory.
This will automatically handle saving the state of Tasks and Quests, and loading them back when a previously
saved game is loaded.
The Quests module symbiotically works with Game Creator and the rest of its modules using its visual scripting
tools.
• Instructions
• Conditions
• Events
Each scripting node allows other modules to use any Quests feature.
5.5.2 Conditions
Conditions
SUB CATEGORIES
• Quests
Quests
QUESTS
Sub Categories
• Groups
Conditions
• Is Quest Abandoned
• Is Quest Active
• Is Quest Completed
• Is Quest Failed
• Is Quest Inactive
• Is Task Abandoned
• Is Task Active
• Is Task Completed
• Is Task Failed
• Is Task Inactive
Description
Keywords
IS QUEST ABANDONED
Description
Keywords
Journal Mission
IS QUEST ACTIVE
Description
Keywords
Journal Mission
IS QUEST COMPLETED
Description
Keywords
Journal Mission
IS QUEST FAILED
Description
Keywords
Journal Mission
IS QUEST INACTIVE
Description
Keywords
Journal Mission
IS TASK ABANDONED
Description
Keywords
Journal Mission
IS TASK ACTIVE
Description
Keywords
Journal Mission
IS TASK COMPLETED
Description
Keywords
Journal Mission
IS TASK FAILED
Description
Keywords
Journal Mission
IS TASK INACTIVE
Description
Keywords
Journal Mission
GROUPS
Groups
Conditions
Description
Keywords
Description
Keywords
5.5.3 Events
Events
SUB CATEGORIES
• Quests
Quests
QUESTS
Events
• On Quest Abandon
• On Quest Activate
• On Quest Complete
• On Quest Deactivate
• On Quest Fail
• On Task Abandon
• On Task Activate
• On Task Complete
• On Task Deactivate
• On Task Fail
Description
Keywords
Description
Keywords
ON QUEST ABANDON
Description
Keywords
Journal Mission
ON QUEST ACTIVATE
Description
Keywords
Journal Mission
ON QUEST COMPLETE
Description
Keywords
Journal Mission
ON QUEST DEACTIVATE
Description
Keywords
Journal Mission
ON QUEST FAIL
Description
Keywords
Journal Mission
ON TASK ABANDON
Description
Keywords
Journal Mission
ON TASK ACTIVATE
Description
Keywords
Journal Mission
ON TASK COMPLETE
Description
Keywords
Journal Mission
ON TASK DEACTIVATE
Description
Keywords
Journal Mission
ON TASK FAIL
Description
Keywords
Journal Mission
Description
Executes after a specific Active Task from a Journal changes its value
Keywords
Journal Mission
5.5.4 Instructions
Instructions
SUB CATEGORIES
• Quests
Quests
QUESTS
Instructions
• Quest Activate
• Quest Deactivate
• Quest Track
• Quest Untrack
• Set Quest
• Task Abandon
• Task Complete
• Task Fail
• Task Value
QUEST ACTIVATE
Description
Parameters
Name Description
Journal The Journal component that changes the state of the Quest
Wait to Complete Whether to wait until the Quest finishes running its Instructions
Keywords
QUEST DEACTIVATE
Description
Changes the state of a Quest and its Tasks on a Journal component to Inactive
Parameters
Name Description
Journal The Journal component that changes the state of the Quest
Wait to Complete Whether to wait until the Quest finishes running its Instructions
Keywords
QUEST TRACK
Description
Parameters
Name Description
Keywords
Description
Parameters
Name Description
Keywords
QUEST UNTRACK
Description
Parameters
Name Description
Keywords
SET QUEST
Description
Parameters
Name Description
Keywords
TASK ABANDON
Description
Parameters
Name Description
Journal The Journal component that changes the state of the Task
Wait to Complete Whether to wait until the Task finishes running its Instructions
Keywords
TASK COMPLETE
Description
Parameters
Name Description
Journal The Journal component that changes the state of the Task
Wait to Complete Whether to wait until the Task finishes running its Instructions
Keywords
TASK FAIL
Description
Parameters
Name Description
Journal The Journal component that changes the state of the Task
Wait to Complete Whether to wait until the Task finishes running its Instructions
Keywords
TASK VALUE
Description
Parameters
Name Description
Journal The Journal component that changes the state of the Task
Keywords
The Quests module comes with a collection of components designed to streamline the creation of UI windows and
elements.
All examples that come with the module have been created with them and are flexible to accommodate any type of
window.
Quest List UI
This is one of the most important components and allows to display a list of Quests in a list fashion.
Quest List UI
The Journal field determines which component the quests are taken from.
• The Show dropdown allows to display only quests that are in a particular state. For example, display only
those that are complete and active.
• The Show Hidden toggle determines whether hidden quests should be displayed or not.
• The Hide Untracked determines if the quests that aren't tracked should be visible or not.
• The Filter dropdown allows to define whether to only display those quests that are present in a Global or
Local List Variable. This is useful to display achievements or non-standard quests.
The Content field defines the Rect Transform where each prefab instance will be instantiated, for every visible
quest.
Layout component
The Content value should contain an auto-layout component, such as Vertical Layout Group , Horizontal Layout Group or
Grid Layout Group .
The Prefab is the prefab instantiated inside the Content. It must contain a Quest UI component, which is
automatically configured by its parent.
Quest UI
This component is used in tandem with the Quest List UI to display a list of quests based on a set of rules
and filters.
Quest UI
The Title, Description, Color and Sprite fields are all optional and reference the indexed quest's homonymous
values.
The Style Graphics section contains a collection of color codes to change the graphics based on different
conditions, such as whether a quest is Active, Inactive, Completed, Tracked, etc...
The Active Elements section defines a set of optional game objects that are activated/deactivated according to
different conditions.
It is common to mark the currently tracked quest with an icon or a different color. You can do this by selecting
a game object that contains a bookmark image, and drag and drop this element onto the Active if Tracking field.
This will deactivate the bookmark if the quest is not being tracked, and activate it otherwise.
The Interactive elements allow to define different types of interactions performed by the player.
For example, the Button Track field instructs a button to toggle the tracking state of the quest when clicked.
The Select Quest field allows to define a selection element as a button to select this particular quest.
More information about selecting quests and tasks below at the Selection UI section.
The Show and Show Hidden fields work exactly like the ones from Quest List UI but instead of quests, it refers
to tasks.
The Tasks Content and the Task Prefab are two optional fields that allow to define a place where to list the
tasks of this quest based on the previous filters.
Task UI required
Just like the Quest List UI component requires a prefab with a Quest UI component to configure, the latter
requires a prefab with a Task UI component.
Task UI
This component is very similar to Quest UI but instead of working with quests, it does work with tasks.
Task UI
As seen in the upper screenshot, most fields are exactly the same, and only a handful differ.
Selection UI
Upon selecting a quest, any Quests UI component with the Selection keyword will be automatically updated.
• Selected Quest UI
• Selected Task UI
Both components have the exact same interface as Quest UI and Task UI respectively. But instead of targeting a
specific quest or task, they target the currently selected one, and automatically change upon receiving any
change or selecting a new one.
Points of Interest UI
The points of interest UI components are all related to the highlighting and location of specific Tasks and
scene objects around the scene.
For example, displaying a minimap where dots appear around a certain radius, or floating indicators as an
overlay over the camera.
MINIMAP UI
This component is used to display a rectangle and displays nearby points of interest within a certain radius.
Minimap UI
Each Prefab field must contain a Minimap Item UI component, which is configured by this component.
Changing Radius
The radius of the minimap can be changed at runtime, and can be increased when the player goes at a high speed,
or even as an unlockable skill that allows to view further away.
COMPASS UI
The Compass UI is a thin line that usually appears at the top of the screen, and displays the direction of
points of interest from the camera's point of view.
Compass UI
The Character field determines the origin of the compass, and the Camera field the forward direction to be
considered.
Each Prefab field must contain a Compass Item UI component, which is automatically configured by this
component.
INDICATORS UI
The Indicators UI component displays floating images on top of the interface that shows the exact position of
the point of interest.
Indicators UI
The Keep in Bounds field determines whether indicators should stay at the edge of the screen when the world
space instance is off-screen.
Each Prefab field must contain a Indicator Item UI component, which is automatically configured by this
component.
5.7 Releases
5.7.1 Releases
2.3.9 (Latest)
Enhances
Fixes
2.3.8
Fixes
2.3.7
This version breaks compatibility with previous versions and will only work with Game Creator 2.13.43 or higher.
Changes
Fixes
2.2.6
Fixes
2.2.5
Fixes
2.2.4
New
Changes
2.1.3
New
Changes
Fixes
2.0.2
New
Enhances
Fixes
2.0.1
New
• First release
6. Behavior
6.1 Behavior
Behavior
The Behavior module allows to easily create and manage all your game's intelligent agents using a wide variety
of industry-standard tools:
• State Machines
• Behavior Trees
• GOAP
• Utility AI
Choosing one or another is a matter of preference and what makes more sense. It's a the right tool for the job
kind-of situation where there's not one definitive answer.
This documentation goes over them in detail from the most basic to the most complex systems.
Get Behavior
Requirements
The Behavior module is an extension of Game Creator 2 and won't work without it
The Processor component is responsible for executing the logic of any of the aforementioned AI systems and can
be added to any game object in the scene, not just characters.
Processor component
This component has a Graph field which accepts a State Machine, Behavior Tree, Action Plan or Utility Board
graph asset.
The Loop option determines whether the graph should be ran once or start over when it finishes executing.
The Update option determines whether the graph is executed every frame, manually via a script or at a custom
interval, which can be specified using a dynamic property.
Whenever a graph is added it collects all the Blackboard parameters and displays them as fields, which can be
dragged and dropped or set via visual scripting.
If we create a parameter called my-target on a Blackboard and assign this graph onto a Processor component, it
will display like in the screenshot below so its value can be assigned.
Runtime Assignment
Parameters can be changed at runtime but a Processor's graph cannot be changed when in play-mode.
All AI systems included in the Behavior module use a similar graph window with some common elements.
Graph Tools
The top toolbar's left side contains a button that allows to focus on the currently selected element(s) on the
view as well as toggle the grid-mode. On the right side there's a collection of toggles that allow to show and
hide other sections of the window.
The bottom toolbar tracks which graphs have been opened so you can quickly go back to editing a parent graph.
Automatic display
The breadcrumb toolbar will automatically be displayed whenever you edit a sub-graph asset from a parent graph
asset.
The Blackboard
It's a collection of parameters with a name and a type that allow to interface between the agent running the
AI system and the graph itself.
Patrolling
Let's say we have an AI system that requires guards to patrol an area, each having their own route. We can create
a Blackboard entry called patrol-route and change its type to Game Object. By doing so, every guard that uses this
AI system will have a Patrol Route field that can be used to define its individual route.
To create a new entry simply type in the name and press Enter or click the + button.
By default a parameter doesn't have any type and thus won't appear in the Processor component. To change its
type click on the icon and select it from the dropdown.
After creating or editing a parameter of a Blackboard you'll need to refresh the Processors using this graph
so the parameters are re-sync.
Inspector
The Inspector panel allows to edit any nodes created inside the graph.
To edit a node simply select it and open the Inspector panel if it isn't already. Each node type will have its
own configuration options.
Inspector
6.1.3 Parameters
After assigning an AI system to a Processor component it will display all available parameters from the
Blackboard at the bottom of the component.
These values can be set by dragging and dropping values from the scene or the project panel or using Game
Creator's Visual Scripting.
Changing Parameters
For example, let's say there's a parameter called energy and we can to subtract 1 unit from it every second. We
can create a Trigger component with an Interval value of 1 second, and use the Subtract Numbers instruction.
We assume it's the Player who has the Processor component, so we use it as the targeted game object and as the
name of the parameter we use energy .
Each Property dropdown will have a Behavior/ section with the corresponding parameter value.
6.2 Setup
Welcome to getting started with the Behavior module. In this section you'll learn how to install this module
and get started with the examples which it comes with.
Before installing the Behavior module, you'll need to either create a new Unity project or open an existing
one.
Game Creator
It is important to note that Game Creator should be present before attempting to install any module.
If you haven't purchased the Behavior module, head to the Asset Store product page and follow the steps to get
a copy of this module.
Once you have bought it, click on Window Package Manager to reveal a window with all your available assets.
Type in the little search field the name of this package and it will prompt you to download and install the
latest stable version. Follow the steps and wait till Unity finishes compiling your project.
6.2.3 Examples
We highly recommend checking the examples that come with the Behavior module. To install them, click on the
Game Creator dropdown from the top toolbar and then the Install option.
The Installer window will appear and you'll be able to manage all examples and template assets you have in
your project.
The Behavior module comes with four different AI systems, and each one has its own demos. If you're new to AI,
we recommend starting in the following order, which is from the most basic to the most complex system.
• State Machine: A very simple example of a patrolling guard using a finite state machine.
• Behavior Tree: A behavior tree example of a patrolling guard playing hide and seek with the player
• GOAP: An example using goal-oriented action planning where characters work with each other to pick branches
and keep a fire.
• Utility AI: An example that uses a needs-based AI system where characters go in a dance club, dance, drink
and go home when they are tired.
Installer Behavior
Once you have the examples installed, click on the Select button or navigate to each one (for example Plugins/
GameCreator/Installs/Behavior.StateMachine/ ).
State Machines (also known as Finite State Machines or FSM) are the most basic form of AI.
As its name implies, an entity can be in just one state at a time and can only transition to another state
which is linked to the current one.
Simple FSM
For example, a very simple State Machine could define the behavior of a guard. We could define two states:
• Patrolling
The guard would start in the Patrolling state and only transition to the Attacking Player state if the player is
in sight.
• The Logic page details how a State Machine works and how it's executed.
6.3.2 Nodes
There are 4 different node types and they are created by right clicking anywhere on the graph, apart from the
Enter and Exit ones:
• The Enter node is unique and determines which State will be the first one when starting to run the graph.
• The Exit node is optional and allows the State Machine to finish running. Finishing running allows a State
Machine graph to be used as a subgraph of another AI tool so it has a beginning and an end.
State
The State nodes are the backbone of a State Machine and is where the magic happens.
The State contains a Name field that allows giving the node a name. This has no effect on the execution and is
just for information purposes.
The Conditions list determines whether this State can be transitioned to from another State with an edge
pointing at this. If the conditions are not successful this State won't be transitioned to.
• Every Cycle means that when this node is being executed, it will wait till its On Update instructions are
completed before checking whether it can transition to another node.
• Every Frame means that when this node is being executed, it will check every frame if it can transition to
another node.
It is tempting to check every frame whether the state should transition to another one. However, checking
Conditions comes with a (very small) performance overhead. We recommend using Every Cycle when possible, so
Conditions are called less frequently.
The On Enter instructions are called whenever this node starts being executed because of a transition.
The On Exit instructions are called whenever this node finishes executing and transitions to another node.
The On Update instructions are called every frame while the node is being executed, and will restart again
automatically if the node is still being executed after finishing running the instructions.
Canceling On Update
It is important to node that the On Update instructions can be interrupted at any moment because of a transition.
It's better to add the initialization instructions on the On Enter and the post-run instructions on the On Exit,
which are guaranteed to be executed from start to finish.
Conditions
Conditions serve as a gate to move from one state to another. If the conditions return false when attempting
to switch states, the transition won't happen.
Why Conditions?
You might be wondering why there's a Conditions node when a State already has a Conditions list that do exactly
the same thing.
This is because you might have multiple States that require the same Conditions and funnel them to a single
output State node. In order to not repeating the same Conditions list on all States you can relay them to a
single Conditions entry point.
Sub Graphs
Any Graph
It is important to node that a Sub Graph accepts any kind of graph, not just State Machine graphs. You can, for
example, execute a Behavior Tree as a State.
Elbows
Elbows don't do anything and just allow to improve the readability of graphs by creating corners.
Their shape is determined by the direction after dragging and dropping an edge from another node, but it can
also be changed again by selecting the Elbow node and changing the direction in the Inspector.
6.3.3 Logic
State Machines are one of the easiest AI tools to understand and work very intuitively.
There is a starting State node which connects to other State(s) in a specific order. This order can be seen
selecting a State node and sorting the transitions at the bottom of the Inspector panel.
When a State is running, depending on the Check field value (which can be Every Cycle or Every Frame) it will
check whether it can transition to another State.
The order in which it tries to change to another node is from top to bottom, and will move as soon as it finds
a new suitable State that successfully passes its Conditions list.
If not a single connected State successfully passes the Conditions, the transition won't happen and the
current State will remain as the running one.
Example
Here's an example of a State Machine with two states: One that makes a character patrol around and one that
tracks the player when it's in its line of sight.
Upon seeing the player, the current Patrol state transitions to the Track Player state. If the guard loses
sight of the player, it transitions back to Patrol.
Behavior Trees are tree-like structures that stem from a single root node and are evaluated from top-to-
bottom, and following a left-to-right priority order, having the right one the highest priority.
Although State Machines are better suited for simple AI systems, they can quickly become messy with lots of
connection edges and hard to maintain. Behavior Trees are slightly more complex but offer much more flexibility
and are easier to read at a glance when having lots of nodes.
• The Logic page details how a Behavior Tree works and how it's executed.
6.4.2 Nodes
There are 4 types of nodes in Behavior Trees plus a special node called Entry, which is a single node that
can't be deleted and marks the root of the execution.
Tasks
It also contains a Conditions list, which is executed every time the graph is evaluated. If their value is not