Hi,
I’ve been trying the new input system and so far I really like it! It’s hard to pick something specific, as I didn’t go truly in depth to experience the more complex new features but from the get-go: the general workflow with Action Maps/Actions, control schemes and the editable InputSettings asset which automatically generates interfaces to set things up, etc.
I’m quite eager for the hopefully more stable 1.0 version, too.
As for the problems, I’ve been writing down some I encountered (more on that later) – although with the work-in-progress documentation, it’s hard to tell what’s supposed to be working (and therefore is a bug) and what is still left to be implemented.
I guess the major problem I have is not being to able to register any input in WebGL build. It’s working fine in the Editor, the build reports something like:
The devicemotion events are blocked by feature policy.
The deviceorientation events are blocked by feature policy.
This is in Unity 2018.3.8f1, so judging by this thread , would it be working if I switched to the current 2019.1 beta?
The other big trouble I had was getting the horizontal movement axis working regardless of whether a keyboard or a gamepad is used. In the setup as seen above, the keyboard axis value went (correctly) from -1 to 1, but the gamepad was inverted (1 to -1) – I’m not sure why.
I tried a number of things, from switching the positive and negative key, adding processors (like Scale: -1 or Invert), swapping min/max values… which either didn’t really do anything or made the negative side always return zero.
In the end, I realised I just need to detect when the player is currently using a gamepad and inverted the value myself like:
float finalAxis = context.ReadValue<float>();
if (!Keyboard.current.anyKey.isPressed) finalAxis *= -1;
However, I wish I knew a better way than this.
I had problems with the “Hold” interaction, too – it immediately returned “performed” no matter what time I set up.
I ended up with “Press And Release” and calculating the time myself. I think this might be related to the following problem:One thing is that it doesn’t remember you overwriting the default value, but another thing (shared by interactions such as Scale etc.) is that I wasn’t able to enter a decimal value.
Isn’t this another problem with ‘decimal comma’ which the whole Package Manager seems to be currently having (case 1125027)?
In that case, I’d understand why it zeroes out all decimal values and as a result, immediately returns performed for Hold.
Then some minor stuff I wrote down:
- Generating a new script file always produces a (harmless) error:
Assertion failed on expression: 'GetAssetScriptingType(*m_RefreshQueue.begin()) != AssetScriptingType::Script'
UnityEditor.Experimental.AssetImporters.AssetImporterEditor:OnDisable()
- Doublicking a name (action map, action) to edit it while another name is already being edited at the moment results in only being able to write a single character at a time. Simply, losing focus doesn’t close the currently editable field.
Due to the image limit, I’ll continue in the next post.