Search Unity

Compile Errors 2020.3, 2021.1

Discussion in 'ML-Agents' started by MA-Rob, Aug 6, 2021.

  1. MA-Rob

    MA-Rob

    Joined:
    Sep 10, 2014
    Posts:
    85
    Any time a script is added or changed and script recompilation occurs Unity throws compile errors from the ML-Agents and Barracuda packages. The only way to clear them is to restart Unity, and then it's fine until another compilation occurs. These are the errors...

    ML-Agents in any of file with Google.Protobuf:
    error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly

    Barracuda iin Runtime\ONNX\Generated\Onnx.cs:
    error CS0115: 'xxxx': no suitable method found to override

    I've tried deleting the Library and re-importing everything, but these errors always return. I've tried ML-Agents versions 1.0 through 2.0, but the errors occur with all of them. Unity 2021.2 doesn't have this problem, but it's still in beta.

    Obviously it has something to do with the Protobuf library, but I don't know what's wrong with it. On a fresh import it does complain about an infinite loop import of the Google.Protobuf library, but that message never returns and the compile errors start.

    We can't work with ML-Agents until this is resolved...
     
  2. vincentpierre

    vincentpierre

    Joined:
    May 5, 2017
    Posts:
    160
    I tried to use Unity version 2020.3.12f1 with the latest release of ML-Agents to open the example environments and I did not see any compilation errors. Could you to reproduce your error on a clean clone of the repository with the problematic version? It could be that because of the way the packages are imported, a reference is missing. It could be due to conflicting packages, can you check your manifest file?