- Home /
Input Handling for asset store scripts
Hello,
I'm trying to understand whats the best most flexible practice when it comes to handling input for shareable scripts or asset store scripts.
I mostly always use the unity input manager and use GetButton() functions.
However I made a script that i intend to upload, in the project i have already setup all the buttons and axes both for joystick and keyboard/mouse that I'm using and tuned them to my liking, but ofc i realize someone else using this script wont have those axes and buttons setup, and the script would throw errors.
So now I need to somehow set up input in a way that anyone using the script would automatically be able to use it as intended without needing to setup input, but I also want to allow changing button assignments (so GetKey might not be so ideal).
I really want the joystick to be usable immediately as this script is primary intended for joystick inputs.
So what can I do to allow this simple script to be shareable across projects, the input to initially be as i set it up but also allow users to change settings for axes and button inputs, and possibly for the users to integrate the controls into their own custom input manager scripts easily?
Thank you.
Answer by Arpi01 · Jul 25, 2019 at 11:31 PM
What i have seen people do is that they upload their input settings along the package so the buyer con download it too, also including it in the readMe file would be a good idea
Your answer
Follow this Question
Related Questions
Two Horizontal Movement Axes Behaving Differently 1 Answer
what are the single joystick prefab's inputs for the input manager 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
Create new InputManager entry? 2 Answers
Input.GetAxis returning nonsensical values for HID Sensor/GameController 0 Answers