Skip to content

Commit 3ce2bd4

Browse files
author
Unity Technologies
committed
com.unity.services.cloudcode@2.8.1
## [2.8.1] - 2024-10-29 ### Fixed - Fixed compatibility wih Deployment 1.3
1 parent 12d6e3f commit 3ce2bd4

8 files changed

Lines changed: 58 additions & 31 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.8.1] - 2024-10-29
8+
9+
### Fixed
10+
- Fixed compatibility wih Deployment 1.3
11+
712
## [2.8.0] - 2024-10-18
813

914
### Added

Editor/Authoring/AdminApi/CloudCodeClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
using Unity.Services.CloudCode.Authoring.Client.Models;
1111
using Unity.Services.CloudCode.Authoring.Editor.Core.Bundling;
1212
using Unity.Services.CloudCode.Authoring.Editor.Core.Model;
13+
#if !DEPLOYMENT_API_AVAILABLE_V1_1
14+
using Unity.Services.CloudCode.Authoring.Editor.Deployment;
15+
#endif
1316
using Unity.Services.CloudCode.Authoring.Editor.IO;
1417
using Unity.Services.CloudCode.Authoring.Editor.Scripts;
1518
using Unity.Services.CloudCode.Authoring.Editor.Shared.Clients;

Editor/Authoring/AdminApi/CloudCodeModulesClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
using Unity.Services.CloudCode.Authoring.Client.Http;
1010
using Unity.Services.CloudCode.Authoring.Client.Models;
1111
using Unity.Services.CloudCode.Authoring.Editor.Core.Model;
12+
#if !DEPLOYMENT_API_AVAILABLE_V1_1
13+
using Unity.Services.CloudCode.Authoring.Editor.Deployment;
14+
#endif
1215
using Unity.Services.CloudCode.Authoring.Editor.IO;
1316
using Unity.Services.CloudCode.Authoring.Editor.Scripts;
1417
using Unity.Services.CloudCode.Authoring.Editor.Shared.Clients;

Editor/Authoring/CloudCodeAuthoringServices.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@
4545
using IEnvironmentProvider = Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.IEnvironmentProvider;
4646
using Logger = Unity.Services.CloudCode.Authoring.Editor.Logging.Logger;
4747

48+
#if DEPLOYMENT_API_AVAILABLE_V1_1
49+
using IProjectID = Unity.Services.DeploymentApi.Editor.IProjectIdentifierProvider;
50+
#else
51+
using IProjectID = Unity.Services.CloudCode.Authoring.Editor.Deployment.IProjectIdentifierProvider;
52+
#endif
53+
4854
namespace Unity.Services.CloudCode.Authoring.Editor
4955
{
5056
class CloudCodeAuthoringServices : AbstractRuntimeServices<CloudCodeAuthoringServices>
@@ -143,7 +149,7 @@ protected override void Register(ServiceCollection collection)
143149
collection.Register(Default<CloudCodeModuleGenerateBindingsCommand>);
144150
collection.Register(Default<IDashboardUrlResolver, DashboardUrlResolver>);
145151
collection.Register(_ => EnvironmentsApi.Instance);
146-
collection.Register(Default<IProjectIdentifierProvider, ProjectIdentifierProvider>);
152+
collection.Register(Default<IProjectID, ProjectIdentifierProvider>);
147153
}
148154
}
149155
}

Editor/Authoring/Deployment/DashboardUrlResolver.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,27 @@
55
using Unity.Services.CloudCode.Authoring.Editor.Core.Model;
66
using Unity.Services.Core.Editor.Environments;
77
using Unity.Services.Core.Editor.OrganizationHandler;
8-
using Unity.Services.DeploymentApi.Editor;
8+
9+
#if DEPLOYMENT_API_AVAILABLE_V1_1
10+
using IProjectID = Unity.Services.DeploymentApi.Editor.IProjectIdentifierProvider;
11+
#else
12+
using IProjectID = Unity.Services.CloudCode.Authoring.Editor.Deployment.IProjectIdentifierProvider;
13+
#endif
14+
915

1016
namespace Unity.Services.CloudCode.Authoring.Editor.Deployment
1117
{
1218
class DashboardUrlResolver : IDashboardUrlResolver
1319
{
1420
readonly IEnvironmentsApi m_EnvironmentsApi;
15-
readonly IProjectIdentifierProvider m_ProjectIdProvider;
21+
readonly IProjectID m_ProjectIdProvider;
1622
readonly IOrganizationHandler m_OrganizationHandler;
1723
readonly ICloudCodeModulesClient m_ModuleClient;
1824
readonly ICloudCodeScriptsClient m_ScriptClient;
1925

2026
public DashboardUrlResolver(
2127
IEnvironmentsApi environmentsApi,
22-
IProjectIdentifierProvider projectIdProvider,
28+
IProjectID projectIdProvider,
2329
IOrganizationHandler organizationHandler,
2430
ICloudCodeScriptsClient scriptClient,
2531
ICloudCodeModulesClient moduleClient)
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
using Unity.Services.DeploymentApi.Editor;
2+
#if DEPLOYMENT_API_AVAILABLE_V1_1
3+
using IProjectID = Unity.Services.DeploymentApi.Editor.IProjectIdentifierProvider;
4+
#endif
25

36
namespace Unity.Services.CloudCode.Authoring.Editor.Deployment
47
{
5-
class ProjectIdentifierProvider : IProjectIdentifierProvider
8+
interface IProjectIdentifierProvider
9+
{
10+
public string ProjectId { get; }
11+
}
12+
13+
class ProjectIdentifierProvider
14+
#if DEPLOYMENT_API_AVAILABLE_V1_1
15+
: IProjectID
616
{
717
public string ProjectId => Deployments.Instance?.ProjectIdProvider?.ProjectId ?? string.Empty;
818
}
19+
#else
20+
: IProjectIdentifierProvider
21+
{
22+
public string ProjectId => UnityEditor.CloudProjectSettings.projectId;
23+
}
24+
#endif
925
}

Runtime/Unity.Services.CloudCode.api

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,6 @@ namespace Unity.Services.CloudCode
5454
}
5555
}
5656

