- Home /
EZ GUI Scrollwheel Error
Hello All; I'm using EZ GUI to make some simple custom buttons. I completed a couple of projects recently which had EZ GUI elements and all was good. Other projects EZ GUI elements were left out because they simply wouldn't work. So here's the latest...suddenly I'm getting; "Unity Exception: Input Axis Mouse ScrollWheel is not setup". >I go to Edit>Project Settings>Input and set the Axis on my Fire1 input setup to 3rd axis for Joysticks and Scrollwheel to no success. It's a show-stopper. The scene runs, but no action on any buttons throughout the project. The error points to the UIManager.cs script line 1796:
float scrollDelta = Input.GetAxis("Mouse ScrollWheel");
The whole script is way too large to include. I'm not trying to scroll or zoom. Just using some sprite buttons with UIBtn Load Scene script or and a Player1 key input setup in a different scene. Seems like it worked until I set up the Player1 input secondly. The key input works fine. (I've tried to edit out the Scrollwheel references, but that's a cannibalistic edit.)The EZ GUI setup...not so fine. Has anyone else had and resolved this problem? Thanks
Answer by Lo0NuhtiK · Jan 25, 2012 at 11:20 AM
Well, in your code you're using Axis "Mouse ScrollWheel" which is an axis already in the input area, but you also say you set your "Fire1" input up for using the scrollwheel for some reason too, even though you arent using Fire1 in your code for it... ??
...Anyway, leave the code as it is for a minute, and go back into your Edit-ProjSetting-Input, and find Mouse ScrollWheel , then click on the checkbox next to "Snap" and see if your error goes away.
I threw a debug into a script a few seconds ago with nothing but
function Update(){
if(Input.GetAxis("Mouse ScrollWheel")){
Debug.Log("Scrolled") ;
}
}
in it, and got the same error you're getting when the script was compiling. So I just went in the input stuff and clicked that checkbox for the hell of it, and now it works checked or un-checked. Maybe yours is just screwy like mine was.
@Lo0Nuhti$$anonymous$$ An 'A' for effort! But it didn't work. The 'Snap' box was checked by default, so I tried different combinations of checked/unchecked, plus inverted and 3rd Axis selected or not. The error persists. I even rebuilt the project scene on my PC,ins$$anonymous$$d of $$anonymous$$AC and ended up at the same stop sign. I am using Fire1 to control the button events. Player1 is in a different scene and controls a player. There are a couple of EZ GUI buttons also in that scene. I've used this combo many times in past with no problemo. Testing further I built a dummy new project, scene with just EZ GUI buttons and it worked no errors as I suspected. I went back to the problem scene and added a GUI button right next to the EZ GUI button. The GUI button worked, no errors. So it seems like EZ GUI is suddenly not at ease with a second input setup! The only reason I set up the scrollwheel was because of the error. I've no plans to utilize the scrollwheel at all.
Lol The snap-box in $$anonymous$$e was unchecked when I went to my input settings, and I hadn't ever messed with it before earlier today. ...Still even more weird that I got the same error Unity Exception: Input Axis $$anonymous$$ouse ScrollWheel is not setup" that you had posted above before I checked/unchecked that box.
I also don't have that ez gui stuff you're talking about.
Your answer
Follow this Question
Related Questions
Input Scroll Wheel And Vertical Axis Work Together? 0 Answers
Is it possible to distinguish between mouse and trackpad scroll? 3 Answers
Input.GetKeyUp for Axis input 2 Answers
Can Input.GetAxis be used without assigning via the Input Manager? 1 Answer
How to use Trackpoint middle mouse button for scrolling, 1 Answer