Search Unity

Unity2D Kit

Discussion in 'Package Manager' started by BadriRusadze, Feb 7, 2020.

  1. BadriRusadze

    BadriRusadze

    Joined:
    May 17, 2019
    Posts:
    27
    Hello Guys,

    i want to add mobile controls to unity´s 2d game kit, so in playerinput i have

    Code (CSharp):
    1. namespace Gamekit2D
    2. {
    3.     public class PlayerInput : InputComponent, IDataPersister
    4.     {
    5.         public static PlayerInput Instance
    6.         {
    7.             get { return s_Instance; }
    8.         }
    9.  
    10.         protected static PlayerInput s_Instance;
    11.    
    12.    
    13.         public bool HaveControl { get { return m_HaveControl; } }
    14.  
    15.         public InputButton Pause = new InputButton(KeyCode.Escape, XboxControllerButtons.Menu);
    16.         public InputButton Interact = new InputButton(KeyCode.E, XboxControllerButtons.Y);
    17.         public InputButton MeleeAttack = new InputButton(KeyCode.K, XboxControllerButtons.X);
    18.         public InputButton RangedAttack = new InputButton(KeyCode.O, XboxControllerButtons.B);
    19.         public InputButton Jump = new InputButton(KeyCode.Space, XboxControllerButtons.A);
    20.         public InputAxis Horizontal = new InputAxis(KeyCode.D, KeyCode.A, XboxControllerAxes.LeftstickHorizontal);
    21.         public InputAxis Vertical = new InputAxis(KeyCode.W, KeyCode.S, XboxControllerAxes.LeftstickVertical);
    i want to add ui button and i want to make that button do
    Code (CSharp):
    1. public InputButton Pause = new InputButton(KeyCode.Escape, XboxControllerButtons.Menu);
    This.

    Please Help im new to unity
     
  2. ethan_jl_unity

    ethan_jl_unity

    Unity Technologies

    Joined:
    Sep 27, 2018
    Posts:
    104
    Hi there,

    This is the Package Manager sub forum which is a good place for issues related to the Package Manager itself.

    For questions relating to a specific package, it's best to ask in their corresponding sub forum.

    Have you tried the 2D sub forum?

    Best,
    Ethan