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…