Is the recommended action response format efficient for things like looking around with the mouse?

I just tested this myself, the faster the mouse moves the more it triggers the event. I get an average of 2 for my current game, but it is up to 8 that I can see.

Yes it doesn’t make any sense and is not clear enough. After testing all the update setting it appears that no matter what I do I cannot get it to only trigger once per frame, even calling InputSystem.Update() manually. I am also testing which phase the event is in as per this post and it is triggering the performed event multiple times per frame.

This leads me to conclude that my original statement still holds true, cache the value and use it in Update instead. Setting a Vector2 or a float 8 times per frame is trivial.

For the record, with profiling my player script update takes 0.00ms as well as the InputSystem event processing taking 0.00ms.

Maybe @Rene-Damm can clarify more on this and tell us why it would trigger 8 times per frame.

The first bit of code I posted is how you get that reference using the created class that matches the name of the InputActionAsset you created. It creates properties for each ActionMap that has properties for each InputAction that you can reference for convenience. PlayerInput is a wrapper around doing that, only it doesn’t need it to be a class and uses the InputActionAsset directly. You only need the class if you are not using PlayerInput.

This is completely subjective. It’s entirely dependent on the type of project. Some projects will be looking for every possible avenue to reduce frame time like VR, which will still need responsive input. Others will not care and just want it simplified because it does really matter. Unity will focus on the simple, while allowing for more customization/optimization for those searching for it. After all VR or high end graphics are not a beginner thing.

I agree it is lacking and difficult to find what you are looking for. That being said the system is not as hard to figure out for someone with more advanced skills or experience. In my 16+ years of programming experience this system is a god send compared to the old one. More like what Unreal has, not to compare really just that its more modern and modern programmers should be better educated or more experienced. Novice programmers/developers tend to create badly programmed games, and if Unity focuses on ease of use(artist focused) maybe that can change. Until then the programmers have to take up the slack.

I whole heartedly agree with you there. It isn’t a verified package though, so there is that. Then again the InputSystem is and the docs need a bit of a makeover.

1 Like