Game Kit Controller
  • Welcome
  • Quick Start
    • 🛣️Roadmap
    • ⭐Getting Started
      • Importing GKC
      • (Optional) Download External Files
    • 🎓Tutorials
      • 🔑Tips, Tricks and Hotkeys
      • Manually Add Axes in the Input Manager
      • Manually Add Tags and Layers
      • Tutorial - Create a New Character
      • Tutorial - Create a New Character with the Manual Creator
      • Tutorial - Create a Generic Character
      • Tutorial - Set the Default Weapons in a New Character
      • Tutorial - Create New Melee Weapon
      • Tutorial: Set Initial Melee Weapons on Player & AI
      • Tutorial - Adjust Weapons Quick Draw Weapon Action
      • Adjusting Player's Upper Body for Weapons
      • Fixing Player Spine Rotation
      • Tutorial - Add Action System By Input
      • Tutorial - Configure Local Multiplayer
      • Configure the Switch Character Companion
      • Configure the Main Mission Manager
      • Configure the Main Scene Manager
      • Using the Save System for Elements State on Scene
      • Tutorial - Configure the Drive System on an External Vehicle Controller
      • Setting up a New Skill System
      • Tutorial - Configuring Melee Weapon Attacks
      • Tutorial - Create Objects to Grab and Carry Physically
      • Tutorial - Create a new Melee Attack
      • Tutorial - Changing Player Movement Animations
    • ⁉️FAQ
  • Major Systems
    • ⚡Main Manager Administrator
    • 🏃‍♂️Traversal Movements
      • Climbing
      • Rail Sliding
      • Wall Running
    • 📥Inventory System
      • Adding a New Inventory Object
      • Create a new Inventory Prefab
      • Check the Use Inventory Object works correctly
      • Use Inventory Objects
      • Create Inventory Icon
      • Assign New Inventory Objects to the Player
    • ⚔️Weapon Systems
      • Dual Wielding Weapons
      • Tutorial - Configuring Melee Weapon Attacks on a Weapon
      • Tutorial - Create New Melee Weapon
      • Tutorial - Adjust the Fire Weapons Main Position
    • 👕Armor/Clothe System
      • Tutorial - Configure Armor-Clothe for New Model
      • Tutorial - Adding A New Piece To An Existing Armor-Cloth Set
    • ⛺Event Trigger System
      • Setting Up the Event Trigger System
    • 👊Action System
      • Action System Component
      • Tutorial - Add Action System By Input
      • Tutorial: Create Objects to Grab & Carry Physically
    • 🏂Abilities & Skills Systems
      • Skill Systems
        • Player Skill System Component
        • Player Skills UI System Component
        • Tutorial - Setting Up a New Skill System
      • Ability Systems
        • Player Abilities System Component
        • Custom Ability Component
        • Activating an Ability by Key Combo
        • Tutorial - How to set Default Abilities
        • Tutorial - Create a Custom Ability
        • Tutorial - Create a new Melee Attack
        • Tutorial - Configuring Melee Weapon Attacks
    • 💬Dialogue System
      • Configure the Main Dialog Manager
    • 🏴‍☠️Faction System
    • 🗺️Map System
      • Map Creator Component
      • Setting Up the Map System
      • Creating a new Map Creator and adding Map Parts
      • Add Name Mesh for the Floor
      • Manage Multiple Floors
      • Duplicate Map Part
      • Delete Map Parts and Floors
      • Change between Floors with Triggers
      • Add Triggers for Hidden Map Parts
      • Enable and Disable Certain Parts of the Map
      • Show a Hidden Map Part With Another Color Until Visible
      • Use Map Object Information
      • Configure Map object information Icons
      • Configure Map Pickup to Unlock Map Parts or Floors
      • Map Object Information Linked to a Map Part
      • Render Terrain in the Map Window
      • Assign the Created Floors to the Map System
    • ❗Objective System
      • Main Objective Manager
      • Configure a Mission to Start in one Scene and Finish in Another
      • Configure a Mission to Eliminate Multiple Targets
    • 🚥Player Control Mode
      • Weapons
      • Powers
    • 🌪️Combination System
      • Rifle Sword Example
      • Combat
    • ⌛Time Manipulation
      • Bullet Time (Max Payne Style)
      • Slow Motion (Matrix Style)
    • 🖥️HUD System
    • 🔨Toolbar System
    • 💾Save System
      • Save System for Elements State on Scene
    • 🏳️Localization/Language System
  • Top Level Components
    • 🎮Player and Game Management
      • 🖼️Tag Layer System
      • ⌨️Input Manager
        • First Steps and Basic Use
        • Add a New Touch Button
        • Check and Filter Input Actions
        • Configure Input on Vehicles
        • Configure Input Rebind Menu Panel and Actions
        • Add an Action to a New Script
        • Remove an Axe
        • Disable an Axe
        • Save/Load Currently Configured Axes
        • Manage Axes Save File
        • Touch Controller
        • Diable Touch Buttons on Start
        • Delete Disabled Touch Buttons
        • Assign a Touch Button to an Action
        • Scale Touch Button in the Inspector
        • Touch Joysticks
      • ☕Main Manager Adminstrator
      • 🖱️Mouse Cursor Controller
      • 🎲Game Manager
      • 🚶Player Characters Manager
      • Simple FPS Counter
      • Place Object in Camera Editor Position System
      • Set Game Object Active State
      • Set Initial Position At Game Start
  • Character Level Components
    • 🕺Character
      • Features Manager
      • Menu Pause
      • Build Player
      • Ragdoll Builder
      • Powers List Manager
      • Player HUD Manager
      • Map System Component
      • Show Game Info Hud
      • Save Game System
      • Camera Capture System
      • Weapon List Manager
      • Player Screen Objectives System
      • Console Mode
      • Player Health Bar Management System
      • Player Pickup Icon Manager
      • Player Damage On Screen Info System
      • Time Bullet
      • Player Tutorial System
      • Player Options Editor System
      • Vendor UI System
      • Dialog System
      • Objective Log System
      • Objective Station UI System
      • Travel Station UI System
      • Inventory Bank UI System
  • Player Controller Components
    • 🕹️Player Controller
      • Player Controller Component
      • Gravity System
      • Other Powers
      • Grab Objects
      • Health
      • Using Devices System
      • Close Combat System
      • Ragdoll Activator
      • Foot Step Manager
      • Pickups Screen Info
      • IK System
      • Player Weapons Manager
      • Inventory Manager
      • Damage Screen System and Damage In Screen
      • Friend List Manager
      • Upper Body Rotation System
      • Player States Manager
      • Head Track
      • Character Faction Manager
      • Player Input Manager
      • Player Navmesh System
      • Map Object Information
      • Hands On Surface IK System and IK Foot System
      • Climb Ledge System
      • Remote Event System Component
        • Setting Up a Remove Event
    • 📹Player Camera
      • Player Camera Component
      • Player Culling System
      • Set Transparent Surfaces
    • 💯Essential Components
      • AI Behaviors
      • Damage Hit Reactions System
      • Dash System
      • Inventory Camera Position and Map Elements
      • Experience-Level-Stat Systems
        • Player Experience System Component
        • Player Stats System Component
        • Player Skill System Component
          • Tutorial - Setting up a New Skill System
        • Player Skills UI System Component
      • Inventory Categories List Manager
      • Melee Combat System
      • Inventory Menu Panels System
      • Inventory Quick Access Slots
      • Inventory Weight Manager
      • Inventory Armor-Cloth Customization System
      • Player Abilities System Component
      • Player Action System Component
      • Player Info Panel On Screen System
      • Player Input Panels
      • Player State System
      • Match Player To Target System
      • Slow Down Time On Perfect Dodge
      • Save Info Elements List
      • Custom Character Controller Manager
      • Player Navmesh System
      • Elements On Scene System
    • 💼Non Essential Components
      • Ability Activated By Key Combination (R G)
      • Bullet Time Firing System (Max Payne Style)
      • Climb Ledge System
      • Currency System
      • Condition System
      • Console Log On Screen
      • Flashlight
      • Hands On Surface IK System
      • IK Foot System
      • Magic System
      • Laser Dot On Screen Manager
      • Oxygen System
      • Simple Sniper Sight Manager
      • Roll On Landing System
      • Photo Mode System
      • External Controller Behaviors
      • Gravity Wall Run Ability
      • Check If Carrying Weapons To Set Close Combat
    • 📲Elements Used By Other Components
      • Body Mount Points System
      • Damage On Screen Info System
      • Damage In Screen
      • Double Check To Disable Fire Damage On Roll
      • Free Fall Activator
      • Fire Damage
      • Ladder System
      • Inventory Camera Position
      • Map Elements
      • Projectiles On Body Manager
      • Pickups Info On Screen System
      • Player Idle System States
      • Remote Player Navmesh Override
      • Scanner System
      • Sprite Animator System
      • Shield System
      • Stamina System
      • Temporal Parent For Weapons
      • Throw Grenade From Inventory
      • Transform to Follow
      • Touch Screen Pinch System
      • Weapons Attachment UI Manager
      • Vehicles Mode Control
      • Show Values On Screen System
      • AI Mount Manager
      • Game Language Selector
      • Possession Override Objects System
      • Slider Info System
      • Actitvate Action On Characters On Scene
      • Graphic Quality Settings System
  • Additional Managers
    • 🧞‍♂️Prefabs Manager
      • Main Settings
      • Prefab Type List
      • Prefabs To Place On Scene List
      • Prefabs Searcher Options
    • 💰Main Inventory Manager (Inventory, Bank and Vendor)
      • Inventory List Manager
    • 🕳️Decal Manager
    • 🛻Pickup Manager
    • 👈Screen Objectives Manager
    • ❤️Health Bar Manager
    • 🤝External Shake List Manager
    • 🏴‍☠️Faction System Manager
    • 🎵Songs Manager
    • 🥏Noise Mesh Manager
    • 👻Set Transparent Surfaces Manager
    • 👿Damage On Screen Info Manager
    • ‼️Main Objective Manager
    • 💬Main Dialog Manager
      • Configure the Main Dialog Manager
    • 🔕Disable Objects On Distance System
    • 🎡Elements On Scene Manager
  • 🤖A.I System
    • AI Settings
    • AI Target Detection and Management
    • AI Attack Mode
    • AI Navigation
    • AI Patrol State
      • Tutorial - Configure Random Walk Movement on Attack Mode and Target Spotted on A.I
    • AI Melee System
    • AI Close Combat System
    • AI Abilities
  • Integrations
    • ➕Current Integrations
      • Emerald AI
      • Universal AI
      • Animal Controller
      • SoulLink Spawner
      • Easy Build System (EBS)
      • Randomation Vehicle Physics
      • Edy’s Vehicle System
      • Space Combat Kit
      • Mech Combat Kit
      • NWH Vehicle Physics 2
      • Dynamic Water Physics
      • Honor AI
      • UMA 2
      • DestroyIt
      • Silantro Flight Simulator Toolkit
      • Dialogue System for Unity
      • Interactor
      • iStep
    • 🔧Upcoming/In Progress
      • Ability & Combat Toolkit
      • Ork 3 Framework
  • Annex
    • 📖Changelog
      • GKC Update 3.03-3A
      • GKC Update 3.03-2
      • GKC Update 3.03-1
      • GKC Update 3.02g (Final)
      • GKC Update 3.02f
    • ‼️Possible Issues and Fixes
  • Support
  • Discord
  • Forum
  • Patreon
