Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Welcome to the Game Kit Controller (GKC) Documentation.
GKC is the most complete First/Third Person Controller solution on the Unity Asset Store with unique Gravity and Sci-Fi features! GKC is a powerful engine that allows you to create most types of games very easily. It comes with a third/first-person controller with seamless camera view switching. This can cover almost any genre: shooter, adventure, action, puzzles, fixed camera horror/thriller, storytelling, fast or slow-paced type, 2.5d, top-down, point & click, isometric... The list goes on! Save thousands of hours in development and focus on making your game. Designed with a large amount of mechanics seen in AAA games in mind, to be highly customizable with the ability to enable anything you need and disable anything you don't, and to be easily extendable with your own code. It is the perfect foundation for your game and a great learning tool. Filled with ready-to-use mechanics and prefabs. GKC contains amazing features not found in other packages. There are tons of possibilities. Set up a player controller character or AI (NPC) in a couple of seconds. Highly customizable effects and options; camera states, configuration and transitions, powers, weapons, touch controls, head bob, custom input keys, footsteps, vehicles, and much more.
Want to buy the developer a coffee to keep him working, or give something a little more that will support the development of GKC and its developer further? Join the official Game Kit Controller Patreon!
The action system can be used with any type of humanoid animation. To work on this system, example animations from Mixamo were used as placeholders to configure multiple examples of the action system. Due to Mixamo animations can’t be included on asset, you can find the animations used on these examples on the public repository of Game Kit Controller on Github.
https://github.com/sr3888/GKC-Public-Repository
These animations are already with the regular settings applied to work on root motion properly (like rotation based on current pose, loop time, adjust speed, etc…). No extra setting is needed to try these examples.
All those animations and copyrights belong to Mixamo. You can get those animations and more at the official website of Mixamo: https://www.mixamo.com/#/
Of course, on this action system, you can use your own animations, from the asset store or any other store or web.
There are a couple of systems in the asset that uses a slice system for 3d meshes and skinned mesh renders, for the melee weapon system, allowing to cut surfaces and characters, similar to games like metal gear rising. Those systems can be found in the public repository of GKC, which is the same limb from a few lines above.
You only need to import those 2 packages and open the script file called sliceSystemUtils.cs and uncomment all the commented lines on that script, in order to use the slice system. This is not mandatory to be done if you won’t use the slice system in any part of your project.
Currently Game Kit Controller requires a minimum version of Unity 2017.1.0f3. You should not use an older version than this because Unity is not backwards compatible with older versions of Unity.
GKC will soon require a minimum Unity version of Unity 2019.4 LTS in a future update, keep an eye on the Discord or Changelog for more information on when this change will happen.
Game Kit Controller generally works with all newer LTS versions too (i.e. 2020 LTS), and they are officially supported. Support for pre-release versions of Unity will be limited due to their unstable nature.
When the minimum version of Unity changes to 2019.4 LTS GKC will no longer support older Unity versions like 2018 or 2017.
If you need to continue using an older version of Unity you will unfortunately have to use an older version of GKC with support for your Unity version.
If you're more of a visual learner or just looking for videos tutorials for Game Kit Controller check out our tutorials section which has lots of videos showing you different mechanics and how to get started with Game Kit Controller.
The documentation is organised in a user friendly way. It is always advised you read first the Overview (i.e. the top most page of a section) page for each section, if it exists. Then you can decide to follow the guide from top to bottom or jump to between sections.
Throughout the documentation you'll come across hints, below we've provided a description of what each hint means and it's importance:
The Blue hint provides extra information on the current topic.
The Green hint is used for best practices, recommended actions and success notices.
The Orange hint is a warning message and will inform of something which can lead to errors or confusion.
The Red hint is a critical message and will often be used for important or error hints.
We are continually updating the Game Kit Controller documentation in an effort to ensure it's always remains current with the latest version of GKC. If you come across something that seems wrong, outdated or unclear please let us know on the Discord server and we'll be sure to get it improved as soon as possible.
Game Kit Controller video learning resources.
Apart from the Getting Started section of the documentation, we also offer a wide variety of tutorials that address all the different features and game play mechanics in GKC.
Do you know of a video tutorial that's not included? Let us know and we'll check it out for including here!
We have a an ever growing GKC Tutorial Playlist over on YouTube that covers many aspects of Game Kit Controller and what you can do with it.
While you're there why not also check out the GKC Preview Playlist which contains loads of feature and game play mechanics previews.
Looking for inspiration and examples of what others are making with Game Kit Controller?
Adding Input Axes manually
If you import the asset into a project without the Project Settings, you have to add these axes
(inside the yellow color) into the Input Manager of Unity if you are going to use a gamepad, in Edit->Preferences->Input. These axes are used for the gamepad, but it needs to be configured if the settings of the asset are not imported (This step won’t be necessary in the next update).
These are the input added for 4 players using the gamepad, but you can add just one if you are not going to use the local multiplayer.
The values to configure are the following:
Right now, the input for 4 players has been configured, to be able to use the local multiplayer system. The settings are the same as above but configuring Joystick 2, 3, etc… and you can add as many gamepads as you need (though the limit is 16 players if I remember properly).
There is also a manual mode to create a new character. This mode is used when the automatic system hasn’t assigned the bones as the character needs (due to a special skeleton hierarchy). For this, follow these steps:
Drag and drop a player’s prefab in the scene.
Drag and drop the new model you want to assign to the player.
Open Build Player inspector, set to true the field Assign Bones Manually, and assign the new model in the field New Character Model:
Press the button Search Bones On New Character and the bones needed will be assigned in the inspector automatically:
Then, assign the bones (in case that weren't assigned correctly with the automatic mode) and press the button Build Character, so the old player’s model is replaced by the new one, and all the fields needed are assigned.
The same can be done with the ragdoll (by default the ragdoll is created with the above process), so bones can be assigned manually to add the ragdoll parts on them properly in case the system didn’t create it correctly.
Go to the Ragdoll Builder inspector and set to true Assign Bones Manually.
Make sure the animator of the player is assigned in the field Animator.
Press the button Search Bones On New Character and the bones will be assigned automatically, like in the build player:
Assign the bones that weren’t assigned properly and press the button Build Ragdoll. The ragdoll will be added like this:
If the player spine doesn’t rotate correctly when you move the mouse up and down in aim mode in third person, the cause is due to the spine orientation in the model.
For example, in this model, the local Y axis of this model spine, is the Y axis, which can be different in every model.
To fix this, go to the Upper Body Rotation System inspector in the gameObject Player Controller and configure the correct values in the field Spine Up Vector. It needs to be the same up transform orientation of the transform assigned in the field Spine Transform (mixamorig: Spine in this example). In this case, the value is (0,1,0) instead of (0,0,1) which is the default value.
In the default model of GKC, its spine orientation is Z for the local Y axis.
And the value used for this is (0,0,1).
The player’s upper body rotation can be configured for aim mode in Third Person. This is made in the inspector Upper Body Rotation System in the Player Controller gameObject, allowing to configure how fast the rotations are done and the clamp values used for the spine rotation. The object to follow is the actual transform followed for the player’s torso, which is inside the main camera, so you can move it up or down to adjust the orientation when the player aims.
In this case, you configure a new model, and something like this happens:
The cause is that the spine bones are not correctly configured in the Upper Body Rotation System, in the gameObject Player Controller, due to the skeleton hierarchy is slightly different in this case. In the example above, the system has taken the hips as the first bone, this is incorrect.
But you only need to set the correct bones. To do this go to the inspector and make sure to place the bones which belong to the spine and the chest, like this:
But if this happens, you need to take another step, which is to move the Player Elements gameObject from its current hierarchy position to inside the Chest transform configured in the inspector, in this case, the Spine2.
Like this, the player's weapon should move correctly, rotating the player’s upper body and without any issue.
To manage the player’s weapons, go to Player Controller gameObject, and to the inspector Player Weapons Manager.
It's really easy to setup Game Kit Controller in your project! Follow the steps below to import the package and get started!
If you are importing GKC into a new project then all you need to do is import the package and leave everything checked. That's it, you can skip the rest of this page, you're good to start making the game of your dreams!You can move onto the next section using the button below.
If you are importing GKC into an existing project then you'll need to uncheck the option to import the project settings and then continue onto Step #2.
When importing GKC into an existing project, or if you imported GKC without the project settings then you'll need to add the axes below into the Unity Input Manager (Edit > Project Settings > Input Manager) if you want to support using a gamepad.
These are the key mappings for four players when using local multiplayer (i.e. same screen multiplayer), but you can add just one if you are not going to use the local multiplayer functionality in your game.
Don't overwrite or remove the default axes set by Unity when adding the above axes - because these are also used and will be needed by GKC.
The key mapping values for each input above are identical for each the variant (i.e. player/input), only the variant names and the joystick number are different. For example Horizontal X1 has the same values as Horizontal X2, X3 and X4 with only the input "Name" and "Joy Num" being different. On Horizontal X1 the Joy Num is Joystick 1, whereas on Horizontal X2 the Joy Num is Joystick 2 etc. For the full breakdown of input values, you can check out the "Full Breakdown" tab of each section below.
After finishing adding the above key mappings then you will have the input for four players configured. This will allow up to four players to use the local multiplayer system.
When importing GKC into an existing project, or if you imported GKC without the project settings then you'll need to add the tags and layers used by this asset.
You can add the below tags and layers by going into the Unity Tags and Layers settings (Edit > Project Settings > Tags and Layers).
How to set up a new Humanoid Character
To set your model, follow these steps:
In the tools bar press Game Kit Controller and Create New Character.
In that window select a humanoid model and press the Create Player button. If you are in the Scene window, set the camera in the position where you want to place the player once is created.
The new player will be placed in the scene, in the position where the editor camera is looking.
This process creates the ragdoll of the new player automatically. Here you can see how it looks.
IMPORTANT: the position and rotation of this object, Player 1 and Character and HUD elements must be (0,0,0) for both fields, if you drop the player prefab in the scene, that will be the values by default.
• This ragdoll can be configured or removed. For this go to Ragdoll Builder inspector, in the GameObject called “Character” and press the button Remove Ragdoll. You can also configure its scale and mass in the option Bone Settings.
Then you will see the messages in the console about the weapons.
These messages is to tell the user to configure the correct weapon parent, which is the place where every weapon is parented while is not being used, like the back, the leg, etc… By default, the weapon is placed in the back. To configure a better parent check the next steps.
In this document, you can easily find out where exactly in GKC you’ll find a particular feature. Each feature is described with different keywords but we encourage keeping the words you use to search a feature to a minimum.
Each feature will have its full path written out, but please remember the following formatting as it will help you understand where exactly inside GKC you can find it:
Path GameObject Component [Button] {Section Title} Feature
The first Tip is shown in full so you can understand where to go, the rest are more direct.
Displays a small white dot in the middle of the screen at all times.
LOCATION
Player And Game Management - Player 1 - Character - Player Camera - Player Camera - [Settings] - {Use Camera Reticle Settings} - Update Reticle Active State
GameObject (on which the feature is stored):
Component (in which you’ll find the feature):
[Button] (if the feature only becomes visible after pressing a button):
{Section Title} (is useful sometimes for navigation inside crowded gameObject Components):
Feature (the actual feature):
While it is possible to simply hide the camera reticle in the following menu.
LOCATION
Player And Game Management - Player 1 - HUD Elements - HUD and Menus - HUD - Player Info - Health, Energy, Weapons - Main Camera Reticle
It is NOT actually recommended to deactivate the reticle in this manner.
This will only deactivate the reticle at the beginning of the runtime, however, there are several features that might bring back the reticle when used.
For example, after using an access panel. Therefore, do not deactivate the reticle UI component, but its feature instead.
Defines the index number of the scene that is loaded when clicking Exit to Home on the pause menu.
LOCATION
Player And Game Management - Player 1 - Character - Menu Pause - Scene Number for Home Menu
When pressing Z, a slow-motion mode is entered until you press Z again.
LOCATION
Player And Game Management - Player 1 - Character - Time Bullet - Time Bullet By Input Enabled
Defines which layers GKC will recognize as walkable ground.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - {Ground Detection Settings} - Layer
If your character is still walking on water, make sure you set the most parent gameObject of your water to a layer that you excluded here. If prompted, you might have to apply the layer to all children as well.
Sometimes when doing changes to the water, you might have to repeat this step. This behavior has been observed with Gaia for example.
Speeds the walking up over time.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - {Walk/Run/Sprint Settings} - Increase Walk Speed Enabled
Adds an extra camera shake to the player when running.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - {Sprint Settings} - Shake Camera On Sprint Third Person
Used in order to hide objects that are not supposed to be visible in first person mode.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - [Advanced] - {Character Mesh Settings} - [Show/Hide EXTRACHARACTERMESHGAMEOBJECT]
Add as many slots to the list as needed and drag the game objects in here that you don’t want to see in the first person (for example eyelashes, hair, pants, shirt, shoes, etc)
Allows the player to do double jumps by pressing the spacebar repeatedly.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - [Advanced] - {Jump Settings} - Enabled Double Jump
Defines how long you can fall before taking damage when hitting the ground.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - [Advanced] - {Fall Damage Settings}
Play a sound when the player receives fall damage (for example “ouch”).
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - [Advanced] - {Fall Damage Settings} - {Event On Fall Damage}
Add a new event and drag your gameObject with the attached audio component in here. If you have multiple different audio files that you’d like to be played randomly when taking damage, you can use the script below and call it RandomInjury, attach it to a gameObject, and add your different audio clips to the list.
Then, drag the gameObject into the Event On Fall Damage list and set it to Randominjury.Injurysound
Displays a blue circle underneath the player when jumping.
LOCATION
Player And Game Management - Player 1 - Character - Player Controller - Player Controller - [Advanced] - {Land Mark Settings} - Use Land Mark
Creates visible footprints on the ground that fades away slowly.
Change the number of items that can be carried in the inventory.
You can also change the number of inventory slots here using Inventory Slots Amount.
Displays a spinning preview of an item when picking it up and before adding it to the inventory.
Configuration for the items available in the inventory and on the player at the start of the game.
Use this list to add or remove items to your inventory list that will be available at runtime.
Additionally, you can choose whether or not items are equipped.
If you want to create new items that could be added to your inventory or picked up in the game, use the Main Inventory Manager outside the Player And Game Management instead.
Then, you can use the Initial Inventory List if you want the items to be available in the inventory at the start of the game.
If you just started with GKC and want to remove all the weapons after creating the player, remove or disable them here, don’t disable them in the player hierarchy.
Used in order to switch between melee, combat, weapon, powers, etc.
Don’t delete players mode, instead just open each player mode individually and untick Mode Enabled.
There, you also have an option to Activate Player Mode Events and Deactivate Player Mode Events.
You can use this section to unlock additional features, for example, you can use icons instead of text to indicate the current player mode on screen.
To do the above, just add UI components to your HUD, for example under Player And Game Management - Player 1 - HUD Elements - HUD and Menus - HUD - Player Info - Player Mode and disable the Text and the Current Player Mode Text.
Then, use Activate Player Mode Events and Deactivate Player Mode Events in the Player Modes settings to activate and deactivate them.
Displays a number of squares at the bottom of the screen with weapons inside.
You can use the number key on the keyboard in order to switch between different weapons easily without having to equip/unequip them in the inventory.
If you disable this, you might also want to disable Show Quick Access Slot Selected Icon, otherwise, a white line will appear on the screen when switching to a weapon.
Allows a player to jump out of the water.
Applies a blue blur to the camera when the player is underwater.
You might want to disable this feature if you have an underwater effect generated by a third-party application such as Gaia, etc.
Displays a red cross or x on screen when receiving damage.
Displays the amount of damage you've received in the form of a floating number that displays around the player.
If you play your game and GKC is not reacting to your keyboard inputs, check if any external input devices are connected to the PC (for example a controller, a tablet, etc.). If you unplug it and restart the game and it now the controls work, you can follow this step.
Some features cannot simply be disabled, instead, you have to disable the keys that trigger these features. Some of the items in the list below might have an option to be disabled, but as of my current knowledge, they can only be deactivated by disabling the input key
To disable the following keys navigate to:
/-Key (forward slash): Player Controller - Show/Hide Axes - Simple Kick
[-Key (left bracket): Player Controller - Show/Hide Axes - Activate Ragdoll in Runtime
CTRL-Key (left control): Player Camera - Show/Hide Axes - Move Away Camera
#-Key (quote, hash): Player Camera - Show/Hide Axes - Enable-Disable Camera Rotation
Shift-Key (right shift): Player Weapons - Show/Hide Axes - Edit Weapon Attachments
Alt-Key (left alt): Player Weapons - Show/Hide Axes - Weapon Melee Attack
Tip: To find out which feature is assigned to which key, you can go to.
Now you can see the full available list of keys and their respective features. In order to search for a specific key, use the dropdown “Action Key To Filter” and press the button: [Show Input Actions Keys By Filter].
Defines the name of the current level, for example in save files.
By default, your player faces North when going into play mode (North is in the direction of the blue Z editor axis) with the camera also facing North.
If you want your player AND camera to face a different direction, use Set Initial Position. Don’t rotate the Player Controller gameObject, because it will only rotate your player but not your camera.
Disable the UI panel in the bottom left corner stating things like fire/draw weapon, wheel menu, draw/holster weapon, attachments, etc.
Disable head bob or change the strength of individual head bobs based on camera state.
Press [Show/Hide BOBSTATELIST] to change the intensity of the head bob per camera state.
Below is a list of the original settings (left) versus a bit less intense ones (right)
Displays a band with a compass at the top of the screen.
You could also disable the compass under Player And Game Management - Player 1 - HUD Elements - HUD and Menus - HUD - Map - Compass Window however, this would only hide the UI component at runtime. If you want to completely disable UI components and never use them, it’s always better to disable their feature on their respective gameObject inside the Character hierarchy, rather than in the HUD Elements hierarchy.
Displays a weapon info panel (HUD) in the top right corner with the current ammo amount and a weapon thumbnail.
Repeat this on every weapon used in your game
Displays a HUD right on the weapon with the current ammo amount.
Note: Repeat this on every weapon used in your game
Defines how much damage a weapon projectile generates on the enemy.
Another feature in this section is called Projectiles Per Shot. You might want to change this in parallel to the Projectile Damage, as the two factors will be multiplied.
Some weapons (for example Assault Rifle) display a visible light beam.
Note: Disable the gameObjects in here as needed
Allows the player to jump off a ledge.
Alternatively, you can also simply lower the Jump Force When Hold Ledge in here if you just want to reduce the jump height
Allows a player to walk and run on vertical surfaces.
Displays a Dpad UI component on the screen.
This will only disable the UI of the abilities Dpad, not the accessibility of the actual features. You can still use the arrow keys on your keyboard to make use of the abilities themselves. To switch the abilities off completely, disable Ability List Manager Enabled in the same gameObject component.
Whilst you could simply disable the Dpad UI element under Player And Game Management - Player 1 - HUD Elements - HUD and Menus - HUD - Player Info - Health, Energy, Weapons, and More, I recommend disabling its feature instead (as described above).
Allows the player to go undetected by enemy AI.
Displays an objective log. U-Key.
Displays a travel station UI menu.
Displays an experience system UI.
Rotates the camera by a set amount of degrees (180 by default).
Activates the scanner system.
How to manually add the Tags and Layers needed for Game Kit Controller
In case you import the asset to a project without the Project Settings, you need to add the Tags and Layers used in this asset. To do this automatically, you need to go to the demo scene in the asset, or drag and drop the prefab Player And Game Management. Then, go to the inspector of that gameObject and go to Tag Layer System inspector.
Open the Tag Menu and press the button Add Current Tag List.
Do the same with the layers, pressing Layer Menu and the Add Current Layer List. After that, all the tags and layers used in the asset are assigned correctly to every object and prefab of the asset.
The layers gravityObjects, Armor Surface, Point&Click, Dynamic Split Screen, and Transparent Mesh are optional layers that can be removed if you don't use the optional systems associated with them.
How to create a Generic Character in Game Kit Controller
Search for AI Main Template Prefab and drag it into your scene. Next, go to Game Kit Controller Menu / Generic Models / Add new generic model to controller.
Fill in the name of your new AI and drag its generic model to your scene, then drag it from there to the generic model slot in the wizard.
Select the generic character's avatar, then search your project for Generic Model Animator Template duplicate and rename it, and put it in whatever folder you want.
Drag it into the animator slot to assign it and check the Character Is AI box. Then click Create.
Now go to your AI Player Controller gameObject and expand Other AI Systems. Click on Custom Character Controller Manager.
Check the box Start Game with Custom Character Type in the name that you used in the wizard for your character Scroll to the bottom and click "Enable Current Generic Model"
Now search for the animator controller you duplicated and double click on it to open it. Double click on Locomotion then double click on Grounded and then double click Locomotion again. Select Locomotion Tree and drag your animations to the slots on the right side.
How to Create a New Melee Weapon for your character with the Wizard.
Drop the weapon mesh on the scene and make sure to remove any collider on it and also check that the static field is false on the object.
Create a new transform inside the weapon and move it out of it, reset the rotation of the object and place the mesh inside, so you can center the weapon mesh on the center of the new parent.
Remember to set the setting global on the unity top bar setting for the step, so you can see the actual pivot position of the objects.
Open the menu to create a new melee weapon on Game Kit Controller bar settings on the top side of the Unity, and drop the new object there.
Enable the option to create inventory info, set a unique name for the weapon, set a new image and press Create Object button.
Select the weapon type that is closer to the type of weapon that you want to use like a sword, axe, bow, etc.… so it will have similar settings to it.
Enable the option to create inventory info, set a unique name for that weapon, set a new image and press Create Object button.
Once created, you can search it on the search tool of the project window, and drop the physical object in the scene, to adjust some elements on it.
You can adjust the box collider of the weapon object along with adjusting the weapon mesh, so its handle is centered on the pivot of the weapon, to be carried properly.
With that, the weapon is ready to use, in this example, the weapon is placed in the mount point of the hand, so in most cases, it won’t need many adjustments.
But each weapon can be adjusted to each character, for this, go to the melee weapon system and use the melee weapon adjust tool.
First, enable the edit weapon to transform values in-game and the show gizmo option then uses the gizmo to adjust rotation/position in place and press the Copy Transform Values button.
Once that is done, stop the game and press the Paste Transform values button. Now, play the scene and try, the weapon should adjust as you configured now.
Same as carrying on hand, the sheathed weapon position/rotation can be adjusted. Sheath the weapon (Using the Y key by default) and follow the same steps as before.
The process is the same, adjusting the gizmo of the weapon on the character so it is carried there when is not in the player's hands, so adjust, copy, stop the game, and paste.
And all done after that, the weapon is also stored in the player’s inventory.
You can also search the weapon inventory object instead, using the search tool on the project window.
Just like before, you can adjust the collider of the inventory object, to adjust it to the size of the weapon and apply the settings to the prefab (remember to apply the settings in the previous one too).
This step will no longer be necessary in the future and adding the key mappings will be handled by an in-editor setup wizard
This step will no longer be necessary in the future, adding the tags and layers will be handled by an in-editor setup wizard
That's it! You've completed importing GKC into your project and you can now start making the game of your dreams using Game Kit Controller!
Field
Horizontal X1
Horizontal X2
Horizontal X3
Horizontal X4
Name
Horizontal X1
Horizontal X2
Horizontal X3
Horizontal X4
Gravity
0
0
0
0
Dead
0.19
0.19
0.19
0.19
Sensitivity
1
1
1
1
Invert
-
-
-
-
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
X axis
X axis
X axis
X axis
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
Mouse X1
Mouse X2
Mouse X3
Mouse X4
Name
Mouse X1
Mouse X2
Mouse X3
Mouse X4
Gravity
0
0
0
0
Dead
0.19
0.19
0.19
0.19
Sensitivity
1
1
1
1
Invert
-
-
-
-
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
4th axis (Joysticks)
4th axis (Joysticks)
4th axis (Joysticks)
4th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
Left Trigger 1
Left Trigger 2
Left Trigger 3
Left Trigger 4
Name
Left Trigger 1
Left Trigger 2
Left Trigger 3
Left Trigger 4
Gravity
1000
1000
1000
1000
Dead
0.001
0.001
0.001
0.001
Sensitivity
100
100
100
100
Invert
-
-
-
-
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
9th axis (Joysticks)
9th axis (Joysticks)
9th axis (Joysticks)
9th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
Right Trigger 1
Right Trigger 2
Right Trigger 3
Right Trigger 4
Name
Right Trigger 1
Right Trigger 2
Right Trigger 3
Right Trigger 4
Gravity
1000
1000
1000
1000
Dead
0.001
0.001
0.001
0.001
Sensitivity
100
100
100
100
Invert
-
-
-
-
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
10th axis (Joysticks)
10th axis (Joysticks)
10th axis (Joysticks)
10th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
DPad X1
DPad X2
DPad X3
DPad X4
Name
DPad X1
DPad X2
DPad X3
DPad X4
Gravity
0
0
0
0
Dead
0.2
0.2
0.2
0.2
Sensitivity
1
1
1
1
Invert
-
-
-
-
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
6th axis (Joysticks)
6th axis (Joysticks)
6th axis (Joysticks)
6th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
Mouse Left Click
Name
Mouse Left Click
Positive Button
mouse 0
Gravity
1000
Dead
0.001
Sensitivity
1000
Invert
-
Type
Key or Mouse Button
Axis
X axis
Joy Num
Get Motion from all Joysticks
Tag No
Tag Value
Tag 0
box
Tag 1
sphere
Tag 2
moving
Tag 3
enemy
Tag 4
friend
Tag 5
device
Tag 6
inventory
Tag 7
vehicle
Layer No
Layer Value
#1
gravityObjects
#2
Armor Surface
#3
turrets
#4
player
#5
radar
#6
Scanner
#7
vehicle
#8
inventory
#9
npc
#10
weapons
#11
device
#12
Terrain
#13
Point&Click
#14
Dynamic Split Screen
#15
Transparent Mesh
How to adjust weapons for the the Quick Draw Weapon Action
In the third-person view, there is an option on weapons that allows making a quick draw of the weapon placing it directly on the dominant player’s hand. There is also an option to carry a weapon on the player’s dominant hand when he is not aiming, without IK.
For both options, it is necessary to adjust the position of the weapon on the player’s dominant hand, since every model has a different bone orientation, this needs to be done manually if you use any of the above options (there are a few weapons using these options by default, like the shotgun, laser miner, double shotgun, homing missiles, spear launcher, and laser shooter).
This is a very quick and easy step, with the next steps:
Select the weapon that you want to adjust in the hierarchy, open the IK Weapon System inspector and press the button Show Element Settings:
Press the button Show Third Person Settings and Show Single Weapon Settings. ● The option to use the quick draw weapon is in Quick Draw Settings:
And the option to carry a weapon on the player’s dominant hand while not aiming is in
This is also where the hand position is adjusted to place the weapon on it while not aiming it
To adjust the position, press play, draw the weapon which you are adjusting, aim the weapon and then stop aiming. You may see that the weapon is placed in an incorrect position and rotation when the player draws the weapon. Don’t worry, this is why these steps are being done:
Without keeping the weapon, press the button Copy Weapon Position In Hand
Stop the game and press the button Paste Weapon Position In Hand
And that is it, the weapon now will be placed properly on player’s hand when the quick draw action is enabled on that weapon, looking like this when the player draws that weapon with the position adjusted:
The quick draw can be also used without deactivating the IK system on player’s arms, like for example, the double shotgun, which by default is configured like that:
This weapon has the option to make a quick draw enabled and deactivate IK option disabled, so the weapon is first placed in the player’s dominant hand and then moved to a walk position, like in the capture above.
For this, set to false the field Deactivate IK If Not Aiming, located in the same part that is has been used for this explanation:
This system allows to configure additional characters in the game, setting them as AI which follows the player and can receive orders, like any regular friend AI would do, but in this case, the player can switch the control of these characters, setting the previous controller as AI and ther previous AI as the new controller used by the player. Any number of characters can be configured from 1 to any amount, so this can be used to make games similar to resident evil revelations 2, combining the gameplay with characters with different abilities who need to work together to keep moving in the game.
To configure this, it is the same steps as in the local multiplayer, so check that part of the doc to add 1 or any extra amount of characters.
Once you have done that, in the same player characters manager component, set the field Set Current Character To Control And AI At Start as true and in the field Current Character To Control Name, write the name of the character which will be used as the default player, setting the rest as
AI.
Once the game starts, you can switch between characters. By default, the key to change between characters is . (you can customize these actions keys in the input manager at any moment).
This system allows to connect different Scenes between each other ingame, so the player can change from one Scene to another using some element of the level, like a button to press, a
trigger to enter, an event, like pick an object, using a fast travel station, etc…
Think about this system like in borderlands games, where the player reaches the limit of the level, with some kind of gate where he press the interaction button, and he moves to another new level, being a different zone. And of course, the player can return to the previous one, using the gate where he appears in the zone.
To configure this Scene manager, go to the upper tool bar of unity, select Game Kit
Controller->Main Managers->Add Main Level Manager Ingame.
In this menu, you can place the different types of gates to change of Scene, according to what you need. The current types are by Button, so the player can use the interaction button when he is on the range of the gate to trigger the change of level.
By event, this can be triggered by any object with an event attached, for example, picking ammo from the ground or a weapon or an inventory object can activate the change of Scene.
By trigger, so basically, when the player enters inside a trigger, it will change of Scene automatically.
And also, a travel station, a physical trave station which can be placed anywhere on the level and will allow the player to select a Scene to travel (these scenes can be unlocked once the player reaches the travel station of each Scene or by default, have unlocked all the Scene available to travel, according to your type of game).
Once you place one of these changes of Scene objects (from now, we will call this object CSO) , you have to go to the component Level Manager ingame. This component is used to configure the current ID of this CSO (Level Manager ID) and the Scene number to travel (Scene Number To Load), and inside of that Scene, the ID of the CSO to use as a place to appear (Level Manager ID to Load).
It is like an address, and you can have one or many CSO in each Scene, so each one has its own direction.
You can see an example of this in the Scenes Level Manager Building Scene 1 and 2, where in the first door in the exterior of the building, there is one of these CSO, configured with its ID and the scene and ID to use in that scene, which belongs to the object in the second scene, which has that CSO inside the building, with the ID of destiny.
It is very simple but can be confusing for the first time, so take a look at the exterior and interior of this door.
In the exterior, the Scene Number To Load is the scene which contains the interior of the building. The Level Manager Id is 0, since this is the first CSO of this Scene and Level Manager ID to Load is 0 as well since that other object is the first CSO of the second scene, which has the interior of the building.
In this case, the exterior zone is the Scene number 46 and the interior of the building is the Scene number 47.
In the Scene number 47, you can see the settings of the other component, which is in this case, is going to travel to the Scene 46. Its Level Manager is 0, which is the address configured in the other scene and its Level Manager ID to Load is 0 too, since this will travel to the above CSO.
In the component Level Manager Ingame you can see the field Spawn Player Position Transform which is the reference position and rotation used to place the player on the level once he changes of Scene, so each CSO can be considered as “connected” to other CSO configured in another Scene.
You can see the same example in the second door of this demo example, but in this case, the ID is 1 instead of 0 since this is the second CSO on the level, so the interior points to the exterior object and vice versa.
The travel station work in the same way. Once you have all you Scenes on your game, you can configure the component Travel Station System, with the list of Scenes info, each one with the Scene number to travel and the CSO ID to go. For example, if a Scene has three gates, you select one of them as the default position of that zone to appear when the player travels to that Scene (this also works the same in borderlands, having a fixed zone to appear in one zone, even if that zone has many gates).
In this case, you can see how the station has 2 elements, one per scene, pointing to the first door of the Scene, with the ID 0, so if the player travels to the Scene 1 it will appear in the exterior, at the side of the door and it he travels to the Scene 2, it will appear inside the building, at the side of the door too.
Here you can see also in the Build Settings, how the Scene numbers are 46 and 47 for this couple of examples, being each one the exterior and the interior zones of this place.
In order to try the default demo scenes for the scene manager, you can configure the build settings to set the scene index like in the image below, with the same index for each scene:
Using for this the scenes located on this folder:
Once that is configured, open the first scene and play there with entering into the house and returning outside and walking also outside of the perimeter through the big red door behind the player.
In update 2.9, local multiplayer has been added, with the split-screen system as the current way to configure the cameras. This local multiplayer is in the beta state on 2.9 and will be complete in 3.0. But all the systems work properly without issues or errors, just need some extra additions and checks, like allowing to configure the player's in-game.
For now, the players can only be configured in editor time. For this, follow these steps:
Go to the gameObject called Player and Menu Management and to the inspector Player Characters Manager.
There, in the field Current Number Of Players, configure the number of players to use (for now using only from 1 to 4).
In this example, let's just use 2. After that, in Camera State To Use, select the screen camera configuration for the split-screen. For 2 players, there are different options like full screen with left and right side with every player, vertical, with a player on top and the other on the bottom, etc…
You can configure new camera distributions on the Camera States List, which configures the amount of main cameras (one per player) and the X, Y, W, and H values of every camera on the screen, setting these values for new players added:
After that, press these buttons in the next order: Configure Players, Set Camera configuration, Set Players ID, and Assign Map System On Map Creator. This will add the new players configured in the amount above, configure the split-screen cameras, set the player's ID to manage input for everyone of them, and add them to the main map system manager.
Here you can see the new player added along the previous one:
You can select another type of camera setting, just by selecting a new one in the field Camera State to Use and pressing the button Set Camera Configuration again. Here are the same players in vertical:
You can also remove players by selecting a lower amount in the field Current Number of Players and pressing the above buttons in the same order (and make sure to select the Camera State To Use according to the number of players in the scene). So you can return to having just one player or add more.
In the hierarchy, you can see how the new players are added inside the main parent:
By default, all players are controlled with gamepad, so you will need the same amount of gamepads as players to play with them. There is an option to allow one player to use the keyboard. For this, go to any of the players to the gameObject called Player Controller, and in the inspector Player Input Manager set to true the field Use Only Keyboard.
After that, return to Player Character Manager and press Set Players ID button again.
Now if you go back to Player Controller gameObject and select the inspector Player Controller, you can see that the Player ID is 0:
When usually would 1. This is to make the system to know that this player won’t use a gamepad but the keyboard. Follow the same steps to configure the use of gamepad again (set as false the field Use Only Keyboard and press the button Set Players ID again).
This system allows to configure the whole mission system and is used to set some settings automatically on it.
For this, go to the upper toolbar of unity, select Game Kit Controller->Main Managers->Add Main Mission Manager.
Then, this system is placed on the level, which is the main mission manager, and it contains a list of all the station systems in each level. These station systems can be used as a physical mission board or just an invisible to configure different missions which are maybe activate by dialog or trigger.
Each station has a list of missions, which are the one which contains the missions to achieve, task, and rewards, and events to activate.
Also, it allows to place different mission elements on the level with just a click.
One of them is the Mission Station, which can be used as a physical mission board or just an invisible to configure different missions which are maybe activate by dialog or trigger.
Each station has a list of missions, which are the one which contains the missions to achieve, task, and rewards and events to activate.
Other element is the Mission System. which is the component where each mission itself is configured and managed.
And finally the Character Mission System, used to place missions on NPC, giving them to the player directly when the player uses the interaction button, showing the mission panel on characters. To trigger missions with dialog, other way (which will be explained later in videos and on this doc) is used, and which you can already see in the advanced mission demo.
The process to configure missions in the main mission manager is the next:
Configure all the missions that you need in the Objective Event System components:
Them, in the Station System or the Empty Station System (Objective Station System component), assign these missions according to where you want them to be found by the player, like a mission board, with a character, by trigger, etc...so you assign these missions to one Objective Station System component or other.
Then, go to the Main Mission Manager (Objective Manager component), assign the Scene number of the level assigned in the unity Build Settings panel and press the button Get All Station Systems On The Level And Assign Info. You will see how all the Station System appear on the
Objective Station System List.
With it, all Objective Event System (each mission configured), gets a Mission Id and the same Mission Scene value than in the main manager.
This also allows the system to save the info of the missions found by the player, with those already complete and those to finish yet.
Field
Vertical Y1
Vertical Y2
Vertical Y3
Vertical Y4
Name
Vertical Y1
Vertical Y2
Vertical Y3
Vertical Y4
Gravity
0
0
0
0
Dead
0.19
0.19
0.19
0.19
Sensitivity
1
1
1
1
Invert
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
Y axis
Y axis
Y axis
Y axis
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
Mouse Y1
Mouse Y2
Mouse Y3
Mouse Y4
Name
Mouse Y1
Mouse Y2
Mouse Y3
Mouse Y4
Gravity
0
0
0
0
Dead
0.19
0.19
0.19
0.19
Sensitivity
1
1
1
1
Invert
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
5th axis (Joysticks)
5th axis (Joysticks)
5th axis (Joysticks)
5th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Field
DPad Y1
DPad Y2
DPad Y3
DPad Y4
Name
DPad Y1
DPad Y2
DPad Y3
DPad Y4
Gravity
0
0
0
0
Dead
0.2
0.2
0.2
0.2
Sensitivity
1
1
1
1
Invert
Type
Joystick Axis
Joystick Axis
Joystick Axis
Joystick Axis
Axis
7th axis (Joysticks)
7th axis (Joysticks)
7th axis (Joysticks)
7th axis (Joysticks)
Joy Num
Joystick 1
Joystick 2
Joystick 3
Joystick 4
Add a new action on the input and configure the event to activate the animation action by going clicking on the root of the prefab (Player and Game Management), then the Input Manager component.
Scroll down to the section Multi-Input List and open the Multi Axes List menu.
Then open Player Controller in the Multi-Input List and select Add Action to add a new one. In this tutorial, we’ll be creating the action, Simple Kick. You can also put a Keyboard and/or Joystick input to activate the action here.
Next, navigate to the Player Controller game object on the player character and scroll down to the Player Input Manager.
Then scroll down to Multi Axes List and select the Player Controller section as we did on the Player and Game Management component. Click Add Action as before, except now on the Axe dropdown, you will see the Simple Kick Action we made. Select that. Set the Button Press Type to Get Key Down to have it execute when the input key is pressed down.
Click the plus under Button Event to add a new Event and drag the Player Action System prefab for the hierarchy into the field to assign it.
Select No Function, go to playerActionSystem and select activateCustomAction (string). For the string enter in our new action, Simple Kick.
Next, we’ll configure the action values to play a specific animation using its name and duration as main parameters. First, we’ll go back to the Player Action System game object and add a new game object named Simple Kick that will hold our settings for Simple Kick.
Add a game object under Player Action System and add the Action System component to it.
Scroll down to the Action Info List and click Add Action. The Name and Action Name are our action, Simple Kick. For this example, we’ll enable Pause Player Actions Input so that other inputs are recognized while the action is active. Then we’ll enable Resume Player After Action so that the player regains control after the Action is finished.
Now we need to add an animation to our action. Open the Animator window and make sure you have the Base Layer selected. Click the state machine New Actions, right-click the canvas and add a new State Machine. Name it Simple Kick.
Open the new state machine we just created and add a New State. This will be named, you guessed it, Simple Kick. Add a kicking animation to the Motion field. There’s one included in the Mixamo Animation package, Sword and Shield Kick. Note the Animation Time of your kick animation, we’ll be using that later.
Add a transition from Simple Kick to the state Main Movement>Grounded>Grounded. Select the transition and uncheck Has Exit Time. Under Conditions add the Action Active parameter and set it to false.
Navigate to the Custom Action State Info Settings and open the Custom Action State Info List.
Add a new state by increasing the Size by one. There are 46 in this example, so we’ll increase it to 47. The name is our action, Simple Kick, like the rest of the fields. For Main Action System, we’ll drag our Simple Kick game object that we just added to assign it.
Go back to the Simple Kick action we added under Player Action System, and under Action Main Settings, set the Animation Duration to our kick animation. In our example, it’s 1.2. Next check Action Uses Movement.
That’s it! The input will now call this new custom action we made, taking care of pausing and resuming the rest of the states, input, and actions of the character.
Now, let’s add some interaction and flourish to our kick. We’ll configure a component to push objects in front of the player that is kicked using the events options of the action. Including any needed delays.
Under the Player Controller game object, select the Push Objects on Running Slide game object and duplicate it. We’ll rename it to Simple Kick Push.
Return to the Simple Kick game object under the Player Action System. Under Event Info List click Add Event. In Element 0, we’ll set the Delay to Activate to 0.5. Add a new event in Event To Use and drag the Simple Kick Push game object into our field. Select the Function pushObjectsPower > setPowerEnabledState (bool) and check it.
Add another Event to the Event Info List. Element 1 will have a Delay to Activate of 1. Drag over the Simple Kick Push again into the field. Select the same function as before, setPowerEnabledState, and leave it unchecked.
That’s it! Happy Kicking!
GKC has many main managers, including the main inventory manager, which handles all the inventory info objects created on the asset, or the faction system to configure the relations between groups of AI and players and if they are enemies, friends, or neutral, and more main systems used to handle different parts of the asset.
This main manager is located on the player prefab parent, on the component Main Manager Administrator, where you can see a list of prefabs assigned there which are the managers themselves. The system automatically drops them on the scene at the start of the game if they haven’t been dropped manually on the editor.
So for this, you can just press the button Add Main Managers to Scene and they will be placed in a new parent object on the hierarchy:
This parent is called Main Managers Prefabs:
Some of these managers are linked to their original prefabs in the project, so you can apply the changes made on them in a scene, like creating a new inventory object, and that info will be applied to the rest of scenes where you have your player prefab placed. You can use the button Update Main Managers Info To Prefabs to update such info.
Climbing can be done in many ways
In order to make a surface climbable, it needs to have the tag SurfaceToClimb added to them. That way you only climb what you need and not everything in the player's path.
You may need to add the Tag to your Tags and Layers if it doesn't already exist.
If you only want to climb when the player presses a specific button, make sure it's added as a Button Event in Activate Device in the Use Devices Category.
Frequently Asked Questions about Game Kit Controller.
GKC uses Mixamo animations as placeholders for the base action system animations. Mixamo animations can't be included with the GKC package on the Unity Asset Store - which is what causes this issue. You will need to download and import these animations separately from one of the following links:
Mixamo Placeholder Animations [Google Drive] *Recommended
These animations are already configured to work on root motion properly (like rotation based on current pose, loop time, adjust speed, etc…). No extra changes are needed, just import the package and hit play.
If this issue still happens after importing the animation package, save your project and restart Unity. Everything should work after that.
All these animations and copyrights belong to Mixamo. You can get these animations and more at the official Mixamo website: https://www.mixamo.com/
Of course, most of the prefabs in the asset are made to be easy to replace their models with new ones. For example, in vehicles, all the meshes are a child of the Chassis GameObject.
Yes, you shouldn't have any problems using other assets to create the level scene or terrain. The collision detection with them will work without issues. If you find this isn't the case though, give us a shout on our Discord server.
Using GKC with Unity’s High Definition Render Pipeline (HDRP) only requires making a few adjustments to your project. This is covered in the tutorial video below:
Using GKC with Unity’s Universal Render Pipeline (URP) only requires making a few adjustments to your project. This is covered in the tutorial video below:
Absolutely, the vehicle weapons, like powers and player weapons are totally customizable and have a huge amount of options including the following:
Physics based, Impact settings, Fire rate, Speed
Automatic / Single Firing modes
Projectile settings
Explosive or non-explosive projectile
Explosion radius
Force
Number of projectiles to fire per-shot
Position
Create shells
Object penetration
Sound and particle options
Target tracking and heat seeking projectiles
Projective movement in a straight line, or using a trajectory
The list goes on....
This same configuration is used for weapon for player, vehicles, NPC with weapons and powers. And just like the vehicle meshes, you can change the weapon mesh easily as well.
Sure! We have channels dedicated to just this over on our Discord server. Come on by and let us know what you have in mind
Finally, press the button Create Inventory Prefab to create the prefab of this object, which is the pickup ready to be dragged and dropped into the scene to be used by the player.
In this final step, the prefab is stored in the path Assets/Game Kit Controller/Prefabs/Inventory/Usable. Also, this prefab is assigned automatically in the new inventory object created in the Inventory List Manager.
Select the Character gameObject in the GKC_Prefab.
Go to Inventory List Manager inspector and open the inventory list.
Press the button Add Object.
Open the new object and configure the Name and description.
Then, create the mesh used for that inventory object. It needs to have these settings:
The mesh or meshes used in the object are placed in an empty parent, with a scale (1,1,1).
That parent needs to use the layer inventory.
That parent needs a collider adjusted to the object's shape and size. You can add as many collider (box, sphere, capsule) as you need if the objects has a complicated shape, but all these colliders need to be configured in the parent.
This is not necessary, but the name for the prefab can be the name of the object with Mesh and the end.
For example, this is the red wire created.
Once it is created, drop it to the prefab folder in the path Assets/Game Kit Controller/Prefabs/Inventory/Mesh.
Go back to the Inventory List Manager, and set the mesh of the new object with the one created previously in the field Inventory Object Mesh.
Once everything is configured, the fuse box can be tested. For this, go where it is placed and follow these steps:
Make sure to have at least 4 fuses and 1 blue wire in the inventory.
Enter inside the device trigger, open the menu and press the Fuse object.
Press the button Use, select the amount to use with the buttons + and - (it can be one by one, two, any amount from the available in the inventory). You can press also X to close the amount window.
Press Use again. The fuses are activated and the message configure is shown.
Open the inventory again, select the blue wire and use it.
As you can see, every message is shown according to the object used. Like this, all the elements needed are placed and the door is unlocked. Also, in this case, when the door is unlocked, the map icon in the minimap changes.
Now, press the button Open Inventory Capture Tool, so the mesh created is rendered in the window to take a picture of it.
Configure the resolution of the image (the default value is 1024x1024) and the name of the capture. Also, you can use the values of position and rotation to rotate the object for a better perspective and move its position to place it correctly inside the capture. Once it is configured, press the button Get Capture.
In the folder path Assets/Game Kit Controller/Prefabs/Inventory/Captures, the new icon is stored. Also, the icon is assigned in the new inventory object in the Inventory List manager.
Then, configure the values for the object if can be used, equipped and/or dropped. The option Amount Per Unit is used normally for elements like fuel, where the player has for example 10 cans and every can has 10 liters. The Infinite Amount is used to set the inventory object with infinite uses.
Important: in this explanation, the fuse box is used as an example, but this system can be used to create any type of object where to use inventory objects.
Finally, to use the objects created and configure in the previous steps, follow these steps (in this explanation, the fuse box will be used as an example to unlock a door, and the mesh for the fuse box is already created):
The parent that contains the fuse box is an empty transform with this configuration:
The tag assigned is the device. o The layer assigned is Ignore Raycast.
A sphere collider with the trigger option enabled is used to detect if the player is close enough to the fuse box to use the inventory objects on it. So, it looks like this:
Add a Use Inventory Object component to the parent.
In the Main Settings, set to true the option Disable Object Action After Use. This is used to disable the Device String Action component icon, which will be added after.
Also, in the option Use Inventory Type, you can configure how the objects used in the fuse box are placed:
Menu, the player needs to open, select and use the object.
Button, the player only needs to press the interaction button to use the necessary inventory objects (in case he has them, else a message is shown on the screen to say that the player hasn’t the needed objects).
Automatic, the player only needs to enter the trigger to use the inventory objects in the fuse box.
Add an event to the list of Unlock Function Call and add the object to use, in this case, add the door to unlock.
Add in the Function field, and set the UnlockDoor function, from the component Door System.
Now, configure the objects to be used from the inventory in this fuse box. For this follow these steps: o Open the Inventory Object To Use Lis.
o
Press the button Add Object.
Open the new element and configure the values required, name, the amount needed, and the message shown on the screen when the object is used.
Then, in the field Object Needed, drag and drop the mesh of the inventory object which needs to be used here, in this case, the fuse. The path of these meshes is Assets/Game Kit Controller/Prefabs/Inventory/Mesh
Open the Inventory Object Needed List inside the current element that is being configured and press the button Add Object.
Open the new element and, for this case, set to true the option Enable Object.
This option activates a gameObject in the level and in this case, the fuse models placed in the fuse box are disabled, so when the player uses a fuse from the inventory, the fuse is activated inside the box. For this example, the gameObject Fuse Model is disabled in the hierarchy. This is the element configured in the Object To Enable Field.
The fuse model needs to be disabled before starting the game.
Instead of activating disabled gameObjects, there is an option to instantiate objects in the scene, but this will be explained later.
In this case, there are four fuses, so configure the rest of them, like the first one.
Now, along with the four fuses, the fuse box needs a blue wire to work, so another object needs to be configured, but it is another element different from the fuses. Go to the main Inventory Object Needed List and press the Add Object button to configure the blue wire.
For the blue wire, like for the fuses, configure the name, the message to show on screen and the amount needed and the inventory object mesh to use.
And inside the Inventory Object Needed List, configure the object to active, in this case, a mesh of the wire already placed in the box, like the previous fuses objects.
Like with the Fuses Models configured before, the wire object needs to be disabled.
Finally, add a Device String Action component to the parent, with the next configuration.
The Device Name and the Device Action are the text shown in the icon of the interaction button on the screen. The Show Icon is the default option to show that icon on the screen. The Show Touch Icon Button is a default option used to show the touch button on mobile devices to use the interaction button.
How to configure the weapon attacks on a weapon itself
These objects are the Melee Weapons themselves. Each one contains its own attack in the Grab Physical Object Melee Attack System component.
Under the Attack List Settings, there's the Attack Info List which has the moves available.
It also contains the options for Events and the size for the damage detection including its offset in case you need to move the position of the trigger.
This is the most important part. The Attack ability itself.
On each Attack you have the Damage Trigger Detection which uses a delay to activate the damage detection, using the % values of the animation, so you have a swing animation.
There is a time where the character makes the movement for the attack where he puts the melee weapon on a position and then, it makes the swing, so that is the delay configured before activating the slice.
So that 0.2 value is the % (20%) where the swing starts, so at that moment, the damage detection is activated.
Let's look at how to assign new inventory objects in the player’s inventory manager. Once the new inventory is created, to be usable by the player follow these steps:
Go to Player Controller gameObject.
Go to the inspector Inventory Manager and open the Inventory Manager List.
Press the button Add object.
Configure a name for the object that you want to add from the Inventory List Manager and the amount.
Press the button Get Inventory Manager List, to get all the inventory objects configured in the Inventory List Manager (this need to be done every time a new inventory object has been added if you want to add it to the player’s inventory).
You can check the difference between the list show in the field Object Name before and after.
Finally, in the field Object Name, select the new object created in the Inventory List Manager (or the one you need from the previous elements in that list).
To check if everything works, press play an open the inventory menu (by default is the I key). The new inventory object (in this case, the red wire) is shown in the grid and it contains the information configured, the amount, it can be used and dropped.
How to configure the Armor-Cloth component on a new model in GKC
First thing, make sure to drop in the scene the Main Inventory List Manager prefab, as it will contain the inventory info from the new armor set created.
Before creating a new character, create a prefab of the new model and attach the component Character Customization Manager
Configure the settings of the component as shown below.
Then, on the main character base info, configure the list of meshes of the base model (usually the one that is "naked/underwear", avoid configuring their hair or any body accessory.
For each part, make sure to use a unique name, like Head, Chest, Hips, Feet, Hands, Upper Arms, Lower Arms, Upper Legs, Lower Legs, etc... as this will be used for each category of equipment in the next settings.
Make sure to have the base model meshes as the only active meshes on the character, so the rest of the meshes are disabled on the hierarchy.
On Character Set Settings, create a new element, set a unique name for the Set, and configure the meshes used on that set, using the same Type Name for each body part, for example, Helmet on Name and Head on Type Name on that object.
Once all the parts of that set are configured, go to the Game Kit Controller top bar settings, and press Create Armor-Cloth Set button.
Configure the same amount of elements as you did in the previous step, set the same unique names for each armor part and its Category Name (same as the Type Name that you configured previously, Head, Hips, Hands, Feet, ....), and the mesh used on the inventory pickup (this can be a regular pickup mesh or any other), set the icon capture used for that inventory object, the description and any extra info that you consider.
Make sure to set the same set name on the Full Armor Cloth Set Name field.
Select the scriptable objects which contain the full list of pieces of the character and the full armor lists (you can create new scriptable objects for those in the project).
Once all is configured, press Create New Set, which will take a few seconds to complete. This will create all the info related to the new set, including the inventory object's info and prefabs.
Locate on the hierarchy where you dropped the Main Inventory List Manager, you can see the new set is added into the armor-cloth category, press the button apply on the above part of the inspector on the prefab section, to update the main inventory info on the prefab, so all is updated properly.
Finally, with the model on the hierarchy with its Character Customization Component configured, update its prefab, so that info is updated on the model, which is the one that you will use to create a new player with it (or AI).
Abilities and Skills are the heart of any game, including GKC
Details on the options for the Action System Componen
By default Game Kit Controller loads all the demo abilities for you to use or alter. If you want to clean out the list just follow so.
On this list, you can see the all examples usable out of the box. So you can remove any of those which are enabled by default, each of those abilities has an ability-enabled field
With that as false, the ability is not usable and can be unlocked by events or anything similar, including the experience or skill system for it.
The system works via events. As in when the key assigned to use it (Q in this example), sends an event on each type of press. Either down, up, or hold.
In this example, the Push Objects Systems, calls to the Action System to play a specific animation and push objects around. The component also allows you to make small script behaviors if needed for specific interactions or to use the already created elements as you prefer.
The Dialogue System for Game Kit Controller
This system is used to save the info of the dialogs, so if a player talks with an NPC with different dialogs, this system will save the current element to play once the player returns to play.
For this, go to the upper toolbar of unity, select Game Kit Controller->Main Managers->Add Main Dialog Manager.
Then, this system is placed on the level, which is the Dialog Manager, and it contains the dialog prefab which can be placed in the level at any moment on any NPC, so the player can talk with them.
The process to configure is like the previous mission manager. First, configure the dialogs that you need (you can check the video tutorial for dialogs).
Once you have that ready, go to the main dialog manager, configure the Scene for the current level and press the button Get All Dialog Content Systems On Level And Assign Info.
Like that, all dialogs configured will appear on the list. And also, each dialog will receive the info of the Scene configured.
Initial steps for setting up the Game Kit Controller's Map System
Once a new player has been created, if you want to use the map system, you need to drag and drop the Map System prefab (with the same name) in the folder Assets/Game Kit Controller/Prefabs/Map System.
Once the hierarchy contains these two elements:
Then, go to Character gameObject, Map System inspector, and press the button Map Floor and Icons.
Go to Floors, and press the button Search Floor List. The floors configured in the Map Creator inspector will be configured automatically.
If you don’t need to use the map system, don’t configure the above steps and it will be disabled.
IMPORTANT: THE CLOSE COMBAT ANIMATIONS (KICK AND PUNCHES) ARE NOT INCLUDED IN THIS ASSET, BUT THE SYSTEM THAT USES THEM. YOU CAN FIND THOSE COMBAT ANIMATIONS AND MORE IN THE FREE ASSET TAICHI CHARACTER PACK, WHICH WAS USED TO TEST THIS SYSTEM. TO USE IT, JUST SET THE ANIMATIONS IN THE COMBAT LAYER OF THE ANIMATOR.
This can be used to place names in any room or to place the floor name shown on the map. For this, go to Text Mesh List in the Map Tile Builder inspector and press Add Text Mesh.
A new text mesh is attached inside the map part transform.
Configure in the inspector the size and content and place where you need it.
If you press play, the text will be shown in both the Minimap and map window menu.
You can add as many text mesh as you need in every map part. You can see in the gizmo, that every text mesh is linked with its map part owner.
To remove any of these meshes, press the X button, and both the object in the scene and in the list are removed.
If you want to use the map system, you need to drag and drop the Map System prefab (with the same name) in the folder Assets/Game Kit Controller/Prefabs/Map System.
Once the hierarchy contains these two elements:
Inside the hierarchy of the Map System gameObject, go to Floor List and to Map Creator inspector.
Go to Floors List and press Add Floor button.
This element will contain all the map parts for the same floor. At the same time, every map part contains a group of empty transforms which are used as a vertex to create the map part mesh, like a room, a corridor, a wall, etc…
In the hierarchy, you can see that inside the Floor List transform, a new transform has been added as a parent to that floor, and inside that floor, the first map part.
Open the first element of the floor list, which already contains the first map part, to the Map Tile Builder inspector, and press the button Add Transform in the Vertex Position list.
For example, if you press this button 4 times, 4 empty transforms will be attached inside the MapPart-001, used as the vertex for the mesh that will be created.
For an easy workflow, in the Map Tile Builder, go to Gizmo Settings and enable the Use Handle For Vertex and configure the radius as you need.
You can also move the transform 001 to 004 to place the vertex to make the shape that you need.
You can add as many vertexes as you need, to make rooms or places simple, for example, squares or rectangles to circular rooms, hexagonal, etc…, just press the button Add Transform.
When the game starts, the shape is created, looking like this:
You can remove any of these vertexes by pressing the X button and both the object in the scene and in the list are removed.
A system for making character factions.
The GKC system for creating a Map system for your Player and Points of Interest.
Once a new player has been created, if you want to use the map system, you need to drag and drop the Map System prefab (with the same name) in the folder Assets/Game Kit Controller/Prefabs/Map System.
Once the hierarchy contains these two elements:
Then, go to Character gameObject, Map System inspector, and press the button Map Floor and Icons.
Go to Floors, and press the button Search Floor List. The floors configured in the Map Creator inspector will be configured automatically.
If you don’t need to use the map system, don’t configure the above steps and it will be disabled.
This is useful to use parts already created of a floor for equal or similar rooms or shapes. For this, go to the map part that you want to copy, Map Tile Builder inspector, and press the button Duplicate Map Part.
Then, like before, another map part is created, with the same hierarchy that the copied, so you can move it to the place you need. The text meshes are copied too.
Once some map parts have been disabled, you can configure the trigger that will show the map part when the player reaches that zone. For this, go to the map part that you need, Map Tile Builder inspector and press the button Add Trigger Event to Enable Map Part.
A trigger is automatically created, but you can add as many triggers as you need for the same map part (for example a room with three doors, so it will be activated no matter the door the player uses to enter).
Next, select the MapPartEnabledTrigger_1 in the inspector and the hierarchy will show this element, select it there and place every trigger where you need it.
As you can see, in this picture, this trigger is used to show the Main Hall of the mansion when the player enters it.
Also, the trigger shows this gizmo, making it easier to see in the scene.
To remove any trigger, press the X button, and both the object in the scene and the list are removed.
Go back to the Floor List gameObject, to the Map Creator Inspector, and press the button Add Floor again.
Like before, a new floor transform will be added to the hierarchy.
Also, in the scene, a gizmo shows the position of every floor, so move the new floor position according to your level scene.
This will be used to know where the player is according to the closest vertical distance to the floor list (used by default). Now you can start to add new map parts to the new floor.
For example in this image, there are two floors using two cubes and two map floors configured, so the closest floor map to the player will be rendered in the map window.
With the new floor added to the list, don’t forget to go to the Map System inspector and press Search Floor List.
And this is shown in the map menu by floor:
If instead of using vertical distance to know the closest floor where the player is, you can use triggers to change between floors. This can be used better for closed spaces levels, instead of opened.
For this, go to the Map Creator inspector, and in the floor that you need, open the Trigger To Change Floor list and press the Add Trigger button.
And like before, the gameObjects are created and attached to the proper hierarchy elements.
Like this, place this trigger where you want the map floor to be changed to Floor 0. This system is made to use two triggers for a zone, it means, one trigger to change to floor 0 and one trigger to change to floor 1 in every place the floors are changed, both of them close (for example, if the building has two stairs, to walk between both floors, there will be 4 triggers, two for every stair).
This can be appreciated here, in the demo mansion, there are two triggers in the stairs of the hall, one to change to Floor 1 and another for Floor 0. Also, a gizmo is used to show the link from every trigger to its floor.
Once the triggers are placed, go to the Map System inspector, go to Map Settings, and set to false the option Get Closest Floor To Player By Distance.
You can add as many triggers as you need for every floor. Also, you can remove any of these triggers with the X button and both the object in the scene and the list are removed.
The map can be shown in the map or you can select if a certain floor or map part is not shown, so the player needs to reach that zones or get a map pickup of that zone, to make it visible in the map window.
For this, go to Map Creator Inspector and open the Map Parts List of a floor.
Then, you can select every map part state of that floor one by one, using the Enabled option.
You can also, enable or disable entire floors with the options Disable All Floor Parts and Enable All Floor Parts.
Once you have a list of icons, go to an object that you want to be shown on the map (an enemy, a door, etc…) and add the component Map Object Information.
In this component, you can configure a name, a description, the type of icon, the floor where this icon is shown, an offset for the icon, and the map part where the icon belongs, for example, a save station inside a room.
The Map Icon Type field will show the same list of icons configured in the Map System previously.
The Floor number field works in the same way, it will show the list of floors configured in the Map System, used to configure in which floor the map icon is shown.
Another field, called Visible in all floors can be selected to show that map icon at every moment in the map window, no matter the current floor where the player is.
For example, a Save Station with the next configuration will show this info in the map window:
Once you have configured all the Map Object Information components in the scene, go to Map System inspector, and press the button Set Map Object Information ID.
This is used in the Map System to manage the map icons properly.
Show a hidden map part with another color until it is visible
This can be used to show that map part as hidden but showing its shape, but not its text mesh. For this, go to the Map Tile Builder inspector and enable the option Use Other Color If Map Part Disabled (make sure the option Map Part Enabled is false).
In this case, a color field appears to be configured:
In the above pictures, this can be appreciated, on the left, the main hall hasn’t been found yet, and on the right, the player has found it with the map part trigger.
This is useful to hide map parts or floors at the start of the game, so the player can unlock these zone maps with pickups for example.
For this, once some floors or map parts are disabled, drag and drop the Map Inventory Prefab, in Prefabs/Inventory/Usable.
In that object, go to the Map Zone Unlocker inspector and press the button Search Floor List to get the configured map floors in the Map Creator.
Open every map floor list that you need and select the map parts that this pickup will unlock.
So like this, when the pickup is grabbed by the player, these zones will be shown in the map window.
For example, in the mansion demo, there are three map unlocker pickups, one that enables all the floor 0 and the other 2, which enable half of the map of floor 1.
Floor 0 before and after unlocking the map.
In this case, the first floor map is disabled and the player picks one map unlocker and then the other.
To make the terrain visible in the map system, follow these steps:
Assign the layer Terrain to the terrain gameObject.
Inside the Map System gameObject, there is a camera, to render the tile meshes created with the map creator. In that camera, add the layer Terrain in the culling mask.
Make sure to create at least an empty floor in the Map System component in the Character gameObject, it doesn't need to have any map part.
Then, the terrain will be visible in editor mode in the mini window and ingame.
Once you have created all the map floors (or if you have added or removed them on the floor list) go to Character gameObject, Map System inspector, and press the button Map Floor and Icons.
Go to Floors, and press the button Search Floor List. The floors configured in the Map Creator inspector will be configured automatically.
If you don’t need to use the map system, don’t configure the above steps and it will be disabled.
To remove a map part from a floor, go to the Map Creator inspector and press the button X, and both the object in the scene and the list are removed.
In this case, don’t forget to update the floor list in the Map System inspector, like before.
If you want to remove a map part, go inside the floor which has that part and press the X button, and both the object in the scene and the list are removed.
This is very simple, you only need to configure the same info on the Objective Event System component on the scene where it starts and where it ends (the scene where the mission is complete doesn’t require the trigger of the mission to be active, since the mission was already activated on another scene).
For this, make sure to configure the same scene ID and mission ID on the fields of the Objective Event System components on both scenes, so the system can link the info of one side in the other.
Here an example, where the build settings with the scene index are configured like this:
In the scene Level Manager Building Scene 1, this is the mission ID and scene ID values configured on the objective event system component:
The scene index is 5, since the scene uses that indes on the above build settings and the mission ID is 0 (it could be any other value, but in this case, this is the unique ID assigned to it on this scene).
On the second scene, where the mission is complete, which in this case is Level Manager Building Scene 2, the values on the objective event system are these:
Like previously, same values, being the mission ID a unique value on this new scene (make sure that for example in this case, no other objective event system has the mission ID field with 0, since each mission needs an unique value for this).
It is recommended to check the section CONFIGURE THE MAIN SCENE MANAGER to see more about how the different scenes are managed.
The player has 3 modes: Weapons, Powers, and Combat. To change between them, press H (by default). You can see the current state by checking the name in the upper left corner of the screen, below the health and energy bar.
The weapon mode is the default mode. In Player States Manager inspector (in the gameObject Player Controller) you can choose the default mode at the beginning of the game.
Also, you can configure if the player can change between these modes or not, so the game can always have the same mode or all of them. This option is called Change Mode Enabled.
An example of using the Combination System to create a weapon that can fire and melee.
Systems that let you manipulate time like in Max Payne and the Matrix
It contains all the UI elements in the game, including the main canvas, configured in HUD and Menus gameObject.
Inside of it, you can see where the dynamic elements of the game are located (icons that follow positions of objects on-screen or that are disabled/enabled to show info about anything needed).
The gameObject HUD contains the main info of the game screen, including the info of the player (health bar, stamina bar, weapons HUD, abilities info, etc…), the in-game menus, like inventory, map, mission log, experience/skills menus, etc…
After that, you can see the touch panels which contain the different touch panels and their buttons for mobile devices.
And finally, the pause menus, inside Menus gameObject, along with the settings, die, and exit from the game menu.
There is a new toolbar system which can be used to make shortcuts and quick actions. It is very customizable and it has many actions as shortcuts in order to make the asset easier and faster to use or simplify some steps, like select the main player, focus on a certain component, move the player around, toggle camera view, etc...
It can be activated here:
And you can place it anywhere on the editor:
And you can locate the file where the settings are configured, including a number of rows for buttons and new actions:
The save system has been improved, allowing now to save the state of objects on scene and keep that info in between games and load/save game and change of scenes, which can be used to keep AI dead, objects spawned on the scene, or pickups taken, doors unlocked or locked, places where inventory objects were used, vehicles moved to different scenes, etc….
For this, there is a main manager which takes all the objects in the scene with a component attached to them, called Element On Scene, which allows to set an id value and configure what elements are saved, including position/rotation and events options to initialize the state when the scene is loaded, so if a pickup is taken, that object will be disabled when the scene is loaded, or if an inventory object like a key was used, it will keep that door unlocked through those events, calling the function to unlock on the door.
Here you can see an example of this, with an object having this component and some info, like scene value (which is the scene index from build settings where the object is located) and element ID, to know the id of this object, unique in each one of them.
That logic can be used for any type of object to keep its state in between scenes and loaded games.
To configure this, go to the Main Manager Prefabs parent (which you can see more info about it on the section MAIN MANAGERS ADMINISTRATOR) and locate the Elements On Scene Manager object:
The logic to configure it is very similar to other managers like mission, or dialogue, so in the Element Scene field, configure the scene index from that scene on the respective build settings, in this case, the scene is configured on the index 5, so set that in the Element On Scene Manager component, like here:
Once that is done and that you put the objects and elements you want to use on that scene, press the button Get All Elements On Scene And Assign Info.
That will assign the scene index and an unique ID for each object on scene. If you remove or drop more objects with info to save, make sure to press the button again, to assign the ID to each one.
All the inventory objects and most of the interaction elements have this component attached to them, so you can either disable or remove them in case you don’t want to save that info if your game or certain elements don’t need to.
In the same way, you can attach it to any new object or element that you create to save the state of it, for example, for any simple rigidbody, like a box, to keep the info of its position/rotation or any extra value which requires the initialization through the event options on the component.
The same scene manager examples of the previous pages contains the main save system configured for all the elements on it, allowing to check how it works and to try them ingame, following the same steps to configure the build settings with the scene index and the scenes related to these demo examples.
Another example of this is the prefabs where inventory objects are used, as they have assigned this component too, so they will keep the info in between scenes, allowing to use the events to initialize their values if the inventory objects on them were used or not:
You can see how the events for the object active calls to the solve inventory object element.
And here how the usage of inventory objects when complete, will call to the element on scene info to set it as active:
That will make it to call the element on scene event to initialize the object as already complete, so a door remains unlocked, or a device remains active if energy was given to it to turn it on, and so on. So you can pretty much configure any event call to initialize the GKC elements or your own as well.
A scriptable object also handles prefabs to organize elements which can be spawned ingame for example, pickups, so even if the object was not present on scene on the editor, the system is able to recognize that a certain object was spawned ingame, to remain there if the game is loaded.
So if for example, you break a crate with pickups inside, these pickups can remain there, instead of being removed and the crate can remain destroyed, to avoid using it again.
This scriptable object is assigned on the main element on scene manager, and can be found here:
You can configure any new category or use the current ones to organize the prefabs of this type which can be spawned or picked or destroyed from scene as you need:
And in each category, it is a matter of dropping those prefabs which the element on scene component attached to be recognized as element to save state, like inventory ammo pickups:
For example, this pickup has a prefab ID assigned automatically by the main manager:
So the system is able to locate it and spawn it if needed.
Once the prefabs that you need are placed on the scriptable object, go to the main element on scene manager and press the button Set ID On Elements On Scene Prefabs.
Make sure to do this if you add or remove prefab objects of the main scriptable object.
This can be used to hide icons in the map on hidden map parts, so if a map part is not enabled, the icons inside that map part are disabled too and once the map part is enabled, the icons will be shown in the map as well.
For this, go to the Map Object Information inspector and enable the option Belong To Map Part.
Then, select the Map Part Owner, which means the map part that contains that icon. Use the list of map parts to select where the icon belongs. This list is shown according to the Floor Number configured in the inspector.
The list of floors is configured automatically from the map floors configured in the Map Creator inspector.
Like this, if you select the floor-000, it will appear the map parts list of that floor. In the left picture, the map part list shown belongs to the ground floor. In the right picture, the map part list belongs to the first floor.
In this example, the Map Object Information is used for a save station in the main hall room, which is disabled until the player enters the room. Also, 3 doors are configured with the same unlock values.
In the Map System inspector, you can configure the icons used in the map window (which are assigned in the map object information). To add new ones or configure them, go to the option Map Floor And Icons.
And then, to Map Icon Types.
In this list you can add a new type of icon:
For this, press the button Add Icon, configure a name, drag and drop one of the other icons already made, set the image you need, and make a prefab of it. Configure that prefab in this list.