Basically, I am trying to add in a ‘Ctrl + Scrollwheel’ input to change a variable up for a positive scroll or down for a negative scroll in an editor script that i am creating.
What is the best way to approach this input combination for the editor?
Everything i have looked up mostly refers to adding a Ctrl activation to a menu item and this is not what i am looking for.
~EDIT~
Upon further searching, i have stumbled upon code references that may be useful, but i can’t seem to get them to work to do what i need. There is a bool variable named ‘modifier’ declared with the other variables as well one called inc which i am using to try and limit the scroll wheel to only one call per scroll.
Event e = Event.current;
if (e.isScrollWheel && e.control) {
if (e.delta.y == 3 && inc)
{
Debug.Log(e.delta.y);
selectedPrefabNum -= 1;
inc = false;
}
else if (e.delta.y == -3 && inc)
{
Debug.Log(e.delta.y);
selectedPrefabNum += 1;
inc = false;
}
}