Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Mar 29, 2014 at 10:32 PM by getyour411 for the following reason:

The question is answered, right answer was accepted

avatar image
5
Question by DMCH · Jun 25, 2013 at 06:56 PM · runtimecontrolsinputmanagerbind

Possible to remap input manager buttons/axes at runtime?

Hello,

Thanks for reading. The basic question is: Is it possible to change to change what keys are mapped to a particular axis/button in the input manager at runtime? I've attached a screenshot of the controls I'm trying to remap. One is an axis, called vertical. The other is a button called fire.

I've also included an example of the code for checking if a button/axis is being pressed for movement or shooting in-game. I haven't added controller support yet, but I'd like a solution that won't prevent it from being added later. Thanks

 if(Input.GetButtonDown("Fire1"))
 {
    // Do something
 }
 
 InputMovement = new Vector3(Input.GetAxis("Horizontal"), 0 ,Input.GetAxis("Vertical"));

EDIT 1: Looks like this feature may not be available. Has it been added? http://answers.unity3d.com/questions/184700/how-to-access-input-manager-via-scripting.html

alt text

inputmanager.png (11.4 kB)
Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Loius · Jun 27, 2013 at 06:55 AM 0
Share

There are lots of input managers on the asset store. There used to be only a few, so I made one with the functionality they were missing. Now there's a lot more competition. Pffthhgh. :)

avatar image Benproductions1 · Jun 27, 2013 at 12:26 PM 0
Share

Duplicate question....
Answer: No

Workaround: already stated

avatar image amphoterik · Jun 27, 2013 at 12:28 PM 0
Share

The closest thing to what you want (besides third party) is the users ability to change the inputs when they launch the game.

avatar image artie · Mar 29, 2014 at 10:29 PM 0
Share

If people can write their own input managers, that gets around the problem. How does one write an input manager?

avatar image getyour411 · Mar 29, 2014 at 10:32 PM 1
Share

Please don't necro post something like that. Ask a general design question like that on Unity Forums.

Show more comments

1 Reply

  • Sort: 
avatar image
3
Best Answer

Answer by dorpeleg · Jun 27, 2013 at 06:09 AM

This has been asked a lot.

It is currently not possible.

The only way to do it, is to create your own input manager.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image omar_u · Sep 24, 2017 at 01:49 AM 0
Share

$$anonymous$$nock knock.

4 years and counting?

This is definitely something that the Unity development $$anonymous$$m should address. Any movement or roadmap for this?

Unity projects have different configurations and not being able to mix the project settings or especially the input settings between two scenes from two different projects makes it more difficult to work with Unity.

Thanks. Omar

avatar image Gravijta omar_u · Oct 09, 2017 at 06:19 PM 1
Share

Hi Omar,

As others have said, the best solution is to use a 3rd party Input $$anonymous$$anager. There are quite a few on the Asset Store and some are free. If you'd like to create your own you can use this code to get you started however I have yet to find a way to map joystick axes in run-time.

 $$anonymous$$eyCode thrust = $$anonymous$$eyCode.None;

 void Assign$$anonymous$$ey()
 {
     if (thrust == $$anonymous$$eyCode.None)
     {
         foreach ($$anonymous$$eyCode kcode in Enum.GetValues(typeof($$anonymous$$eyCode)))
         {
             if (Input.Get$$anonymous$$eyDown(kcode))
             {
                 thrust = kcode;
             }
         }
     }
 }
 void Thrust()
 {
     if (Input.Get$$anonymous$$ey(thrust) == true)
     {
         
         myT.position += myT.forward * movementSpeed * Time.deltaTime;
     }
 }
avatar image idbrii omar_u · Apr 02, 2018 at 11:47 PM 1
Share

Any movement or roadmap for this?

Yup. They first announced plans in 2016 and discussed the redesign setback in 2017 (and released builds too).

Current status: still under heavy development.

Follow this Question

Answers Answers and Comments

25 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Using UI Button to trigger button down?? 0 Answers

How to edit an InputManager Axis' values through scripting? 1 Answer

Export objects to a .3DS file at runtime 1 Answer

How to change controls in-game? 0 Answers

Input controls at run time reset to duplicate controls, why does this happen? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges