1
This commit is contained in:
@@ -3,6 +3,8 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
public static partial class InputSystemExtensions
|
||||
@@ -18,6 +20,15 @@ namespace BITKit
|
||||
self.canceled += action;
|
||||
return self;
|
||||
}
|
||||
|
||||
public static string GetKeyMap(this InputAction self)
|
||||
{
|
||||
return string.Join("|", self.bindings.Select(x=>x.path.Split("/").Last().ToUpper()));
|
||||
}
|
||||
public static string GetKeyMap(this InputActionReference self)
|
||||
{
|
||||
return string.Join("|", self.action.bindings.Select(x=>x.path.Split("/").Last().ToUpper()));
|
||||
}
|
||||
public static InputAction UnRegisterCallback(this InputAction self, Action<InputAction.CallbackContext> action)
|
||||
{
|
||||
self.performed -= action;
|
||||
|
Reference in New Issue
Block a user