ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

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?)

Open danyow-cheung opened this issue 3 years ago • 9 comments

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 error

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

danyow-cheung avatar May 29 '22 11:05 danyow-cheung

Have you figured out how to fix this yet? Having trouble with this.

LoveAsAConstruct avatar May 30 '22 03:05 LoveAsAConstruct

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.

AKemendo avatar Jun 01 '22 20:06 AKemendo

I could fix the same Errors with the new Input Sytem: []https://docs.unity3d.com/Packages/[email protected]/manual/Installation.html

Joschomat avatar Jun 07 '22 16:06 Joschomat

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.

ramkumarkoppu avatar Jun 15 '22 04:06 ramkumarkoppu

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?

  1. Download and unzip (or clone) ml-agents-release_19
  2. Using in the Unity Hub, use Unity 2021.2.X to Add the ML-Agents Example projects (ml-agents-release_19/Project folder)
  3. In the Unity Editor with the Example project open, open the 3DBall scene from Assets/ML-Agents/Examples/3DBall/Scenes/

jrupert-unity avatar Jun 15 '22 20:06 jrupert-unity

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

jrupert-unity avatar Jun 15 '22 21:06 jrupert-unity

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

danyow-cheung avatar Jun 16 '22 00:06 danyow-cheung

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 error2

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! work!

danyow-cheung avatar Jun 19 '22 03:06 danyow-cheung

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.

stale[bot] avatar Jul 31 '22 03:07 stale[bot]

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.

stale[bot] avatar Sep 21 '22 04:09 stale[bot]

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.

github-actions[bot] avatar Oct 21 '22 20:10 github-actions[bot]