Assets\ML-Agents\Examples\PushBlockWithInput\Scripts\PushBlockActions.The type or namespace name 'InputAction' could not be found (are you missing a using directive or an assembly reference?)
Describe the bug the new to unity ml agent,when i drag the release code into unity patform , and try to run the basic "3D ball" ,error happend
Console logs / stack traces
Assets\ML-Agents\Examples\PushBlockWithInput\Scripts\PushBlockActions.cs(15,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
Assets\ML-Agents\Examples\PushBlockWithInput\Scripts\PushBlockActions.cs(274,16): error CS0246: The type or namespace name 'InputAction' could not be found (are you missing a using directive or an assembly reference?)
Screenshots

Environment (please complete the following information):
- Unity Version: Unity 2021.2.19
- OS + version: Windows 10
- ML-Agents version :ml-agents-release_19
- Environment:python3.7
Have you figured out how to fix this yet? Having trouble with this.
Thanks for the bug report. We’ve documented your input and will come back to you once we determine how best to support your request.
I could fix the same Errors with the new Input Sytem: []https://docs.unity3d.com/Packages/[email protected]/manual/Installation.html
Same issue with versions: Unity Hub 3.1.2, Unity 2021.2.4fq, ML Agents package 2.0.1, ml-agents-release_19 Assets\ML-Agents\Examples\PushBlockWithInput\Scripts\PushBlockActions.cs(274,16): error CS0246: The type or namespace name 'InputAction' could not be found (are you missing a using directive or an assembly reference?) followed advice on above comment, but not resolved yet.
Hi! I'd like to help resolve this issue, but I haven't been able to reproduce the problem. Can those who are encountering the error confirm that they've followed these steps or tell me what they've done differently?
- Download and unzip (or clone) ml-agents-release_19
- Using in the Unity Hub, use Unity 2021.2.X to Add the ML-Agents Example projects (ml-agents-release_19/Project folder)
- In the Unity Editor with the Example project open, open the 3DBall scene from Assets/ML-Agents/Examples/3DBall/Scenes/
Two possible fixes to try in the meantime:
- Remove the version of ML-Agents you have from the Package Manager and the use Install From Disk and install both the com.unity.ml-agents and com.unity.ml-agents.extensions packages that are in ml-agents-release_19.
- Remove the PushBlockWithInput folder and PushBlockWithInput.meta file from \ml-agents-release_19\Project\Assets\ML-Agents\Examples
Two possible fixes to try in the meantime:
- Remove the version of ML-Agents you have from the package manager and the use Install From Disk and install both the com.unity.ml-agents and com.unity.ml-agents.extensions packages.
- remove the PushBlockWithInput folder and PushBlockWithInput.meta file from \ml-agents-release_19\Project\Assets\ML-Agents\Examples
thank for replying , i will look on it these day
Two possible fixes to try in the meantime:
- Remove the version of ML-Agents you have from the Package Manager and the use Install From Disk and install both the com.unity.ml-agents and com.unity.ml-agents.extensions packages that are in ml-agents-release_19.
- Remove the PushBlockWithInput folder and PushBlockWithInput.meta file from \ml-agents-release_19\Project\Assets\ML-Agents\Examples
The method 2 work for me!After i deleting files in \ml-agents-release_19\Project\Assets\ML-Agents\Examples .
It print

so i search google and find out how to fix this error:
https://github.com/jilleJr/Newtonsoft.Json-for-Unity
the last ,3d box works!

This issue has been automatically marked as stale because it has not had activity in the last 28 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 42 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.