Powered by GitBook
On this page
  • What is Easy Build System?
  • Integration Steps
  • Step #1
  • Step #2
  • Step #3
  • Step #4
  • Step #5
  • Step #6

Was this helpful?

Export as PDF
  1. Integrations
  2. Current Integrations

Easy Build System (EBS)

This page covers the integration of Easy Build System (EBS) and Game Kit Controller.

PreviousSoulLink SpawnerNextRandomation Vehicle Physics

Last updated 3 years ago

Was this helpful?

What is Easy Build System?

Easy Build System is an advanced building system, easy to use and expandable. Fast and powerful to suit all of your building needs in all your games, works on any platforms!

Designed to work out-of-the-box, it includes several components like scalable conditions and add-ons, sockets, physics, blueprints, skins, save and load... etc

Support three view modes first, third and top-down view, works with the new Unity Input System and XR. Extend it or to customize it to fit your exact needs, even if you aren't a programmer.

Integration Steps

Follow these quick easy steps to integrate Easy Build System and Game Kit Controller.

Step #1

Open the scene called "[Desktop] First Person - Modular Building Demo" or any first person demo scenes in the EBS demos directory here: Assets/Easy Build System/Demos & Add-Ons/Demos and drop the GKC player prefab into the scene.

If the EBS demos directory doesn't exist in your project, you'll need to import them via the EBS package importer (Tools > Easy Build System > Package Importer > Import Demos & Add-Ons).

