Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.42k stars 306 forks source link

DOCS: improve migration docs #1933

Closed duckets closed 1 month ago

duckets commented 3 months ago

Description

https://jira.unity3d.com/browse/DOCF-5410 Clarify and simplify page so that new system does not look more complex than old system.

Changes made

Added text & screenshot explaining differences between systems (eg named axes vs actions) Improved formatting of tables and links. Move code samples to linked pages. Group by theme. Move most common API to top. Show examples of functions with parameters. Remove namespaces where not necessary.

Notes:

Because of the large diff, it may be easier to review the page by viewing the entire formatted page here: https://github.com/Unity-Technologies/InputSystem/blob/8908df2e3dade953d1b3808eb1a9474d6e2f3a97/Packages/com.unity.inputsystem/Documentation%7E/Migration.md

lyndon-unity commented 2 months ago

We seem to lack migration info for GetPenEvent, GetLastPenContactEvent, ResetPenEvents, ClearLastPenContactEvent

All could refer to Pen.current

lyndon-unity commented 2 months ago

I also think imeCompositionMode should refer to Keyboard.current.SetIMEEnabled(true);

Currently Input.imeIsSelected refers to both Keyboard.current.imeSelected and Keyboard.current.SetIMEEnabled(true); I think this should only refer to Keyboard.current.imeSelected

lyndon-unity commented 2 months ago

Some issues remain with KeyControl.displayName being referenced - This field is in InputControl (which KeyControl inherits from)

isPressed in Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs Line 147wasPressedThisFrame in Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs Line 185 wasReleasedThisFrame in Packages/com.unity.inputsystem/InputSystem/Controls/ButtonControl.cs Line 21