57-
namespace Unity.Services.CloudCode.Internal.Http
58-
{
59-
public class DeserializationSettings
60-
{
61-
public MissingMemberHandling MissingMemberHandling = MissingMemberHandling.Error;
62-
public DeserializationSettings() {}
63-
}
64-
65-
[Newtonsoft.Json.JsonConverter(typeof(JsonObjectConverter))] [UnityEngine.Scripting.Preserve] public interface IDeserializable
66-
{
67-
public T GetAs<T>(DeserializationSettings deserializationSettings = default(DeserializationSettings));
68-
public string GetAsString();
69-
}
70-
71-
public enum MissingMemberHandling
72-
{
73-
Error = 0,
74-
Ignore = 1,
75-
}
76-
}
77-
7857
namespace Unity.Services.CloudCode.Subscriptions
7958
{
8059
public enum EventConnectionState
@@ -113,7 +92,16 @@ namespace Unity.Services.CloudCode.Subscriptions
11392
public event System.Action<EventConnectionState> ConnectionStateChanged;
11493
public event System.Action<string> Error;
11594
public event System.Action Kicked;
95+
public event System.Action<byte[]> MessageBytesReceived;
11696
public event System.Action<IMessageReceivedEvent> MessageReceived;
11797
public SubscriptionEventCallbacks() {}
11898
}
11999
}
100+
101+
namespace Unity.Services.Core
102+
{
103+
public static class UnityServicesExtensions
104+
{
105+
public static Unity.Services.CloudCode.ICloudCodeService GetCloudCodeService(this IUnityServices unityServices);
106+
}
107+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.unity.services.cloudcode",
33
"displayName": "Cloud Code",
4-
"version": "2.8.0",
4+
"version": "2.8.1",
55
"unity": "2020.3",
66
"description": "Run your game logic in the cloud as serverless functions and interact with other backend services.\n\nThis package allows you to call out to Cloud Code from within your project as a secure player.\n\nCloud Code can be used to: \n-Change game logic for all players without re-distributing your game \n-Grant timed rewards \n-Create randomized values",
77
"dependencies": {
@@ -25,7 +25,7 @@
2525
"Windows 8 Universal",
2626
"Windows 10 Universal"
2727
],
28-
"changelog": "### Added\n- View in Deployment Window button in `.ccmr` and `.js` files, dependent on Deployment package version 1.4.0.\n- View in Dashboard button in inspector for `.ccmr` and `.js` files.\n- View in Dashboard context menu in Deployment Window for `.ccmr` and `.js` files.\n- Add `Open Solution` button to `.ccmr` inspector.\n- Add Enum support for Cloud Code Bindings generation.\n\n### Fixed\n- Fixed support for various primitive types in Cloud Code Modules binding generation\n- In-script parameters analysis throws an exception in Unity 6\n- `Browse...` button in `.ccmr` inspector now opens the current solution folder properly.\n- Fixed Cloud Code Binding generation of primitive types\n- Binding Generation will attempt to run in the latest available runtime.\n - This can be disabled with CLOUD_CODE_AUTHORING_DISABLE_VERSION_DETECT flag"
28+
"changelog": "### Fixed\n- Fixed compatibility wih Deployment 1.3"
2929
},
3030
"samples": [
3131
{
@@ -40,15 +40,15 @@
4040
}
4141
],
4242
"relatedPackages": {
43-
"com.unity.services.cloudcode.tests": "2.8.0"
43+
"com.unity.services.cloudcode.tests": "2.8.1"
4444
},
4545
"upmCi": {
46-
"footprint": "77e4542a446744ce68cc7cd837bff7ebeabe173d"
46+
"footprint": "f9d6baa79d55310b481cec4ebcfa0fe00d5e4cc2"
4747
},
4848
"documentationUrl": "https://docs.unity3d.com/Packages/com.unity.services.cloudcode@2.8/manual/index.html",
4949
"repository": {
5050
"url": "https://github.cds.internal.unity3d.com/unity/operate-services-sdk.git",
5151
"type": "git",
52-
"revision": "103b2e6a78ab91de6e1f5145dfc20058714d9b4a"
52+
"revision": "180c42d390b655dd6badd24d23fd6b66534bfdbc"
5353
}
5454
}

0 commit comments

Comments
 (0)