Incontrol unity multiplayer1/26/2024 ![]() ![]() ![]() My goal is ultimately to setup a default control scheme then allow the user to swap bindings without causing something to become unmapped or mapped multiple times. Not sure why I'm having so much trouble wrapping my head around this. Do I need to essentially loop through all of my defined actions and check for the relevant binding? I'm mostly trying to understand when/how I would find and store the existing binding (if it already exists elsewhere), release the binding from the selected action (this step optional?), apply the new binding to the selected action, then apply the stored binding to the action. So, just to make sure I accurately understand, if OnBindingFound fires when I'm listening for a binding, that means that InControl found an existing binding or that availability for binding is available? The "binding" argument when OnBindingFound was called didn't seem to have much info. Just make sure to add "using InControl " at the top of the c# file (or "import InControl " if it's JavascriptĬlick to expand.It's a full list of customizable bindings. Then i found out i can set it ion the input manager directly using this code At first i tried changing the InvertYAxis variable in the Incontrol Manager itself, but for that to take effect, i had to turn it on and off, which causes an error (see next post) because the InvertYAxis is set OnEnable. This was useful because i have an unsupported Nimbus controller that work sgreat on ipad and worked on MAc but the Y axis was reversed (for UI, joysticks, etc). ![]() I didn't know there was a Unity 5.6.5! Cool.īTW unrelated but if it helps anyone, i also added a button in my options that inverts the Y axis in Incontrol itself. It makes my gamepad work on Mac and on Ipad it runs great too, so even though it says Beta it seems to be pretty mature. i leave it checked all the time and i read somewhere that it disables itself automatically on platforms that don't support it anyways. The reason I'm asking is that the game would feel much more responsive if I could for example process 120 inputs per second independent from the updates for the visual representation (Unity's Update())Ĭlick to expand.I'm using Enable Native input for Mac. But I don't know how to deal with inputs more frequently than the Update() function is called. Or is there no easy way and I should try to edit parts of the source code to get more performance for the input update?Ģ.) Is there a way to decouple the update for pulling for input from Unity's update function? I've read that Unity pulls the newest inputs from devices at the start of the Update function, but since you must have a lot of experience on how this works, could you give any insights on this topic? I would be great to decouple the functional update loop from the visual representation and I already have a similar system working. Thank you for your reply on my last question, it really helped a lot.ġ.) Is there a quick way to optimize performance for the InputManager update? It does take quite a lot of cpu time if there are many PlayerActionSets active at once. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |