Cloud Build error: "The type or namespace name 'AkThreadProperties' could not be found"

Our team is using the wWise audio plugin in our project. The project builds fine locally but fails on Cloud build with the error:

Assets/Wwise/Deployment/API/Generated/Common/AkDeviceSettings.cs(102,10): error CS0246: The type or namespace name `AkThreadProperties’ could not be found. Are you missing a using directive or an assembly reference?

Researching a little, seems there is an order of operations bases on source file location on the compiler. For some reason it builds fine and runs locally but is tripping up in the Cloud Build complier.

Any thoughts?

Hello,

Have you tried building from a fresh checkout of your repo? And a clean build from the dashboard?

  • Sophia

Hi @SophiaC

We tried, a clean build all on the current project. By fresh checkout do you mean create a new project kinda thing? We had an issue with the svn checkout script originally but @unitychrism set us to use a different “svn script” so I’m not sure if that plays into it. I know the source files for the wwise are there because I see them checked out in the Cloud build log. It builds correctly in the unity editor on several different desktops all using the same repo.

I’ll try the fresh checkout, how do we force that?

Hello,

Instructions below for building from a fresh checkout:

  • Clone/checkout your project into a new folder from your source control.
  • Open the Unity project (from the new folder) in the same version of the editor that you are trying to build with in Cloud Build.
  • Build a version of your project for the same platform you are targeting in Cloud Build.
  • Verify that the errors received in your Cloud Build log are not apparent during this local build.

Thanks @SophiaC

After much searching, we found out what the answer was.

We had compliler directives in the source code to include the wwise files or exclude them on based on a build for the unity editor or for a stand alone build. Turns out they where being excluded because we needed to specify to include then for the “Unity_Cloud_Build” in the condition statement.

If that makes an sense to you, technically we were telling the compiler to ignore thoes files… :slight_smile:

Thanks for posting the solution to this! Hopefully it helps others in future :slight_smile:

Glad that this is solved for you.

  • Sophia