The GKC player prefab is located here: Assets/Game Kit Controller/Prefabs/Player Controller/Player And Game Management.prefab

Step #2

Next locate the Easy Build System - Demo First Person Controller EBA player controller GameObject in your project hierarchy and disable it.

Step #3

Select the Main Camera child GameObject of the Easy Build System - Demo First Person Controller GameObject. Then locate the Builder Behaviour component and copy it.

Step #4

Next up you want to locate the GKC Main Camera GameObject in your project hierarchy (Player And Game Management > Player Camera > Pivot Camera Transform > Main Camera Transform > Main Camera) and select the hamburger menu of an existing component, then press "Paste Component As New" to paste the Builder Behaviour component onto the GKC Main Camera.

Step #5

Still on the GKC Main Camera GameObject, got to the bottom of the inspector and press "Add Component" then we're going to create a new script, so enter GKCInputBehaviour and then select "Create and Add".

Open the newly created GKCInputBehaviour.cs script in your preferred editor, delete any existing content in the script so that it's empty, and paste in the code below.

You can also find a text copy of the GKCInputBehaviour script in "Assets/Game Kit Controller/Documentation/Integrations" in your project.

using EasyBuildSystem.Features.Scripts.Core.Base.Builder;
using EasyBuildSystem.Features.Scripts.Core.Base.Builder.Enums;
using EasyBuildSystem.Features.Scripts.Core.Base.Manager;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class GKCInputBehaviour : MonoBehaviour
{
    #region Fields

    public bool UseShortcuts = true;

    public KeyCode BuilderPlacementModeKey = KeyCode.E;
    public KeyCode BuilderDestructionModeKey = KeyCode.R;
    public KeyCode BuilderEditionModeKey = KeyCode.T;

    public KeyCode BuilderValidateModeKey = KeyCode.Mouse0;
    public KeyCode BuilderCancelModeKey = KeyCode.Mouse1;

    public int SelectedIndex { get; set; }

    public bool buildModeEnabled = true;

    #endregion

    #region Methods

    private void Update ()
    {
        if (!buildModeEnabled) {
            return;
        }

        if (UseShortcuts) {
            if (Input.GetKeyDown (BuilderPlacementModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.Placement);

            if (Input.GetKeyDown (BuilderDestructionModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.Destruction);

            if (Input.GetKeyDown (BuilderEditionModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.Edition);

            if (BuilderBehaviour.Instance.CurrentMode != BuildMode.Placement)
                UpdatePrefabSelection ();

            if (Input.GetKeyDown (BuilderCancelModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.None);
        }

        if (BuilderBehaviour.Instance.CurrentMode == BuildMode.Placement) {
            if (IsPointerOverUIElement ())
                return;

            if (Input.GetKeyDown (BuilderValidateModeKey))
                BuilderBehaviour.Instance.PlacePrefab ();

            float WheelAxis = Input.GetAxis ("Mouse ScrollWheel");

            if (WheelAxis > 0)
                BuilderBehaviour.Instance.RotatePreview (BuilderBehaviour.Instance.SelectedPrefab.RotationAxis);
            else if (WheelAxis < 0)
                BuilderBehaviour.Instance.RotatePreview (-BuilderBehaviour.Instance.SelectedPrefab.RotationAxis);

            if (Input.GetKeyDown (BuilderCancelModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.None);
        } else if (BuilderBehaviour.Instance.CurrentMode == BuildMode.Edition) {
            if (IsPointerOverUIElement ())
                return;

            if (Input.GetKeyDown (BuilderValidateModeKey))
                BuilderBehaviour.Instance.EditPrefab ();

            if (Input.GetKeyDown (BuilderCancelModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.None);
        } else if (BuilderBehaviour.Instance.CurrentMode == BuildMode.Destruction) {
            if (IsPointerOverUIElement ())
                return;

            if (Input.GetKeyDown (BuilderValidateModeKey)) {
                if (BuilderBehaviour.Instance.CurrentRemovePreview != null) {
                    BuilderBehaviour.Instance.DestroyPrefab ();
                }
            }

            if (Input.GetKeyDown (BuilderCancelModeKey))
                BuilderBehaviour.Instance.ChangeMode (BuildMode.None);
        }
    }

    private void UpdatePrefabSelection ()
    {
        float WheelAxis = Input.GetAxis ("Mouse ScrollWheel");

        if (WheelAxis > 0) {
            if (SelectedIndex < BuildManager.Instance.Pieces.Count - 1)
                SelectedIndex++;
            else
                SelectedIndex = 0;
        } else if (WheelAxis < 0) {
            if (SelectedIndex > 0)
                SelectedIndex--;
            else
                SelectedIndex = BuildManager.Instance.Pieces.Count - 1;
        }

        if (SelectedIndex == -1)
            return;

        if (BuildManager.Instance.Pieces.Count != 0)
            BuilderBehaviour.Instance.SelectPrefab (BuildManager.Instance.Pieces[SelectedIndex]);
    }

    /// <summary>
    /// Check if the cursor is above a UI element or if the circular menu is open.
    /// </summary>
    private bool IsPointerOverUIElement ()
    {
        if (Cursor.lockState == CursorLockMode.Locked)
            return false;

        if (EventSystem.current == null)
            return false;

        PointerEventData EventData = new PointerEventData (EventSystem.current)
        {
            position = new Vector2 (Input.mousePosition.x, Input.mousePosition.y)
        };

        List<RaycastResult> Results = new List<RaycastResult> ();
        EventSystem.current.RaycastAll (EventData, Results);
        return Results.Count > 0;
    }

    public void setBuildModeEnabledState (bool state)
    {
        buildModeEnabled = state;

        if (!buildModeEnabled) {
            BuilderBehaviour.Instance.ChangeMode (BuildMode.None);
        }
    }

    #endregion
}

Save the GKCInputBehaviour.cs script and return to Unity. You should now see something like the following:

Step #6

Next we're going to link up the Player Mode that'll be used when the player wants to enter build mode.

First select the Player Controller GameObject in your project hierarchy and locate the "Player Modes List" in the "Player States Manager" component.

Now you need to create two new events in the player mode you want the player to have the ability to build in. We're going to use an existing one for this example called "Simple Mode", but you can add a new player mode, or use another existing one if you'd prefer.

Expand your selected mode and add a new event to the "Activate Player Mode Event" list and one to the "Deactivate Player Mode Event" list. The function for both new events should be set to GKCInputBehaviour.setBuildModeEnabledState - Now tick the checkbox in the "Activate Player Mode Event" list and leave the checkbox unticked in the "Deactivate Player Mode Event" list.

Finally drag the Main Camera GameObject into the object field in both events you just created.

Note: A future version of the Easy Build System and Game Kit Controller integration will allow deeper integration with other systems of GKC like the inventory.

You can find more information about Easy Build System (EBS), it's documentation and also purchase it over on the .

That's it! Game Kit Controller is now integrated with Easy Build System (EBS) in your project. Hit play and change the player mode ("H" key by default) to the mode you added the events to above

Now if you'd excuse me, I have to go finish building my dream home that I'll never actually own in real life... but who needs real life when you can build anything you want in GKC!

➕
🥳
🙌
🏨
🌄
😎
Unity Asset Store