Generate Bindings fails if project is on a non-C drive

I submitted a bug report, but if anyone is failing to generate bindings from a CCM asset, maybe its because your project is on a different drive than C:

Notice in
Packages/com.unity.services.cloudcode/Editor/Authoring/Deployment/Modules/FileSystem.cs
on line 60, theres a call to Directory.Move()

One of the exceptions listed is, if attempting to move the directory to a different volume
Directory.Move(String, String) Method (System.IO) | Microsoft Learn

So if theres anywhere else in Unity that uses Directory.Move() and copying from TEMP into the project, this bug could probably appear there as well

Looking at
Packages\com.unity.services.cloudcode\Editor\Authoring\Modules\Bindings\CloudCodeModuleBindingsGenerator.cs
its probably that
GetSolutionCompilationOutputPath()
GetBindingsGenerationOutputTempFolder()
are using Path.GetTempPath()
instead of the project /temp directory

1 Like

Hey!

I’m on the team that developed this, do you mind linking the ticket? I’ll make sure it gets addressed

Cheers!

I ran into this myself today. It’s a bit late but better that than sorry.

Here’s the issue link:

It’s exactly the same for me. Did you copy the project to C:/, create the bindings and then delete the project again? I wouldn’t want to continue working on C:/.

Yes, I temporarily moved the project to C: just to generate the bindings, then moved it back.

1 Like

Another workaround is to modify the Cloud Code package source
Library\PackageCache\com.unity.services.cloudcode\Editor\Authoring\Modules\Bindings\CloudCodeModuleBindingsGenerator.cs

line 238
change Path.GetTempPath() to “/temp”

or without changing source, another workaround might be to change your system’s Environment Variables, and point TEMP and TMP to a new temp folder on your project’s drive. But I hven’t tested this

1 Like

@GabKBelmonte this issues still persists in Unity 6 with latest packages.
How is a simple issue like this still a problem after nearly a year?

I disabled the CLOUD_CODE_AUTHORING_DISABLE_VERSION_DETECT, and it fixed the problem.
It was falling over silently on the GetAvailableCoreRuntimes method.

Hi,

I’m sorry you’re experiencing issues. Do you mind sharing exactly what is failing with the method, we’d like to address it.
Cheers