New answers tagged

1

I found the answer online! I had to go to the editor preferences (Edit -> Preferences) and under External Tools, there's a section with checkboxes under "Generate .csproj files for:." All I had to do was check "Registry Packages," click Regenerate project files, and it worked! Thanks to everyone who tried to help, I hope this ...


0

I would suggest making a visual representation of what your joystick or D-pad is doing, so you can "see" your different input strategies. You could make a plane that lights up in segments in front, to the side, to the rear, when you use the joystick (or D-pad). I made an illustration with colored squares, you could light them up based on input. In ...


1

First, change your event trigger. Right now you have both "Set Down State" and "Set Up State" called from the "Pointer Down" event. You want to remove "Set Up State" from this event. Add a second event that listens for "Pointer Up" and attach your "Set Up State" to that one instead. Then you want to ...


1

The new input system makes this very easy. Just create an input actions asset with a different action map for each input mode. If you prefer to work with the auto-generated mapping classes for each input asset, then you can just enable and disable those input actions separately. This can look like this (assuming your input action assets is named "My ...


-1

You could just use the Unity Input System. It is designed to handle contextual mappings, remappings, and support for multiple input methods. https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/QuickStartGuide.html


2

First, let's look at the doc for SDL_PollEvent, specifically the example code provided: while (1) { SDL_Event event; while (SDL_PollEvent(&event)) { /* handle your event here */ } /* do some other stuff here -- draw your app, etc. */ } and the remarks: If event is not NULL, the next event is removed from the queue and stored in ...


Top 50 recent answers are included