CcdManagement API only available in the editor?

Hello!

I’m trying to build a project that contains CCD (but no Addressables) in UCB, but the builds keep failing with the following error (when building for Android, haven’t tested iOS yet)…

error CS0234: The type or namespace name ‘Ccd’ does not exist in the namespace ‘Unity.Services’ (are you missing an assembly reference?)

The cs file that is triggering the error has the following two using clauses…

using Unity.Services.Ccd.Management;
using Unity.Services.Ccd.Management.Models;

CCD 2.1.0 was installed as per the Unity instructions (for using it without Addressables) and it works fine in the player.

Any help would be much appreciated.

Is anyone from Unity able to help with this please?

Hi PeachyPixels,

It looks like there are referenced assemblies that cannot be resolved. Can you validate that you have the unity services core package installed and what is the version that is installed?

Regards,
JC

Hi @Unity_JonathanCl

Thanks for the response.

So packages-lock.json includes these two entries…

“com.unity.services.ccd.management”: {
“version”: “2.1.0”,
“depth”: 0,
“source”: “registry”,
“dependencies”: {
“com.unity.services.core”: “1.3.1”,
“com.unity.modules.unitywebrequest”: “1.0.0”,
“com.unity.modules.unitywebrequestassetbundle”: “1.0.0”,
“com.unity.modules.unitywebrequestaudio”: “1.0.0”,
“com.unity.modules.unitywebrequesttexture”: “1.0.0”,
“com.unity.modules.unitywebrequestwww”: “1.0.0”,
“com.unity.nuget.newtonsoft-json”: “3.0.2”
},
“url”: “https://packages.unity.com
},
“com.unity.services.core”: {
“version”: “1.7.0”,
“depth”: 1,
“source”: “registry”,
“dependencies”: {
“com.unity.modules.unitywebrequest”: “1.0.0”,
“com.unity.nuget.newtonsoft-json”: “3.0.2”,
“com.unity.modules.androidjni”: “1.0.0”
},
“url”: “https://packages.unity.com
},

But manifest.json only contains one of the above…

“com.unity.services.ccd.management”: “2.1.0”,

And finally the com.unity.services.core@1.7.0 folder exists in the package cache, but not 1.3.1

So I wonder if the missing Core 1.3.1 package is causing this?

I’ve just uninstalled\reinstalled the CCD package (using Package Manager) but it still hasn’t updated. By that I mean adding the Core 1.3.1 entry to manifest.json or adding Core 1.3.1 into the package cache.

Could you try to add the Core 1.3.1 package to see if it solves the issue?

I’ve tried but can’t seem to find a way to install a dependant (only) package.

Re-installing the parent (CCD) package doesn’t appear to install dependant packages (well certainly if ones with higher versions exists). Dependant only packages (i.e. com.unity.services.core) aren’t listed in the package manager. And manually adding the package to the manifest doesn’t install the package or fix the issue either.

So I guess the question is, how can you install dependant only packages?

Update #1: I’ve tried deleting the lock file, but it still doesn’t install the Core 1.3.1 package when the project is opened (and the lock file re-created)

Looking at the dependencies in the package manager, Unity seems happy using Core 1.7.0 with CCD 2.1.0 (see attached screenshot)

So maybe the issue is UCB and not CCD or Editor package management?

Update #2: Just realised that enabling show dependencies also seems to show the Core packages in the package manager now. Great!

But if I downgrade to Core 1.3.1 this will break the project (I suspect) as Unity Authentication requires Core 1.7.0 (hence why it’s installed)

“com.unity.services.authentication”: {
“version”: “2.4.0”,
“depth”: 0,
“source”: “registry”,
“dependencies”: {
“com.unity.nuget.newtonsoft-json”: “3.0.2”,
“com.unity.services.core”: “1.7.0”,
“com.unity.modules.unitywebrequest”: “1.0.0”,
“com.unity.ugui”: “1.0.0”
},
“url”: “https://packages.unity.com
},

So I suspect this is a UCB issue.

Would someone from Unity be kind enough to move this to the UCB forum please?

Is anyone from Unity able to help please?

The best way to get support on this issue would be to open up a support ticket with the cloud build customer service team. In the Unity Dashboard go to DevOps → Help & Support → File a Ticket.

Same issue. I opened up a support ticket but support team doesn’t help me.
Can anyone give me a example project that can build? Even CCD sample(include package) can’t build.

I moved onto something else but am back on the build process now.

Before logging this as a call…

  1. I just upgraded from 2020.LTS to 2021.LTS and the same issue\error.

  2. After inspecting the full build log, I noticed the following entries…

