Good news! To provide faster support and grow the community, we'll be changing the forum to "Read Only" and turn to Discord instead for support.
Join here:

Easy Input Input Handler

Posts: 223
Joined: Sun Sep 25, 2016 5:38 am

Easy Input Input Handler

Postby nathanj » Tue Aug 08, 2017 11:39 pm

Hey, Everyone

Here is a custom Input handler to work with Ootii's Easy Input. Note that this script requires that Easy Input has a unique Tag of "EasyInput"

I'm working on a Trigger Item Handler but for some reason it's not working. I'll post it when it's done.

Code: Select all

/// <summary>
/// This script provides a custom input handler for Devdog's Inventory Pro and Quest System Pro.
/// </summary>

using Devdog.General;
using System;
using System.Collections.Generic;
using Devdog.General.UI;
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.EventSystems;
using com.ootii.Input;

namespace VS.ootii.Input
    public class EasyInputInputHandler : TriggerInputHandler

        public string ootiiActionName = "ActionAlias";
        private Transform _eiTransform;
        private Sprite uiIcon;
        public EasyInputSource _input;
        private InputAlias _alias;

        public override void Awake()
            //this method will assign EasyInput component to an instance of a Gameobject
            if (_input == null)
                _input = GameObject.FindGameObjectWithTag("EasyInput").GetComponent<com.ootii.Input.EasyInputSource>();

            //search each of the input alias to see if one of them is named after our public string "PickupItem". If so, assign _alias to that instance
            foreach (InputAlias _DAA in _input.DefaultActionAliases)
                if (_DAA.Name == ootiiActionName)
                    _alias = _DAA;
                    _alias.Name = ootiiActionName;

        public override bool AreKeysDown()
            if (triggerKeyCode == KeyCode.None)
                return _input.IsJustPressed(_alias.Name);

            return UnityEngine.Input.GetKeyDown(triggerKeyCode);

        public override string ToString()
            return ootiiActionName;

User avatar
Posts: 1
Joined: Thu Dec 21, 2017 10:07 am

Re: Easy Input Input Handler

Postby DonAlonso(DoubleHelix) » Thu Dec 28, 2017 8:58 am

Hi @nathanj,

Would you happen to have an updated version of this script?

best regards,


Return to “Share custom components”

Who is online

Users browsing this forum: No registered users and 1 guest