Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?) #6168

Open
VictorBarbosa opened this issue Nov 2, 2024 · 4 comments
Assignees
Labels
bug Issue describes a potential bug in ml-agents.

Comments

@VictorBarbosa
Copy link

Platform: macOS / M1

Version 3.0 contains this issue: even with a simple project, if you create a new project and add version 3.0, this error occurs. This happens during the Build and Run process. Does anyone know how to fix this?


 
Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentAction.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentAction.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentAction.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfo.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfo.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfo.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfoActionPair.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfoActionPair.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfoActionPair.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/BrainParameters.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/BrainParameters.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/BrainParameters.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Command.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Command.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Command.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/CustomResetParameters.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/CustomResetParameters.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/CustomResetParameters.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/DemonstrationMeta.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/DemonstrationMeta.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/DemonstrationMeta.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/EngineConfiguration.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/EngineConfiguration.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/EngineConfiguration.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Header.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Header.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Header.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/SpaceType.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/SpaceType.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/SpaceType.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityInput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityInput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityInput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityMessage.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityMessage.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityMessage.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityOutput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityOutput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityOutput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationInput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationInput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationInput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationOutput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationOutput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationOutput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlOutput.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlOutput.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlOutput.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityToExternal.cs(8,20): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityToExternal.cs(9,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityToExternal.cs(10,21): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/EngineConfiguration.cs(56,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfo.cs(59,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityInput.cs(59,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/BrainParameters.cs(65,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Capabilities.cs(63,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/CustomResetParameters.cs(53,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityMessage.cs(60,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentAction.cs(55,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs(77,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs(69,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/DemonstrationMeta.cs(56,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/BrainParameters.cs(263,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityOutput.cs(59,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Header.cs(53,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/AgentInfoActionPair.cs(58,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationOutput.cs(64,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInitializationInput.cs(61,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInput.cs(64,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/Observation.cs(427,32): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityToExternalGrpc.cs(29,27): error CS0400: The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlOutput.cs(62,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlInput.cs(243,32): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/UnityRlOutput.cs(213,32): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Library/PackageCache/com.unity.ml-agents/Runtime/Grpc/CommunicatorObjects/TrainingAnalytics.cs(394,28): error CS0538: 'Google.Protobuf.IMessage' in explicit interface declaration is not an interface

Error building Player because scripts had compiler errors

Build completed with a result of 'Failed' in 3 seconds (2917 ms)
88 errors
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:200)
 
@VictorBarbosa VictorBarbosa added the bug Issue describes a potential bug in ml-agents. label Nov 2, 2024
@Steven9Smith
Copy link

Steven9Smith commented Nov 3, 2024

Had the same problem when upgrade from Unity 2023 to Unity 6. For me, I got it working by downloading the latest ml-agents packages from the develop branch and copy them into my project after deleting the previous folders (If you have custom code in them you should back them up). Then I went into my assets folder and updated the ModelOverrider.cs script because there a change that broke it. You can also try downloading the Google.Protobuf dll from the develop branch too and try overriding the assembly references in the assembly definition but I couldn't get that to work easily so i just downloaded whatever was in the develop branch.

I would classify this as a bug as well, idk why the references broke all of the sudden when I been upgrading from different versions of Unity 2022 & 2023

@miguelalonsojr miguelalonsojr self-assigned this Nov 27, 2024
@miguelalonsojr
Copy link
Collaborator

@VictorBarbosa What version of Unity are you using?

@LeThaiThinh18021228
Copy link

I got same error using unity 6000.0.30f1

@EremesNG
Copy link

Had the same problem when upgrade from Unity 2023 to Unity 6. For me, I got it working by downloading the latest ml-agents packages from the develop branch and copy them into my project after deleting the previous folders (If you have custom code in them you should back them up). Then I went into my assets folder and updated the ModelOverrider.cs script because there a change that broke it. You can also try downloading the Google.Protobuf dll from the develop branch too and try overriding the assembly references in the assembly definition but I couldn't get that to work easily so i just downloaded whatever was in the develop branch.

I would classify this as a bug as well, idk why the references broke all of the sudden when I been upgrading from different versions of Unity 2022 & 2023

It worked for me too 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue describes a potential bug in ml-agents.
Projects
None yet
Development

No branches or pull requests

5 participants