-
Notifications
You must be signed in to change notification settings - Fork 340
DOCS: Move hardcoded code examples to testable files #2472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ChoshikaBagratee
wants to merge
10
commits into
develop
Choose a base branch
from
docatt-11021-move-hardcoded-code-examples
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7c9abaa
Add UsingActionsWorkflow.cs files
ChoshikaBagratee 2cd98fb
Update UsingActionsWorkflowExamples.cs
ChoshikaBagratee bbe5f73
Fix code sample path
ChoshikaBagratee c84ae43
Add testable files
ChoshikaBagratee eb2f4b7
Merge branch 'docatt-11021-move-hardcoded-code-examples' of https://g…
ChoshikaBagratee 910b276
add .cs files
ChoshikaBagratee 8a42ed2
Add .cs files
ChoshikaBagratee f559f60
Add .cs files
ChoshikaBagratee f6bd4e0
add files
ChoshikaBagratee 3fec92f
fix errors
ChoshikaBagratee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+701 Bytes
ExternalSampleProjects/InputDeviceTester/Library/BurstCache/JIT/BurstCacheManifest.cm
Binary file not shown.
31 changes: 31 additions & 0 deletions
31
ExternalSampleProjects/InputDeviceTester/Library/EditorGridSettings.asset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &1 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 53 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 15011, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_Name: | ||
| m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.GridSettings | ||
| m_ActiveModeIndex: 0 | ||
| m_GridModes: | ||
| - rid: 35489430871212034 | ||
| - rid: 35489430871212035 | ||
| m_GridSize: {x: 1, y: 1, z: 1} | ||
| m_GridMultiplier: 0 | ||
| references: | ||
| version: 2 | ||
| RefIds: | ||
| - rid: 35489430871212034 | ||
| type: {class: WorldGridMode, ns: UnityEditor, asm: UnityEditor.CoreModule} | ||
| data: | ||
| - rid: 35489430871212035 | ||
| type: {class: CustomGridMode, ns: UnityEditor, asm: UnityEditor.CoreModule} | ||
| data: | ||
| m_Position: {x: 0, y: 0, z: 0} | ||
| m_Rotation: {x: 0, y: 0, z: 0, w: 1} |
22 changes: 22 additions & 0 deletions
22
ExternalSampleProjects/InputDeviceTester/Library/EditorSnapSettings.asset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &1 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 53 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 13954, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_Name: | ||
| m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.EditorSnapSettingsData | ||
| m_SnapEnabled: 0 | ||
| m_AngleSnapEnabled: 0 | ||
| m_ScaleSnapEnabled: 0 | ||
| m_SnapSettings: | ||
| m_SnapToGrid: 1 | ||
| m_Rotation: 15 | ||
| m_Scale: 1 | ||
| m_IncrementalSnapSize: {x: 0.25, y: 0.25, z: 0.25} |
59 changes: 59 additions & 0 deletions
59
ExternalSampleProjects/InputDeviceTester/Library/EditorToolsSettings.asset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!114 &1 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 53 | ||
| m_CorrespondingSourceObject: {fileID: 0} | ||
| m_PrefabInstance: {fileID: 0} | ||
| m_PrefabAsset: {fileID: 0} | ||
| m_GameObject: {fileID: 0} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 15008, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_Name: | ||
| m_EditorClassIdentifier: UnityEditor.dll::UnityEditor.EditorToolsSettingsData | ||
| m_DefaultState: | ||
| m_StateToolOwnerTypeName: UnityEditor.SceneView, UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_GroupsSettingsList: | ||
| - groupType: UnityEngine.CircleCollider2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.HingeJoint2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.BoxCollider2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.PolygonCollider2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.EdgeCollider2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.CapsuleCollider2D, UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.ArticulationBody, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.CharacterJoint, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.CapsuleCollider, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.ConfigurableJoint, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.HingeJoint, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.BoxCollider, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.SphereCollider, UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.LightProbeGroup, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.ParticleSystem, UnityEngine.ParticleSystemModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.LightProbeProxyVolume, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.LineRenderer, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| - groupType: UnityEngine.TrailRenderer, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| collapsed: 0 | ||
| m_LastPivotModeTypeString: UnityEditor.CenterPivotMode, UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_LastPivotRotationTypeString: UnityEditor.LocalPivotRotation, UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_CustomStates: [] | ||
| m_GroupsSettingsList: [] | ||
| m_LastPivotModeTypeString: | ||
| m_LastPivotRotationTypeString: |
1 change: 1 addition & 0 deletions
1
ExternalSampleProjects/InputDeviceTester/Library/LastSceneManagerSetup.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| sceneSetups: [] |
1 change: 1 addition & 0 deletions
1
...s/InputDeviceTester/Library/StateCache/SceneView/8c/8cd7c613bf844de3b80696e27a479d5e.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"m_AlwaysRefresh":false,"showFog":true,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true,"showVisualEffectGraphs":true,"m_FxEnabled":true},"in2DMode":false,"pivot":{"x":0.0,"y":0.0,"z":0.0},"rotation":{"x":-0.08717229217290878,"y":0.8995905518531799,"z":-0.21045254170894623,"w":-0.37262260913848877},"size":10.0,"orthographic":false} |
Binary file not shown.
57 changes: 57 additions & 0 deletions
57
ExternalSampleProjects/InputDeviceTester/UserSettings/HierarchyWindow.settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| { | ||
| "ValidContent": 8, | ||
| "ViewModelState": [], | ||
| "SearchText": "", | ||
| "Columns": [ | ||
| { | ||
| "ColumnId": "Visibility", | ||
| "Visible": true, | ||
| "Width": 20.0, | ||
| "Index": 0 | ||
| }, | ||
| { | ||
| "ColumnId": "Picking", | ||
| "Visible": true, | ||
| "Width": 20.0, | ||
| "Index": 1 | ||
| }, | ||
| { | ||
| "ColumnId": "HierarchyViewColumn Name", | ||
| "Visible": true, | ||
| "Width": 231.60000610351563, | ||
| "Index": 2 | ||
| }, | ||
| { | ||
| "ColumnId": "GameObject/Active", | ||
| "Visible": false, | ||
| "Width": 50.0, | ||
| "Index": 3 | ||
| }, | ||
| { | ||
| "ColumnId": "HierarchyViewColumn Navigate", | ||
| "Visible": true, | ||
| "Width": 18.0, | ||
| "Index": 3 | ||
| }, | ||
| { | ||
| "ColumnId": "GameObject/Static", | ||
| "Visible": false, | ||
| "Width": 75.0, | ||
| "Index": 5 | ||
| }, | ||
| { | ||
| "ColumnId": "GameObject/Layer", | ||
| "Visible": false, | ||
| "Width": 150.0, | ||
| "Index": 6 | ||
| }, | ||
| { | ||
| "ColumnId": "GameObject/Tag", | ||
| "Visible": false, | ||
| "Width": 100.0, | ||
| "Index": 7 | ||
| } | ||
| ], | ||
| "ScrollPositionX": -1.0, | ||
| "ScrollPositionY": -1.0 | ||
| } |
12 changes: 12 additions & 0 deletions
12
Packages/com.unity.inputsystem/DocCodeSamples.Tests/AboutProjectWideActions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| public class AboutProjectWideActions : MonoBehaviour | ||
| { | ||
| void Start() | ||
| { | ||
| #region about-project-wide-actions | ||
| InputSystem.actions.FindAction("Move"); | ||
| #endregion | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
Packages/com.unity.inputsystem/DocCodeSamples.Tests/BindingConflicts.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| class BindingConflictsExample : InputTestFixture | ||
| { | ||
| public void Example() | ||
| { | ||
| #region bindingConflicts | ||
| // Create two actions in the same map. | ||
| var map = new InputActionMap(); | ||
| var bAction = map.AddAction("B"); | ||
| var shiftbAction = map.AddAction("ShiftB"); | ||
|
|
||
| // Bind one of the actions to 'B' and the other to 'SHIFT+B'. | ||
| bAction.AddBinding("<Keyboard>/b"); | ||
| shiftbAction.AddCompositeBinding("OneModifier") | ||
| .With("Modifier", "<Keyboard>/shift") | ||
| .With("Binding", "<Keyboard>/b"); | ||
|
|
||
| // Print something to the console when the actions are triggered. | ||
| bAction.performed += _ => Debug.Log("B action performed"); | ||
| shiftbAction.performed += _ => Debug.Log("SHIFT+B action performed"); | ||
|
|
||
| // Start listening to input. | ||
| map.Enable(); | ||
|
|
||
| // Now, let's assume the left shift key on the keyboard is pressed (here, we manually | ||
| // press it with the InputTestFixture API). | ||
| Press(Keyboard.current.leftShiftKey); | ||
|
|
||
| // And then the B is pressed. This is a valid input for both | ||
| // bAction as well as shiftbAction. | ||
| // | ||
| // What will happen now is that shiftbAction will do its processing first. In response, | ||
| // it will *perform* the action (That is, we see the `performed` callback being invoked) and | ||
| // thus "consume" the input. bAction will stay silent as it will in turn be skipped over. | ||
| Press(Keyboard.bKey); | ||
| #endregion | ||
| } | ||
| } | ||
69 changes: 69 additions & 0 deletions
69
Packages/com.unity.inputsystem/DocCodeSamples.Tests/ConfigureInputfromCode.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| namespace DocCodeSamples.Tests | ||
| { | ||
| #region declaration | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| public class ExampleScript : MonoBehaviour | ||
| { | ||
| public InputAction move; | ||
| public InputAction jump; | ||
| } | ||
| #endregion | ||
|
|
||
| class ConfigureInputfromCode : MonoBehaviour | ||
| { | ||
| const string json = @" | ||
| { | ||
| ""maps"" : [ | ||
| { | ||
| ""name"" : ""gameplay"", | ||
| ""actions"" : [ | ||
| { ""name"" : ""fire"", ""type"" : ""button"" } | ||
| ] | ||
| } | ||
| ] | ||
| }"; | ||
|
|
||
| void ConfigureFromJsonExample() | ||
| { | ||
| #region configurefromjson | ||
| // Load a set of action maps from JSON. | ||
| var maps = InputActionMap.FromJson(json); | ||
|
|
||
| // Load an entire InputActionAsset from JSON. | ||
| var asset = InputActionAsset.FromJson(json); | ||
| #endregion | ||
| } | ||
|
|
||
| void Start() | ||
| { | ||
| #region configurefromcode | ||
| { | ||
| // Create free-standing actions. | ||
| var lookAction = new InputAction("look", binding: "<Gamepad>/leftStick"); | ||
| var moveAction = new InputAction("move", binding: "<Gamepad>/rightStick"); | ||
|
|
||
| moveAction.AddCompositeBinding("1DAxis") | ||
| .With("Left", "<Keyboard>/a") | ||
| .With("Right", "<Keyboard>/d"); | ||
| } | ||
|
|
||
| { | ||
| // Create an action map with actions. | ||
| var map = new InputActionMap("Gameplay"); | ||
| var lookAction = map.AddAction("look"); | ||
| lookAction.AddBinding("<Gamepad>/leftStick"); | ||
| } | ||
|
|
||
| { | ||
| // Create an action asset. | ||
| var asset = ScriptableObject.CreateInstance<InputActionAsset>(); | ||
| var gameplayMap = new InputActionMap("gameplay"); | ||
| asset.AddActionMap(gameplayMap); | ||
| var lookAction = gameplayMap.AddAction("look", "<Gamepad>/leftStick"); | ||
| } | ||
| #endregion | ||
| } | ||
| } | ||
| } |
69 changes: 69 additions & 0 deletions
69
Packages/com.unity.inputsystem/DocCodeSamples.Tests/ConfigureUnityEvents.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| namespace DocCodeSamples.Tests.ConfigureUnityEvents_ManualEnable | ||
| { | ||
| #region manualEnableSingleton | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| public class MyPlayerScript : MonoBehaviour | ||
| { | ||
| PlayerInput playerInput; | ||
|
|
||
| void Start() | ||
| { | ||
| playerInput = GetComponent<PlayerInput>(); | ||
| InputSystem.actions.Disable(); | ||
| playerInput.currentActionMap?.Enable(); | ||
| } | ||
| } | ||
| #endregion | ||
| } | ||
|
|
||
| namespace DocCodeSamples.Tests.ConfigureUnityEvents_SendMessages | ||
| { | ||
| #region sendMessages | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| public class MyPlayerScript : MonoBehaviour | ||
| { | ||
| // "jump" action becomes "OnJump" method. | ||
|
|
||
| // If you're not interested in the value from the control that triggers the action, use a method without arguments. | ||
| public void OnJump() | ||
| { | ||
| // your Jump code here | ||
| } | ||
|
|
||
| // If you are interested in the value from the control that triggers an action, you can declare a parameter of type InputValue. | ||
| public void OnMove(InputValue value) | ||
| { | ||
| // Read value from control. The type depends on what type of controls. | ||
| // the action is bound to. | ||
| var v = value.Get<Vector2>(); | ||
|
|
||
| // IMPORTANT: | ||
| // The given InputValue is only valid for the duration of the callback. Storing the InputValue references somewhere and calling Get<T>() later does not work correctly. | ||
| } | ||
| } | ||
| #endregion | ||
| } | ||
|
|
||
| namespace DocCodeSamples.Tests.ConfigureUnityEvents_InvokeUnityEvents | ||
| { | ||
| #region invokeUnityEvents | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| public class MyPlayerScript : MonoBehaviour | ||
| { | ||
| public void OnFire(InputAction.CallbackContext context) | ||
| { | ||
| } | ||
|
|
||
| public void OnMove(InputAction.CallbackContext context) | ||
| { | ||
| var value = context.ReadValue<Vector2>(); | ||
| } | ||
| } | ||
| #endregion | ||
| } |
22 changes: 22 additions & 0 deletions
22
Packages/com.unity.inputsystem/DocCodeSamples.Tests/ControlActuation.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| using UnityEngine; | ||
| using UnityEngine.InputSystem; | ||
|
|
||
| class ControlActuation : MonoBehaviour | ||
| { | ||
| void Example(){ | ||
|
|
||
| #region actuation | ||
| // Check if leftStick is currently actuated. | ||
| if (Gamepad.current.leftStick.IsActuated()) | ||
| Debug.Log("Left Stick is actuated"); | ||
| #endregion | ||
|
|
||
| #region actuation2 | ||
| // Check if left stick is actuated more than a quarter of its motion range. | ||
| if (Gamepad.current.leftStick.EvaluateMagnitude() > 0.25f) | ||
| Debug.Log("Left Stick actuated past 25%"); | ||
| #endregion | ||
|
|
||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InputTestFixtureis not provided by this assembly's only direct reference (Unity.InputSystem): its declaration belongs to the separateUnity.InputSystem.TestFrameworkassembly. Consequently this sample produces an unresolved-type compiler error inUnity.InputSystem.DocCodeSamples. Either put this test-fixture example in a test assembly that references the framework (with the appropriate test constraints) or avoid using the fixture in this compiled sample.🤖 Helpful? 👍/👎