Reputation: 21
I want to test the Unity ML example "3D Ball". So, I set up environment:
Then, I opened the example scene and played that scene. But every code which contains "using Unity.MLAgents.Actuators" fails with the following error:
Assets\test.cs(5,22): error CS0234: The type or namespace name 'Actuators' does not exist in the namespace 'Unity.MLAgents' (are you missing an assembly reference?)
So, I've tried to find MLAgents.Actuator module's source code. But I didn't find anything yet.
Someone said Actuator Module is applied after ML Agent 1.0.3, but I imported the lasted version (v. 1.0.4).
How can I import the ML Agents package properly? Every YouTube tutorial does not show the problem I've encountered.
Here is my environment:
Upvotes: 2
Views: 4451
Reputation: 2532
I have the same problem, I am very new to Unity. I figured out it is something with the versioning. You need to use the proper version of the package. By installing from the Unity Registry, I was not able to install the last version.
I just install the package from the Disk. Here follow the Install the com.unity.ml-agents Unity package. It fixed my problem.
Upvotes: 0
Reputation: 403
If you need to use the 1.0.x pacakage, make sure you're getting the examples from a compatible version (not the master branch). For example, here's the 1.0.2 tag: github.com/Unity-Technologies/ml-agents/tree/…. Looks like 1.03 and 1.0.4 tags are missing but I'll update them tomorrow. – celion Sep 27 '20 at 20:27
Celion had the right answer
Upvotes: 0
Reputation: 1
Unity.MLAgents.Actuators this package is in preview till this date, if you want to use this package you need to update your MLAgents package from package manager.
Upvotes: -1
Reputation: 1
I added the project from "Unity Hub" rather than inserting asset folder to a new project. And then everything works fine. Even the preview packages like [com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions] added automatically to the project from my project directory!
Upvotes: 0
Reputation: 11
Update the package to a 1.4.0-preview
or later (depending on your Unity version, you may need to change some package manager settings to be able to see preview packages).
Get the examples from a tag that corresponds to the 1.0.x
package, for example com.unity.ml-agents_1.0.6
Upvotes: 1