Cannot use ml-agents in my own game, missing assembly?

Hello,
I have followed the installation instructions from Github, downloaded ml-agents-release_18 and installed from disk using the package manager.

I get the following errors:
Assets\Scripts\Tank\TankMovement.cs(3,13): error CS0234: The type or namespace name ‘MLAgents’ does not exist in the namespace ‘Unity’ (are you missing an assembly reference?)
Assets\Scripts\Tank\TankMovement.cs(5,29): error CS0246: The type or namespace name ‘Agent’ could not be found (are you missing a using directive or an assembly reference?)

Do I need to copy any files somewhere?

Thanks

Hi ,
It worth double checking the path you’re using to be ml-agents-release_xx/com.unity.ml-agents/package.json and that you see ML Agents under packages in the project.

Otherwise, can you provide more information like:

  • what version of unity are you using

  • what operating system are you on and what version

  • any other additional information about your installation process

It is easier to diagnose issues like this with more information.
Thanks,

If you’re using assembly definition (.asmdef file), you need to add mlagents there. The error message is saying it’s missing the assembly to reference the package.

For others encountering the same problem:
If you have already downloaded the package from whichever way you choose, look in the packages folder in your unity project for ML_Agents/Runtime/Agent.cs and move in into your assets or scripts folder.