Skip to content

Commit 2cd5c20

Browse files
committed
PR 2253 - xref updates
This is part of PR 2253; it replaces the `api` links with `xref`, and removes anchors from those links.
1 parent 180d98c commit 2cd5c20

132 files changed

Lines changed: 631 additions & 622 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Packages/com.unity.inputsystem/Documentation~/HowDoI.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ A collection of frequently asked questions, and where to find their answers in t
1414

1515
How do I...?
1616

17-
- [check if a specific key or button was pressed this frame?](../api/UnityEngine.InputSystem.Controls.ButtonControl.html#UnityEngine_InputSystem_Controls_ButtonControl_wasPressedThisFrame)
17+
- [check if a specific key or button was pressed this frame?](xref:UnityEngine.InputSystem.Controls.ButtonControl)
1818

19-
- [check if any key or button was pressed](../api/UnityEngine.InputSystem.InputSystem.html#UnityEngine_InputSystem_InputSystem_onAnyButtonPress)
19+
- [check if any key or button was pressed](xref:UnityEngine.InputSystem.InputSystem)
2020

21-
- [find all connected gamepads?](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_all)
21+
- [find all connected gamepads?](xref:UnityEngine.InputSystem.Gamepad)
2222

23-
- [find the gamepad that the player is currently using?](../api/UnityEngine.InputSystem.Gamepad.html#UnityEngine_InputSystem_Gamepad_current)
23+
- [find the gamepad that the player is currently using?](xref:UnityEngine.InputSystem.Gamepad)
2424

2525
- [know when a new device was plugged in?](monitor-devices.md)
2626

@@ -33,21 +33,21 @@ Use the same techniques shown for the "Jump" action in the [Workflows section](w
3333

3434
- [use a "positive" and a "negative" button to drive an axis?](configure-bindings-from-code.md#1d-axis)
3535

36-
- [create a UI to rebind input in my game?](../api/UnityEngine.InputSystem.InputActionRebindingExtensions.html)
36+
- [create a UI to rebind input in my game?](xref:UnityEngine.InputSystem.InputActionRebindingExtensions)
3737

38-
- [set up an Action to specifically target the left-hand XR controller?](../api/UnityEngine.InputSystem.XR.XRController.html#UnityEngine_InputSystem_XR_XRController_leftHand)
38+
- [set up an Action to specifically target the left-hand XR controller?](xref:UnityEngine.InputSystem.XR.XRController)
3939

40-
- [make my left-hand XR controller my right-hand one?](../api/UnityEngine.InputSystem.XR.XRController.html#UnityEngine_InputSystem_XR_XRController_leftHand)
40+
- [make my left-hand XR controller my right-hand one?](xref:UnityEngine.InputSystem.XR.XRController)
4141

4242
- [get all current touches from the touchscreen?](devices-touch.md#reading-all-touches)
4343

44-
- [deal with my gamepad data arriving in a format different from `GamepadState`?](../api/UnityEngine.InputSystem.LowLevel.GamepadState.html)
44+
- [deal with my gamepad data arriving in a format different from `GamepadState`?](xref:UnityEngine.InputSystem.LowLevel.GamepadState)
4545

4646
- [force the Input System to use my own layout when the native backend discovers a specific Device?](native-devices.md)
4747

4848
- [add deadzoning to my gamepad sticks?](query-gamepads.md#add-a-deadzone-to-a-gamepad)
4949

50-
- [give my head tracking an extra update before rendering?](../api/UnityEngine.InputSystem.XR.XRHMD.html)
50+
- [give my head tracking an extra update before rendering?](xref:UnityEngine.InputSystem.XR.XRHMD)
5151

5252
- [record events flowing through the system?](debugging.md#other-tips)
5353

Packages/com.unity.inputsystem/Documentation~/Installation.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,30 @@ uid: input-system-installation
33
---
44
# Installation guide
55

6-
- [Installation guide](#installation-guide)
7-
- [Installing the package](#installing-the-package)
8-
- [Enabling the new input backends](#enabling-the-new-input-backends)
9-
- [Installing samples](#installing-samples)
6+
This page describes how to install and activate the Input System package for your Unity Project.
107

11-
This guide describes how to install and activate the Input System package for your Unity Project.
8+
> [!NOTE]
9+
> This version of the new Input System requires the .NET 4 runtime. It doesn't work in projects using the old .NET 3.5 runtime.
10+
>
11+
> This package is only compatible with Unity Editor release versions 2021.3 and later. If you are working in a release version of the Editor prior to 2021.3, you need to use the package version that works with that version of the Editor, indicated by the **Release** tag in the [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui.html) window.
1212
13-
>__Note__: The new Input System requires Unity 2019.4+ and the .NET 4 runtime. It doesn't work in projects using the old .NET 3.5 runtime.
13+
## Install the package
1414

15-
## Installing the package
15+
To install the new Input System:
1616

17-
To install the new Input System, open Unity's package manager (menu: __Window > Package Manager__). Select the __Input System__ package from the list, then click __Install__.
17+
1. In the main menu of the Unity Editor, go to __Window__ > __Package Manager__ to open the Unity Package Manager.
1818

19-
![Install Input System Package](Images/InputSystemPackage.png)
19+
2. Select **Unity Registry** from the navigation panel.
2020

21-
## Enabling the new input backends
21+
3. Select the __Input System__ package from the list.
22+
23+
The Package Manager automatically selects that version to install by default.
24+
25+
4. Select __Install__, follow any prompts to [enable the backends](#) for the new Input System.
26+
27+
This package also provides several samples that demonstrate how to work with the new Input System, which are also available on the [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui.html) window. Refer to [Install samples](#install-samples).
28+
29+
## Enable the new input backends
2230

2331
By default, Unity's classic Input Manager (`UnityEngine.Input`) is active, and support for the new Input System is inactive. This allows existing Unity Projects to keep working as they are.
2432

@@ -28,16 +36,17 @@ When you install the Input System package, Unity will ask whether you want to en
2836

2937
You can find the corresponding setting in __Edit__ > __Project Settings__ > __Player__ > __Other Settings__ > __Active Input Handling__. If you change this setting you must restart the Editor for it to take effect.
3038

31-
>**Note:** You can enable __both__ the old __and__ the new system at the same time. To do so, set **Active Input Handling** to **Both**.
39+
> [!NOTE]
40+
> You can enable __both__ the old __and__ the new system at the same time. To do so, set **Active Input Handling** to **Both**.
3241
3342
![Active Input Handling](Images/ActiveInputHandling.png)
3443

3544
When the new input backends are enabled, the `ENABLE_INPUT_SYSTEM=1` C# `#define` is added to builds. Similarly, when the old input backends are enabled, the `ENABLE_LEGACY_INPUT_MANAGER=1` C# `#define` is added. Because both can be enabled at the same time, it is possible for __both__ defines to be 1 at the same time.
3645

37-
## Installing samples
46+
## Install samples
3847

3948
The Input System package comes with a number of samples. You can install these directly from the Package Manager window in Unity (__Window > Package Manager__). To see the list of samples, select the Input System package in the Package Manager window and click the __Samples__ tab. Then click __Import__ next to any sample name to import it into the current Project.
4049

4150
![Install Samples](Images/InstallSamples.png)
4251

43-
For a more comprehensive demo project for the Input System, see the [InputSystem_Warriors](https://github.com/UnityTechnologies/InputSystem_Warriors) GitHub repository.
52+
For a more comprehensive demo project for the Input System, see the [InputSystem_Warriors](https://github.com/UnityTechnologies/InputSystem_Warriors) GitHub repository.

Packages/com.unity.inputsystem/Documentation~/TrackedInputDevices.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Use the Tracked Pose Driver component to synchronize a __GameObject__'s transfor
1111

1212
| **Property** | **Description** |
1313
|-------------|-----------|
14-
|[`Tracking Type`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_trackingType)|Specify which transform properties (position, rotation, or both) to update based on the tracked data.|
15-
|[`Update Type`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_updateType)|Determine when updates to the transform occur within Unity's event loop, such as during rendering or gameplay.|
16-
|[`Ignore Tracking State`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_ignoreTrackingState)| Enable to ignore the tracking state and assume that the input pose is valid, even when flagged otherwise.|
17-
|[`Position Input`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_positionInput)|Set an input action that retrieves the position data (Vector3) of the tracked device.|
18-
|[`Rotation Input`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_rotationInput)| Set an input action that retrieves the rotation data (Quaternion) of the tracked device.|
19-
|[`Tracking State Input`](../api/UnityEngine.InputSystem.XR.TrackedPoseDriver.html#UnityEngine_InputSystem_XR_TrackedPoseDriver_trackingStateInput)|Set an input action that determines whether the tracking state (position or rotation) is valid (integer).|
14+
|[`Tracking Type`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)|Specify which transform properties (position, rotation, or both) to update based on the tracked data.|
15+
|[`Update Type`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)|Determine when updates to the transform occur within Unity's event loop, such as during rendering or gameplay.|
16+
|[`Ignore Tracking State`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)| Enable to ignore the tracking state and assume that the input pose is valid, even when flagged otherwise.|
17+
|[`Position Input`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)|Set an input action that retrieves the position data (Vector3) of the tracked device.|
18+
|[`Rotation Input`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)| Set an input action that retrieves the rotation data (Quaternion) of the tracked device.|
19+
|[`Tracking State Input`](xref:UnityEngine.InputSystem.XR.TrackedPoseDriver)|Set an input action that determines whether the tracking state (position or rotation) is valid (integer).|
2020

2121
## Tracked Device Raycaster
2222

@@ -28,8 +28,8 @@ The component also supports occlusion checks, custom ray distance limits, and fi
2828

2929
| **Property** | **Description** |
3030
|-------------|-----------|
31-
|[`Ignore Reversed Graphics`](../api/UnityEngine.InputSystem.UI.TrackedDeviceRaycaster.html#UnityEngine_InputSystem_UI_TrackedDeviceRaycaster_ignoreReversedGraphics)| Enable to ignore graphics whose normal faces away from the direction of the ray.|
32-
|[`Check For 2D Occlusion`](../api/UnityEngine.InputSystem.UI.TrackedDeviceRaycaster.html#UnityEngine_InputSystem_UI_TrackedDeviceRaycaster_checkFor2DOcclusion)|Enable occlusion checks for 2D objects, such as sprites in the scene.|
33-
|[`Check For 3D Occulusion`](../api/UnityEngine.InputSystem.UI.TrackedDeviceRaycaster.html#UnityEngine_InputSystem_UI_TrackedDeviceRaycaster_checkFor3DOcclusion)|Enable occlusion checks for 3D objects to prevent rays from passing through physical geometry.|
34-
|[`Max Distance`](../api/UnityEngine.InputSystem.UI.TrackedDeviceRaycaster.html#UnityEngine_InputSystem_UI_TrackedDeviceRaycaster_maxDistance)|Set the maximum ray distance for interaction detection in world space coordinates.|
35-
|[`Blocking Mask`](../api/UnityEngine.InputSystem.UI.TrackedDeviceRaycaster.html#UnityEngine_InputSystem_UI_TrackedDeviceRaycaster_blockingMask)|Define the layer mask used to check for occlusion when ray casting.|
31+
|[`Ignore Reversed Graphics`](xref:UnityEngine.InputSystem.UI.TrackedDeviceRaycaster)| Enable to ignore graphics whose normal faces away from the direction of the ray.|
32+
|[`Check For 2D Occlusion`](xref:UnityEngine.InputSystem.UI.TrackedDeviceRaycaster)|Enable occlusion checks for 2D objects, such as sprites in the scene.|
33+
|[`Check For 3D Occulusion`](xref:UnityEngine.InputSystem.UI.TrackedDeviceRaycaster)|Enable occlusion checks for 3D objects to prevent rays from passing through physical geometry.|
34+
|[`Max Distance`](xref:UnityEngine.InputSystem.UI.TrackedDeviceRaycaster)|Set the maximum ray distance for interaction detection in world space coordinates.|
35+
|[`Blocking Mask`](xref:UnityEngine.InputSystem.UI.TrackedDeviceRaycaster)|Define the layer mask used to check for occlusion when ray casting.|

Packages/com.unity.inputsystem/Documentation~/about-layouts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A layout has two primary functions:
2121
* Describe a certain memory layout containing input data.
2222
* Assign names, structure, and meaning to the Controls operating on the data.
2323

24-
A layout can either be for a Control on a Device (for example, `Stick`), or for a Device itself (that is, anything based on [`InputDevice`](../api/UnityEngine.InputSystem.InputDevice.html)).
24+
A layout can either be for a Control on a Device (for example, `Stick`), or for a Device itself (that is, anything based on [`InputDevice`](xref:UnityEngine.InputSystem.InputDevice)).
2525

26-
The Input System only loads layouts when they are needed (usually, when creating a new Device). To manually load a layout, you can use [`InputSystem.LoadLayout`](../api/UnityEngine.InputSystem.InputSystem.html#UnityEngine_InputSystem_InputSystem_LoadLayout_System_String_). This returns an [`InputControlLayout`](../api/UnityEngine.InputSystem.Layouts.InputControlLayout.html) instance, which contains the final, fully merged (that is, containing any information inherited from base layouts and/or affected by layout overrides) structure of the layout.
26+
The Input System only loads layouts when they are needed (usually, when creating a new Device). To manually load a layout, you can use [`InputSystem.LoadLayout`](xref:UnityEngine.InputSystem.InputSystem). This returns an [`InputControlLayout`](xref:UnityEngine.InputSystem.Layouts.InputControlLayout) instance, which contains the final, fully merged (that is, containing any information inherited from base layouts and/or affected by layout overrides) structure of the layout.
2727

28-
You can register new layouts through [`InputSystem.RegisterLayout`](../api/UnityEngine.InputSystem.InputSystem.html#UnityEngine_InputSystem_InputSystem_RegisterLayout_System_String_System_String_System_Nullable_UnityEngine_InputSystem_Layouts_InputDeviceMatcher__).
28+
You can register new layouts through [`InputSystem.RegisterLayout`](xref:UnityEngine.InputSystem.InputSystem).

Packages/com.unity.inputsystem/Documentation~/about-project-wide-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Once you have created and assigned project-wide actions, the Input System Packag
2020

2121
## Using project-wide actions in code
2222

23-
The benefit of assign an Action Asset as the project-wide actions is that you can access the actions directly through the [`InputSystem.actions`](../api/UnityEngine.InputSystem.InputSystem.html) property directly, rather than needing to set up a reference to your Action Asset first.
23+
The benefit of assign an Action Asset as the project-wide actions is that you can access the actions directly through the [`InputSystem.actions`](xref:UnityEngine.InputSystem.InputSystem) property directly, rather than needing to set up a reference to your Action Asset first.
2424

2525
For example, you can get a reference to an action named "Move" in your project-wide actions using a line of code like this:
2626

Packages/com.unity.inputsystem/Documentation~/about-user-management.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ uid: input-system-user-management-about
44

55
# About user management
66

7-
The Input System supports multi-user management through the [`InputUser`](../api/UnityEngine.InputSystem.Users.InputUser.html) class. This comprises both user account management features on platforms that have these capabilities built into them (such as Xbox and PS4), as well as features to manage Device allocations to one or more local users.
7+
The Input System supports multi-user management through the [`InputUser`](xref:UnityEngine.InputSystem.Users.InputUser) class. This comprises both user account management features on platforms that have these capabilities built into them (such as Xbox and PS4), as well as features to manage Device allocations to one or more local users.
88

99
>__Note__: The user management API is quite low-level in nature. The stock functionality of Player Input Manager component (see [Player Input Manager](player-input-manager-component.md)) provides an easier way to set up user management. The API described here is useful when you want more control over user management.
1010
11-
In the Input System, each [`InputUser`](../api/UnityEngine.InputSystem.Users.InputUser.html) represents a human interacting with the application. For example, you can have multiple users playing a game together on a single computer or device (local multiplayer), where each user has one or more [paired Input Devices](#device-pairing).
11+
In the Input System, each [`InputUser`](xref:UnityEngine.InputSystem.Users.InputUser) represents a human interacting with the application. For example, you can have multiple users playing a game together on a single computer or device (local multiplayer), where each user has one or more [paired Input Devices](#device-pairing).
1212

13-
The [`PlayerInputManager`](player-input-manager-component.md) class uses [`InputUser`](../api/UnityEngine.InputSystem.Users.InputUser.html) internally to handle users.
13+
The [`PlayerInputManager`](player-input-manager-component.md) class uses [`InputUser`](xref:UnityEngine.InputSystem.Users.InputUser) internally to handle users.
1414

1515
>__Note__: In the editor, all `InputUser` instances are automatically removed when exiting play mode thus also removing any device pairings. In essence, `InputUser` is considered a player-only API.

Packages/com.unity.inputsystem/Documentation~/add-custom-device-command.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ uid: input-system-add-custom-device-command
44

55
# Add a custom device command
66

7-
To create custom Device commands (for example, to support some functionality for a specific HID), create a `struct` that contains all the data to be sent to the Device, and add a [`typeStatic`](../api/UnityEngine.InputSystem.LowLevel.IInputDeviceCommandInfo.html#UnityEngine_InputSystem_LowLevel_IInputDeviceCommandInfo_typeStatic) property to make that struct implement the [`IInputDeviceCommandInfo`](../api/UnityEngine.InputSystem.LowLevel.IInputDeviceCommandInfo.html) interface. To send data to a HID, this property should return `"HIDO"`.
7+
To create custom Device commands (for example, to support some functionality for a specific HID), create a `struct` that contains all the data to be sent to the Device, and add a [`typeStatic`](xref:UnityEngine.InputSystem.LowLevel.IInputDeviceCommandInfo) property to make that struct implement the [`IInputDeviceCommandInfo`](xref:UnityEngine.InputSystem.LowLevel.IInputDeviceCommandInfo) interface. To send data to a HID, this property should return `"HIDO"`.
88

9-
You can then create an instance of this struct and populate all its fields, then use [`InputDevice.ExecuteCommand<TCommand>`](../api/UnityEngine.InputSystem.InputDevice.html#UnityEngine_InputSystem_InputDevice_ExecuteCommand__1___0__) to send it to the Device. The data layout of the struct must match the native representation of the data as the device interprets it.
9+
You can then create an instance of this struct and populate all its fields, then use [`InputDevice.ExecuteCommand<TCommand>`](xref:UnityEngine.InputSystem.InputDevice) to send it to the Device. The data layout of the struct must match the native representation of the data as the device interprets it.

0 commit comments

Comments
 (0)