From 7e6caa63caad570241ef936f11d9dd4a66f6ac91 Mon Sep 17 00:00:00 2001 From: Mateo Kuruk Miccino Date: Sat, 26 Aug 2023 21:20:24 -0300 Subject: [PATCH 1/4] sdk7 adaption layer --- browser-interface/package-lock.json | 14 +++++++------- browser-interface/package.json | 2 +- .../packages/shared/world/SceneWorker.ts | 5 +---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/browser-interface/package-lock.json b/browser-interface/package-lock.json index 7b0225c8d0..73ab5b4165 100644 --- a/browser-interface/package-lock.json +++ b/browser-interface/package-lock.json @@ -18,7 +18,7 @@ "@dcl/legacy-ecs": "^6.11.11", "@dcl/protocol": "^1.0.0-5812097343.commit-8025576", "@dcl/rpc": "^1.1.1", - "@dcl/scene-runtime": "7.0.6-20230809174058.commit-2408927", + "@dcl/scene-runtime": "https://sdk-team-cdn.decentraland.org/@dcl/scene-runtime/branch/feat/sdk7-adaption-layer/dcl-scene-runtime-7.0.6-20230827001758.commit-6c356fb.tgz", "@dcl/schemas": "^9.1.1", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/urn-resolver": "^2.2.0", @@ -599,9 +599,10 @@ } }, "node_modules/@dcl/scene-runtime": { - "version": "7.0.6-20230809174058.commit-2408927", - "resolved": "https://registry.npmjs.org/@dcl/scene-runtime/-/scene-runtime-7.0.6-20230809174058.commit-2408927.tgz", - "integrity": "sha512-Bgk1D+m3yADSRThxk6HNJtOIlE0PQsmnyEqacH25cDUx7lsoXJCjoKCRyY+CnJn2JKHn536cGvI6SiZDTJO5MQ==" + "version": "7.0.6-20230827001758.commit-6c356fb", + "resolved": "https://sdk-team-cdn.decentraland.org/@dcl/scene-runtime/branch/feat/sdk7-adaption-layer/dcl-scene-runtime-7.0.6-20230827001758.commit-6c356fb.tgz", + "integrity": "sha512-ikyqz1OfbQUF2zDP3AnG8r03VClUvrCZrWNqjgq5xkrttpejAxbD9TH7GQXOPhpuks7/+/FLN2DN2i70WgJ2uA==", + "license": "Apache-2.0" }, "node_modules/@dcl/schemas": { "version": "9.1.1", @@ -10497,9 +10498,8 @@ } }, "@dcl/scene-runtime": { - "version": "7.0.6-20230809174058.commit-2408927", - "resolved": "https://registry.npmjs.org/@dcl/scene-runtime/-/scene-runtime-7.0.6-20230809174058.commit-2408927.tgz", - "integrity": "sha512-Bgk1D+m3yADSRThxk6HNJtOIlE0PQsmnyEqacH25cDUx7lsoXJCjoKCRyY+CnJn2JKHn536cGvI6SiZDTJO5MQ==" + "version": "https://sdk-team-cdn.decentraland.org/@dcl/scene-runtime/branch/feat/sdk7-adaption-layer/dcl-scene-runtime-7.0.6-20230827001758.commit-6c356fb.tgz", + "integrity": "sha512-ikyqz1OfbQUF2zDP3AnG8r03VClUvrCZrWNqjgq5xkrttpejAxbD9TH7GQXOPhpuks7/+/FLN2DN2i70WgJ2uA==" }, "@dcl/schemas": { "version": "9.1.1", diff --git a/browser-interface/package.json b/browser-interface/package.json index 82bae890b6..aad5aa00ce 100644 --- a/browser-interface/package.json +++ b/browser-interface/package.json @@ -64,7 +64,7 @@ "@dcl/legacy-ecs": "^6.11.11", "@dcl/protocol": "^1.0.0-5812097343.commit-8025576", "@dcl/rpc": "^1.1.1", - "@dcl/scene-runtime": "7.0.6-20230809174058.commit-2408927", + "@dcl/scene-runtime": "https://sdk-team-cdn.decentraland.org/@dcl/scene-runtime/branch/feat/sdk7-adaption-layer/dcl-scene-runtime-7.0.6-20230827001758.commit-6c356fb.tgz", "@dcl/schemas": "^9.1.1", "@dcl/single-sign-on-client": "^0.0.12", "@dcl/urn-resolver": "^2.2.0", diff --git a/browser-interface/packages/shared/world/SceneWorker.ts b/browser-interface/packages/shared/world/SceneWorker.ts index 540608d6f6..7f086f3010 100644 --- a/browser-interface/packages/shared/world/SceneWorker.ts +++ b/browser-interface/packages/shared/world/SceneWorker.ts @@ -154,10 +154,7 @@ export class SceneWorker { defaultLogger.error('Invalid scene metadata', loadableScene.entity.metadata, Scene.validate.errors) } - const IS_SDK7 = - loadableScene.entity.metadata.runtimeVersion === '7' || - !!loadableScene.entity.metadata.ecs7 || - !!loadableScene.entity.metadata.sdk7 + const IS_SDK7 = true // everything is a SDK7 Scene, the SDK6 Scenes are going to use the SDK7 Adaption Layer that is implemented in the SceneRuntime const rpcSceneControllerService = codegen.loadService(scenePort, RpcSceneControllerServiceDefinition) From 5bcc776a79dd0d1c0d5f156bf258c2dea100f079 Mon Sep 17 00:00:00 2001 From: Mateo Kuruk Miccino Date: Sun, 27 Aug 2023 12:43:38 -0300 Subject: [PATCH 2/4] use sdk6 for global scenes --- browser-interface/packages/shared/world/SceneWorker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser-interface/packages/shared/world/SceneWorker.ts b/browser-interface/packages/shared/world/SceneWorker.ts index 7f086f3010..c693a000bc 100644 --- a/browser-interface/packages/shared/world/SceneWorker.ts +++ b/browser-interface/packages/shared/world/SceneWorker.ts @@ -154,7 +154,9 @@ export class SceneWorker { defaultLogger.error('Invalid scene metadata', loadableScene.entity.metadata, Scene.validate.errors) } - const IS_SDK7 = true // everything is a SDK7 Scene, the SDK6 Scenes are going to use the SDK7 Adaption Layer that is implemented in the SceneRuntime + // All the scenes are a SDK7 Scene, the SDK6 Scenes are going to use the SDK7 Adaption Layer that is implemented in the SceneRuntime + const globalScene = loadableScene.isGlobalScene || false + const IS_SDK7 = !globalScene // global scenes, still are sdk6, not included in the adapter const rpcSceneControllerService = codegen.loadService(scenePort, RpcSceneControllerServiceDefinition) From bb76a870eeba2d17bf030a0cff419f6b3edff453 Mon Sep 17 00:00:00 2001 From: Mateo Kuruk Miccino Date: Sun, 27 Aug 2023 21:08:23 -0300 Subject: [PATCH 3/4] process empty parcel as sdk6 scene --- .../genesis-city-loader-impl/emptyParcelController.ts | 3 ++- browser-interface/packages/shared/types.ts | 1 + browser-interface/packages/shared/world/SceneWorker.ts | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/browser-interface/packages/shared/scene-loader/genesis-city-loader-impl/emptyParcelController.ts b/browser-interface/packages/shared/scene-loader/genesis-city-loader-impl/emptyParcelController.ts index 7d3d29992e..3fe1c6fb1c 100644 --- a/browser-interface/packages/shared/scene-loader/genesis-city-loader-impl/emptyParcelController.ts +++ b/browser-interface/packages/shared/scene-loader/genesis-city-loader-impl/emptyParcelController.ts @@ -42,7 +42,8 @@ export class EmptyParcelController { type: EntityType.SCENE, metadata, version: 'v3' - } + }, + emptyParcel: true } } } diff --git a/browser-interface/packages/shared/types.ts b/browser-interface/packages/shared/types.ts index 4200f6a887..a3652e6b66 100644 --- a/browser-interface/packages/shared/types.ts +++ b/browser-interface/packages/shared/types.ts @@ -189,6 +189,7 @@ export type LoadableScene = { readonly isGlobalScene?: boolean readonly isPortableExperience?: boolean readonly useFPSThrottling?: boolean + readonly emptyParcel?: boolean } export type SceneSpawnPoint = { diff --git a/browser-interface/packages/shared/world/SceneWorker.ts b/browser-interface/packages/shared/world/SceneWorker.ts index c693a000bc..6e63a0e267 100644 --- a/browser-interface/packages/shared/world/SceneWorker.ts +++ b/browser-interface/packages/shared/world/SceneWorker.ts @@ -156,7 +156,8 @@ export class SceneWorker { // All the scenes are a SDK7 Scene, the SDK6 Scenes are going to use the SDK7 Adaption Layer that is implemented in the SceneRuntime const globalScene = loadableScene.isGlobalScene || false - const IS_SDK7 = !globalScene // global scenes, still are sdk6, not included in the adapter + const emptyParcel = loadableScene.emptyParcel || false + const IS_SDK7 = !globalScene || !emptyParcel // global scenes, still are sdk6, not included in the adapter const rpcSceneControllerService = codegen.loadService(scenePort, RpcSceneControllerServiceDefinition) From a105dfc1dc01551f84302e98d54e3865e04b2565 Mon Sep 17 00:00:00 2001 From: Mateo Kuruk Miccino Date: Sat, 2 Sep 2023 17:41:44 -0300 Subject: [PATCH 4/4] fix --- .../GltfContainer/GltfContainerCollidersHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/GltfContainerCollidersHandler.cs b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/GltfContainerCollidersHandler.cs index 54f2e3bc86..6459a7351f 100644 --- a/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/GltfContainerCollidersHandler.cs +++ b/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/GltfContainerCollidersHandler.cs @@ -144,7 +144,7 @@ private void SetVisibleMeshesColliders(IReadOnlyCollection renderers) // Compatibility layer for old GLTF importer and GLTFast private static bool IsCollider(MeshFilter meshFilter) { - const StringComparison IGNORE_CASE = StringComparison.CurrentCultureIgnoreCase; + const StringComparison IGNORE_CASE = StringComparison.OrdinalIgnoreCase; const string COLLIDER_SUFFIX = "_collider"; return meshFilter.name.Contains(COLLIDER_SUFFIX, IGNORE_CASE)