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

The type or namespace name [] could not be found. Are you missing an assembly reference?

Open ivenzor opened this issue 8 years ago • 8 comments

I'm probably doing something wrong. As soon as I import ML-agents to a project assets I got several errors:

_Assets/ML-Agents/Scripts/Batcher.cs(4,7): error CS0246: The type or namespace name `Google' could not be found. Are you missing an assembly reference?

Assets/ML-Agents/Scripts/CommunicatorObjects/UnityToExternalGrpc.cs(10,24): error CS0234: The type or namespace name Tasks' does not exist in the namespace System.Threading'. Are you missing an assembly reference?

Assets/ML-Agents/Scripts/RpcCommunicator.cs(1,7): error CS0246: The type or namespace name `Grpc' could not be found. Are you missing an assembly reference?

Assets/ML-Agents/Scripts/RpcCommunicator.cs(4,24): error CS0234: The type or namespace name Tasks' does not exist in the namespace System.Threading'. Are you missing an assembly reference?_

The steps are the following:

  1. Create a new project
  2. Drag the ml-agents\unity-environment\Assets\ML-Agents directory into the project assets.
  3. The errors are found in the console tab.

Can you help me identify what I'm doing wrong?

ivenzor avatar Jul 06 '18 05:07 ivenzor

Hi ivenzor, you are probably following the tutorial Making a New Learning Environment as I was just doing myself, stumbled across the same errors.

What you do to fix them, follow some of the steps in the previous Basic Guide, especially step 5: 5. For each of the platforms you target (PC, Mac and Linux Standalone, iOS or Android): i. Option the Other Settings section. ii. Select Scripting Runtime Version to Experimental (.NET 4.6 Equivalent or .NET 4.x Equivalent) iii. In Scripting Defined Symbols, add the flag ENABLE_TENSORFLOW. After typing in the flag name, press Enter.

Worked for me

TomRockroot avatar Jul 06 '18 20:07 TomRockroot

Thanks for your reply. I guess you are correct.

Yesterday I created a new project to test the roller ball example and it's very likely I forgot to do those steps again in the new project. I will check today and will let you know.

Thanks for the feedback.

ivenzor avatar Jul 06 '18 20:07 ivenzor

In plugins/protobuffer right click on google.protobuf and click reimport.... you might need to restart Unity

traveltrousers avatar Jul 07 '18 02:07 traveltrousers

It was as stated by TomRockroot: on the new project I forgot to set again the step 5 from the basic guide.

I'm now going to close this issue. Thanks for the help.

ivenzor avatar Jul 07 '18 05:07 ivenzor

Hi,

I'm encountering this issue with Unity 2018.2.1f1. I've created a new project, create my hierarchy as following :

image

The plugins folder is the same ML-Agents Plugins's folder. The Script/ML contains all the ML-Agents Scripts needed to make ML-Agents works.

I've reproduced the 5 steps as TomRockroot mentionned but still have this issue. Any idea what is wrong? Thanks

KevTale avatar Jul 30 '18 11:07 KevTale

Same

BartMartner avatar Aug 03 '18 17:08 BartMartner

Hi ivenzor, you are probably following the tutorial Making a New Learning Environment as I was just doing myself, stumbled across the same errors.

What you do to fix them, follow some of the steps in the previous Basic Guide, especially step 5: 5. For each of the platforms you target (PC, Mac and Linux Standalone, iOS or Android): i. Option the Other Settings section. ii. Select Scripting Runtime Version to Experimental (.NET 4.6 Equivalent or .NET 4.x Equivalent) iii. In Scripting Defined Symbols, add the flag ENABLE_TENSORFLOW. After typing in the flag name, press Enter.

Worked for me

Hey,

what version of Unity are you using? In Unity 2018.3.0f2 (official release) i cannot pick .NET 4.6 for scripting runtime version.

image

What can I be missing?

P.S Since its hidden on the screenshot my API Compatibility level is set to .NET 4x (the only other option is .NET Standard 2.0

I have following frameworks installed: image

What can be out of ordinary?

oddEventHorizon avatar Dec 17 '18 22:12 oddEventHorizon

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.

lock[bot] avatar Jan 02 '20 22:01 lock[bot]