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

`System.Text.StringBuilder' could be found.

Open Kevinlinpr opened this issue 8 years ago • 12 comments

Drag the ML-Agents folder from unity-environments/Assets to the Unity Editor Project window.And then print this error message.My queastion is why I missing this assembly reference while I Drag the same folder into the Unity Editor Project window and where is it?

Assets/ML-Agents/Scripts/ExternalCommunicator.cs(259,24): error CS1061: Type System.Text.StringBuilder' does not contain a definition for Clear' and no extension method Clear' of type System.Text.StringBuilder' could be found. Are you missing an assembly reference?

Thank you so much!

Kevinlinpr avatar Mar 31 '18 05:03 Kevinlinpr

I assume you created a new project and tried to import all the ml-agents assets, right? If so, make sure that you are running on .NET 4.6:

Edit -> Project Settings -> Player Then in the inspector under "Other Settings" select the .NET 4.6 equivalent Scripting Runtime Version.

MarcoMeter avatar Mar 31 '18 17:03 MarcoMeter

@MarcoMeter Yeah,you got it,but I found a way that open my new project with double clicking one of the scene from the example folder to avoid this error,it will be fixed automatically by Unity Editor loading the .meta files. I will check my Runtime Version when I import all the ml-agents assets again,and I will reply to you as quickly as possible.

Kevinlinpr avatar Apr 02 '18 06:04 Kevinlinpr

Is your editor version 2018.1.0b6? I assume that's important.

gw1108 avatar Apr 03 '18 02:04 gw1108

I had a project that had this error, but I was using Unity 2017.3.1f1. Using Unity 2018.1.0b13 and no errors. Then I reopened the project with Unity 2017.3.1f1 and no errors.

gw1108 avatar Apr 03 '18 02:04 gw1108

@gw1108 2017.3.1f1 is my version.

Kevinlinpr avatar Apr 03 '18 17:04 Kevinlinpr

I had exactly the same problem and thanks to MarcoMeter it was solved. Thanks! I had selected the .net 3.5 instead of 4.6.

entropia666 avatar Apr 08 '18 13:04 entropia666

Hi @WindRunnerCackerChen - did the feedback on this thread resolve the issue? Let us know if you need any additional support.

mmattar avatar Apr 12 '18 00:04 mmattar

had same problem but resolution from MarcoMeter seems to have fixed it , thanx.

FortyFortyLabs avatar Apr 19 '18 00:04 FortyFortyLabs

had the same problem and was able to fix it now thanks to MarcoMeter. (I used 2017.4.1f1 Personal just installed yesterday on OSX.) It might be nicer to mention this in this tutorial.

Also before noticing this issue, I originally stuck in Select the Scripts/Brain since I could not find Scripts/Brain component. But this is also fixed and I can see Scripts/Brain component. Thank you!

h1ros avatar Apr 22 '18 17:04 h1ros

@mmattar definitely done.thanks

Kevinlinpr avatar May 24 '18 00:05 Kevinlinpr

Great, thanks @WindRunnerCackerChen.

mmattar avatar May 24 '18 00:05 mmattar

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 03 '20 09:01 lock[bot]