[2023-04-03T10:35:00Z - Unity]     com.unity.services.ccd.management@2.2.2 (location: BUILD_PATH/p\Library\PackageCache\com.unity.services.ccd.management@2.2.2)
[error] [2023-04-03T10:35:16Z - Unity] Start importing Packages/com.unity.services.ccd.management/Editor/ErrorMitigation using Guid(d8e999ad503bbcc468c6b62880bf92d1) Importer(-1,00000000000000000000000000000000)  -> (artifact id: '3fc4496962e5025dd34a8766d7ccde5e') in 0.000691 seconds
[error] [2023-04-03T10:35:24Z - Unity] Start importing Packages/com.unity.services.ccd.management/Editor/ErrorMitigation/RetryPolicy.cs using Guid(2180ce0c55ae1bf498167e2063e8fd11) Importer(-1,00000000000000000000000000000000)
[error] [2023-04-03T10:35:41Z - Unity] Start importing Packages/com.unity.services.ccd.management/Editor/ErrorMitigation/RetryPolicyConfig.cs using Guid(58826ab4ee33ae3469b90bc6d4588a93) Importer(-1,00000000000000000000000000000000)  -> (artifact id: '49fea74796739968fb3894db4bbcd14e') in 0.002140 seconds
[error] [2023-04-03T10:35:42Z - Unity] Start importing Packages/com.unity.services.ccd.management/Editor/ErrorMitigation/IRetryPolicy.cs using Guid(3aa6aa8b0c8265f47b75d3d6a963c038) Importer(-1,00000000000000000000000000000000)  -> (artifact id: 'bf62de6915036261a8773720049b8630') in 0.001828 seconds
[error] [2023-04-03T10:35:43Z - Unity] Start importing Packages/com.unity.services.ccd.management/Editor/ErrorMitigation/StatusCodePolicyConfig.cs using Guid(bc9a6834516bb384aaebcb022b3e0047) Importer(-1,00000000000000000000000000000000)  -> (artifact id: 'fab554167627f27acba79ea201e499a1') in 0.001577 seconds

Maybe this could shed some light on the issue?

All other CCD entries in the log appeared to be ok, including the list of Unity packages to build…

[2023-04-03T10:35:00Z - Unity]   Packages from [https://packages.unity.com]:
[2023-04-03T10:35:00Z - Unity]     com.unity.ide.visualstudio@2.0.17 (location: BUILD_PATH/p\Library\PackageCache\com.unity.ide.visualstudio@2.0.17)
[2023-04-03T10:35:00Z - Unity]     com.unity.purchasing@4.7.0 (location: BUILD_PATH/p\Library\PackageCache\com.unity.purchasing@4.7.0)
[2023-04-03T10:35:00Z - Unity]     com.unity.remote-config@3.3.1 (location: BUILD_PATH/p\Library\PackageCache\com.unity.remote-config@3.3.1)
[2023-04-03T10:35:00Z - Unity]     com.unity.services.authentication@2.4.0 (location: BUILD_PATH/p\Library\PackageCache\com.unity.services.authentication@2.4.0)
[2023-04-03T10:35:00Z - Unity]     com.unity.services.ccd.management@2.2.2 (location: BUILD_PATH/p\Library\PackageCache\com.unity.services.ccd.management@2.2.2)
[2023-04-03T10:35:00Z - Unity]     com.unity.textmeshpro@3.0.6 (location: BUILD_PATH/p\Library\PackageCache\com.unity.textmeshpro@3.0.6)
[2023-04-03T10:35:00Z - Unity]     com.unity.timeline@1.8.2 (location: BUILD_PATH/p\Library\PackageCache\com.unity.timeline@1.8.2)
[2023-04-03T10:35:00Z - Unity]     com.unity.services.core@1.8.1 (location: BUILD_PATH/p\Library\PackageCache\com.unity.services.core@1.8.1)
[2023-04-03T10:35:00Z - Unity]     com.unity.nuget.newtonsoft-json@3.0.2 (location: BUILD_PATH/p\Library\PackageCache\com.unity.nuget.newtonsoft-json@3.0.2)
[2023-04-03T10:35:00Z - Unity]     com.unity.remote-config-runtime@3.1.3 (location: BUILD_PATH/p\Library\PackageCache\com.unity.remote-config-runtime@3.1.3)
[2023-04-03T10:35:00Z - Unity]     com.unity.test-framework@1.1.31 (location: BUILD_PATH/p\Library\PackageCache\com.unity.test-framework@1.1.31)
[2023-04-03T10:35:00Z - Unity]     com.unity.ext.nunit@1.0.6 (location: BUILD_PATH/p\Library\PackageCache\com.unity.ext.nunit@1.0.6)

@Benjamin-Gooding @Unity_JonathanCl any ideas please?

It looks like that [error] tag in front should not be in the logs for those import statements. My guess is that our log processing sees the ErrorMitigation and thinks that there was an error when in reality there wasn’t.

So that shouldn’t be the reason that you are getting issues with CCD.

Hi @Benjamin-Gooding

Yes I’ve logged this as an issue and currently working through it with one of your support agents.

After another day of experimenting with the Android build, I’ve whittled it down to the following…

  1. Comment out all CCD code\calls and the build is successful (clean builds, locally & UCB)
  2. Un-comment all CCD code\calls and the build fails with the CCD namespace resolve error (clean builds, locally & UCB)

Even with successful builds though, some of the aforementioned errors still appear in the log file.

So it’s definitely looking like a CCD build issue. But it looks like whatever is causing the actual failure is not being reported in the log files.

Can’t believe I didn’t notice this before, but…

The CcdManagement class exists inside an Editor folder, which would explain why this is only working in the editor and failing in builds.

Which begs the questions…

  1. Was CcdManagement only intended for editor use?
  2. If so why (and what should actually be used at runtime)?

Given that I can now replicate this issue with a local build, I think it’s safe to say this rules out UCB.

So would someone from Unity be kind enough to move this to the CCD forum please?

I moved the thread to CCD for you.

1 Like

@SebT_Unity @llunity3d

Are you able to help with this please? (please see post #16 above)

Hey David,
Thanks for posting and asking great questions.

You are right the CcdManagement seems to only intended for editor use. However we have a ticket open ticket to resolve the error in question that you got at build time.

I had an internal discussion regarding this and it seems what you are looking for may be the CCD client
My only problem with this suggestion is our documentation is limited to this.

Additionally it is difficult to find the package you would need to add the following package by name
com.unity.services.ccd-client in the package manager

Alternatively would using the API / CLI be something that can be used in your application?

1 Like