From 862d437634615535c92b26af697ff44067d5a33f Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 31 Jan 2023 13:19:08 +1100 Subject: [PATCH 1/8] Catch TypeInitializerException to avoid log spam during builds. --- Editor/CesiumEditorUtility.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index 6d49847c..c3d1c58d 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -88,9 +88,12 @@ static void UpdateIonSession() { CesiumIonSession.Ion().Tick(); } + // Don't let a missing / out-of-sync native DLL crash everything. catch (DllNotFoundException) { - // Don't let a missing / out-of-sync native DLL crash everything. + } + catch (TypeInitializationException) + { } } From 78624d731b68e5322e5e36a2b9e4f6454564053e Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 31 Jan 2023 22:20:57 +1100 Subject: [PATCH 2/8] Use macOS 11. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cc3cf58..678e3b7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,7 +91,7 @@ jobs: reporter: dotnet-nunit MacOS: needs: [QuickChecks] - runs-on: macos-latest + runs-on: macos-11 # Only allow a single macOS build at a time, for Unity licensing reasons concurrency: mac steps: From a118ad6816621ff6fd0a1bba11f1a12d4de17c52 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 08:30:50 +1100 Subject: [PATCH 3/8] Temporarily revert catch of TypeInitializerException. --- Editor/CesiumEditorUtility.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index c3d1c58d..8f4ce606 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -92,9 +92,9 @@ static void UpdateIonSession() catch (DllNotFoundException) { } - catch (TypeInitializationException) - { - } + // catch (TypeInitializationException) + // { + // } } static void From b9f44b6d7b4a2effca4d6700382e562951b9d3f3 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 10:56:07 +1100 Subject: [PATCH 4/8] Log more details on build failure. --- Editor/BuildCesiumForUnity.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Editor/BuildCesiumForUnity.cs b/Editor/BuildCesiumForUnity.cs index a808fd08..1826292f 100644 --- a/Editor/BuildCesiumForUnity.cs +++ b/Editor/BuildCesiumForUnity.cs @@ -123,8 +123,26 @@ private static void BuildPlayer(BuildTargetGroup targetGroup, BuildTarget target target = target, scenes = new[] { "Assets/Scenes/Empty.unity" } }); + if (report.summary.totalErrors > 0) - throw new Exception("Build failed"); + { + StringBuilder errorReport = new StringBuilder(); + errorReport.AppendLine("BuildPlayer failed:"); + foreach (BuildStep step in report.steps) + { + var errorMessages = step.messages.Where(message => message.type == LogType.Error || message.type == LogType.Exception); + if (!errorMessages.Any()) + continue; + + errorReport.AppendLine(" In step " + step.name + ":"); + + foreach (BuildStepMessage message in errorMessages) + { + errorReport.AppendLine(" - " + message.content); + } + } + throw new Exception(errorReport.ToString()); + } // We don't actually need the built project; delete it. if (Directory.Exists(outputPath)) From 206439b5a6114c0232e8f361673a14bad0c84eef Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 15:43:15 +1100 Subject: [PATCH 5/8] Create correct placeholder on macOS. --- Editor/CompileCesiumForUnityNative.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/CompileCesiumForUnityNative.cs b/Editor/CompileCesiumForUnityNative.cs index 8e87f4bd..84d7e74f 100644 --- a/Editor/CompileCesiumForUnityNative.cs +++ b/Editor/CompileCesiumForUnityNative.cs @@ -237,7 +237,7 @@ private static LibraryToBuild[] GetLibrariesToBuildForPlatform(BuildSummary summ { if (finalLibrariesOnly) { - result.Add(GetLibraryToBuild(summary, "x86_64")); + result.Add(GetLibraryToBuild(summary)); } else { From a7ed69a49001c34cad392973c13413a4f4f6b275 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 17:17:47 +1100 Subject: [PATCH 6/8] Restore catch of TypeInitializationException to reduce log spam. --- Editor/CesiumEditorUtility.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Editor/CesiumEditorUtility.cs b/Editor/CesiumEditorUtility.cs index 8f4ce606..c3d1c58d 100644 --- a/Editor/CesiumEditorUtility.cs +++ b/Editor/CesiumEditorUtility.cs @@ -92,9 +92,9 @@ static void UpdateIonSession() catch (DllNotFoundException) { } - // catch (TypeInitializationException) - // { - // } + catch (TypeInitializationException) + { + } } static void From 2d6a6c28f0b1f6e63eb6fd732d7673ce2cd7a6db Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 17:25:22 +1100 Subject: [PATCH 7/8] Update cesium-native. --- native~/extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native~/extern/cesium-native b/native~/extern/cesium-native index 77c7badf..f5f1baec 160000 --- a/native~/extern/cesium-native +++ b/native~/extern/cesium-native @@ -1 +1 @@ -Subproject commit 77c7badf9e35ac5edb8030f6ddf07f59d5760aeb +Subproject commit f5f1baece2daa168b03fba10c68a4a6ca8348523 From 3599030a5a37c0320f3efe1a48411a13f6807ca1 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Feb 2023 17:43:31 +1100 Subject: [PATCH 8/8] Bump to v0.2.0, update CHANGES.md. --- CHANGES.md | 6 +++++- package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 762543af..013c714c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,15 +8,19 @@ ##### Additions :tada: -- Added support for building to iOS. - Added `CesiumCameraController`, a globe-aware controller that adapts its speed and clipping planes based on its height from the globe. - Added `CesiumFlyToController`, a controller that can smoothly fly to locations across the globe. - Added an option to add a `DynamicCamera` from the Cesium panel to the scene. The `DynamicCamera` contains `CesiumCameraController` and `CesiumFlyToController` components and offers easy navigation of the globe. +- Added support for building to iOS. +- Added support for building to Android x86-64 devices like the Magic Leap 2. ##### Fixes :wrench: - Fixed a bug where `CesiumGeoreference`, `CesiumGlobeAnchor`, and `CesiumSubScene` would not properly update when their values were changed by undos or pasted values. - `CesiumRuntimeSettings` is now stored in `Assets/CesiumSettings/Resources` instead of `Assets/Settings/Resources`. +- Added an explicit `Physics.SyncTransforms` when `CesiumOriginShift` activates or deactivates sub-scenes, avoiding a brief period of potentially very incorrect collisions. + +In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.1 to v0.21.3. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. ### v0.1.2 diff --git a/package.json b/package.json index e362e012..870f99ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.cesium.unity", - "version": "0.1.2", + "version": "0.2.0", "displayName": "Cesium for Unity", "description": "Cesium for Unity brings the 3D geospatial ecosystem to Unity. By combining a high-accuracy full-scale WGS84 globe, open APIs and open standards for spatial indexing such as 3D Tiles, and cloud-based real-world content from [Cesium ion](https://cesium.com/cesium-ion) with Unity, this plugin enables 3D geospatial workflows and applications in Unity.", "license": "Apache-2.0",