org.outernet.cesium-unity 1.15.3-linux.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +420 -0
- package/CHANGES.md.meta +7 -0
- package/Editor/BuildCesiumForUnity.cs +186 -0
- package/Editor/BuildCesiumForUnity.cs.meta +11 -0
- package/Editor/Cesium3DTilesetEditor.cs +542 -0
- package/Editor/Cesium3DTilesetEditor.cs.meta +11 -0
- package/Editor/CesiumBingMapsRasterOverlayEditor.cs +66 -0
- package/Editor/CesiumBingMapsRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumCameraControllerEditor.cs +174 -0
- package/Editor/CesiumCameraControllerEditor.cs.meta +11 -0
- package/Editor/CesiumCameraManagerEditor.cs +65 -0
- package/Editor/CesiumCameraManagerEditor.cs.meta +11 -0
- package/Editor/CesiumCartographicPolygonEditor.cs +23 -0
- package/Editor/CesiumCartographicPolygonEditor.cs.meta +11 -0
- package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs +41 -0
- package/Editor/CesiumDebugColorizeTilesRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumEditor.asmdef +26 -0
- package/Editor/CesiumEditor.asmdef.meta +7 -0
- package/Editor/CesiumEditorStyle.cs +188 -0
- package/Editor/CesiumEditorStyle.cs.meta +11 -0
- package/Editor/CesiumEditorUtility.cs +394 -0
- package/Editor/CesiumEditorUtility.cs.meta +11 -0
- package/Editor/CesiumEditorWindow.cs +447 -0
- package/Editor/CesiumEditorWindow.cs.meta +11 -0
- package/Editor/CesiumFlyToControllerEditor.cs +76 -0
- package/Editor/CesiumFlyToControllerEditor.cs.meta +11 -0
- package/Editor/CesiumGeoreferenceEditor.cs +277 -0
- package/Editor/CesiumGeoreferenceEditor.cs.meta +11 -0
- package/Editor/CesiumGlobeAnchorEditor.cs +202 -0
- package/Editor/CesiumGlobeAnchorEditor.cs.meta +11 -0
- package/Editor/CesiumInspectorGUI.cs +187 -0
- package/Editor/CesiumInspectorGUI.cs.meta +11 -0
- package/Editor/CesiumIonAsset.cs +192 -0
- package/Editor/CesiumIonAsset.cs.meta +11 -0
- package/Editor/CesiumIonAssetsWindow.cs +257 -0
- package/Editor/CesiumIonAssetsWindow.cs.meta +11 -0
- package/Editor/CesiumIonRasterOverlayEditor.cs +87 -0
- package/Editor/CesiumIonRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumIonServerManager.cs +153 -0
- package/Editor/CesiumIonServerManager.cs.meta +11 -0
- package/Editor/CesiumIonServerSelector.cs +127 -0
- package/Editor/CesiumIonServerSelector.cs.meta +11 -0
- package/Editor/CesiumIonSession.cs +102 -0
- package/Editor/CesiumIonSession.cs.meta +11 -0
- package/Editor/CesiumPolygonRasterOverlayEditor.cs +102 -0
- package/Editor/CesiumPolygonRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumRasterOverlayEditor.cs +230 -0
- package/Editor/CesiumRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumSubSceneEditor.cs +201 -0
- package/Editor/CesiumSubSceneEditor.cs.meta +11 -0
- package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs +88 -0
- package/Editor/CesiumTileMapServiceRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs +111 -0
- package/Editor/CesiumWebMapServiceRasterOverlayEditor.cs.meta +11 -0
- package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs +277 -0
- package/Editor/CesiumWebMapTileServiceRasterOverlayEditor.cs.meta +3 -0
- package/Editor/CompileCesiumForUnityNative.cs +581 -0
- package/Editor/CompileCesiumForUnityNative.cs.meta +11 -0
- package/Editor/ConfigureReinterop.cs +255 -0
- package/Editor/ConfigureReinterop.cs.meta +11 -0
- package/Editor/Helpers.cs +102 -0
- package/Editor/Helpers.cs.meta +11 -0
- package/Editor/IonAssetsMultiColumnHeader.cs +45 -0
- package/Editor/IonAssetsMultiColumnHeader.cs.meta +11 -0
- package/Editor/IonAssetsTreeView.cs +214 -0
- package/Editor/IonAssetsTreeView.cs.meta +11 -0
- package/Editor/IonMissingAssetWindow.cs +65 -0
- package/Editor/IonMissingAssetWindow.cs.meta +11 -0
- package/Editor/IonTokenTroubleshootingWindow.cs +615 -0
- package/Editor/IonTokenTroubleshootingWindow.cs.meta +11 -0
- package/Editor/NativeDownloadHandler.cs +35 -0
- package/Editor/NativeDownloadHandler.cs.meta +11 -0
- package/Editor/QuickAddItem.cs +43 -0
- package/Editor/QuickAddItem.cs.meta +11 -0
- package/Editor/Resources/Cesium-128x128.png +0 -0
- package/Editor/Resources/Cesium-128x128.png.meta +98 -0
- package/Editor/Resources/Cesium-24x24.png +0 -0
- package/Editor/Resources/Cesium-24x24.png.meta +123 -0
- package/Editor/Resources/Cesium-64x64.png +0 -0
- package/Editor/Resources/Cesium-64x64.png.meta +98 -0
- package/Editor/Resources/Cesium-for-Unity-dark.png +0 -0
- package/Editor/Resources/Cesium-for-Unity-dark.png.meta +123 -0
- package/Editor/Resources/Cesium-for-Unity-light.png +0 -0
- package/Editor/Resources/Cesium-for-Unity-light.png.meta +123 -0
- package/Editor/Resources/Cesium-icon-16x16.png +0 -0
- package/Editor/Resources/Cesium-icon-16x16.png.meta +98 -0
- package/Editor/Resources/FontAwesome/attribution.txt +9 -0
- package/Editor/Resources/FontAwesome/attribution.txt.meta +7 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.png +0 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/book-reader-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/check-solid.png +0 -0
- package/Editor/Resources/FontAwesome/check-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/check-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/check-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/cloud-upload-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/folder.png +0 -0
- package/Editor/Resources/FontAwesome/folder.png.meta +147 -0
- package/Editor/Resources/FontAwesome/folder.svg +5 -0
- package/Editor/Resources/FontAwesome/folder.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.png +0 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/hands-helping-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/key-solid.png +0 -0
- package/Editor/Resources/FontAwesome/key-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/key-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/key-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/plus-solid.png +0 -0
- package/Editor/Resources/FontAwesome/plus-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/plus-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/plus-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/sign-out-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.png +0 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/sync-alt-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome/times-solid.png +0 -0
- package/Editor/Resources/FontAwesome/times-solid.png.meta +98 -0
- package/Editor/Resources/FontAwesome/times-solid.svg +1 -0
- package/Editor/Resources/FontAwesome/times-solid.svg.meta +7 -0
- package/Editor/Resources/FontAwesome.meta +8 -0
- package/Editor/Resources.meta +8 -0
- package/Editor/SelectIonTokenWindow.cs +249 -0
- package/Editor/SelectIonTokenWindow.cs.meta +11 -0
- package/Editor/arm64.meta +8 -0
- package/Editor/csc.rsp +1 -0
- package/Editor/csc.rsp.meta +7 -0
- package/Editor/libCesiumForUnityNative-Editor.so +0 -0
- package/Editor/libCesiumForUnityNative-Editor.so.meta +2 -0
- package/Editor/libCesiumForUnityNative-Runtime.so +0 -0
- package/Editor/libCesiumForUnityNative-Runtime.so.meta +2 -0
- package/Editor/x86_64.meta +8 -0
- package/Editor.meta +8 -0
- package/LICENSE +201 -0
- package/LICENSE.meta +7 -0
- package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so +0 -0
- package/Plugins/Standalone/libCesiumForUnityNative-Runtime.so.meta +2 -0
- package/Plugins/Standalone.meta +8 -0
- package/Plugins.meta +8 -0
- package/README.md +39 -0
- package/README.md.meta +7 -0
- package/Reinterop.deps.json +172 -0
- package/Reinterop.deps.json.meta +7 -0
- package/Reinterop.dll +0 -0
- package/Reinterop.dll.meta +79 -0
- package/Runtime/Cesium3DTile.cs +37 -0
- package/Runtime/Cesium3DTile.cs.meta +11 -0
- package/Runtime/Cesium3DTileset.cs +788 -0
- package/Runtime/Cesium3DTileset.cs.meta +11 -0
- package/Runtime/Cesium3DTilesetLoadFailureDetails.cs +65 -0
- package/Runtime/Cesium3DTilesetLoadFailureDetails.cs.meta +11 -0
- package/Runtime/CesiumBackwardCompatibility.cs +163 -0
- package/Runtime/CesiumBackwardCompatibility.cs.meta +11 -0
- package/Runtime/CesiumBingMapsRasterOverlay.cs +72 -0
- package/Runtime/CesiumBingMapsRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumCameraController.cs +827 -0
- package/Runtime/CesiumCameraController.cs.meta +11 -0
- package/Runtime/CesiumCameraManager.cs +105 -0
- package/Runtime/CesiumCameraManager.cs.meta +11 -0
- package/Runtime/CesiumCartographicPolygon.cs +152 -0
- package/Runtime/CesiumCartographicPolygon.cs.meta +11 -0
- package/Runtime/CesiumCreditSystem.cs +343 -0
- package/Runtime/CesiumCreditSystem.cs.meta +11 -0
- package/Runtime/CesiumCreditSystemUI.cs +402 -0
- package/Runtime/CesiumCreditSystemUI.cs.meta +11 -0
- package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs +21 -0
- package/Runtime/CesiumDebugColorizeTilesRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumEllipsoid.cs +107 -0
- package/Runtime/CesiumEllipsoid.cs.meta +11 -0
- package/Runtime/CesiumFeature.cs +279 -0
- package/Runtime/CesiumFeature.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdAttribute.cs +61 -0
- package/Runtime/CesiumFeatureIdAttribute.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdSet.cs +165 -0
- package/Runtime/CesiumFeatureIdSet.cs.meta +11 -0
- package/Runtime/CesiumFeatureIdTexture.cs +68 -0
- package/Runtime/CesiumFeatureIdTexture.cs.meta +11 -0
- package/Runtime/CesiumFlyToController.cs +539 -0
- package/Runtime/CesiumFlyToController.cs.meta +11 -0
- package/Runtime/CesiumGeoreference.cs +628 -0
- package/Runtime/CesiumGeoreference.cs.meta +11 -0
- package/Runtime/CesiumGlobeAnchor.cs +664 -0
- package/Runtime/CesiumGlobeAnchor.cs.meta +11 -0
- package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs +105 -0
- package/Runtime/CesiumGlobeAnchorBackwardCompatibility0dot2dot0.cs.meta +11 -0
- package/Runtime/CesiumIntMatN.cs +398 -0
- package/Runtime/CesiumIntMatN.cs.meta +11 -0
- package/Runtime/CesiumIntVecN.cs +525 -0
- package/Runtime/CesiumIntVecN.cs.meta +11 -0
- package/Runtime/CesiumIonRasterOverlay.cs +110 -0
- package/Runtime/CesiumIonRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumIonServer.cs +137 -0
- package/Runtime/CesiumIonServer.cs.meta +11 -0
- package/Runtime/CesiumMetadata.cs +33 -0
- package/Runtime/CesiumMetadata.cs.meta +11 -0
- package/Runtime/CesiumMetadataValue.cs +1764 -0
- package/Runtime/CesiumMetadataValue.cs.meta +11 -0
- package/Runtime/CesiumMetadataValueType.cs +203 -0
- package/Runtime/CesiumMetadataValueType.cs.meta +11 -0
- package/Runtime/CesiumModelMetadata.cs +26 -0
- package/Runtime/CesiumModelMetadata.cs.meta +11 -0
- package/Runtime/CesiumObjectPool.cs +74 -0
- package/Runtime/CesiumObjectPool.cs.meta +11 -0
- package/Runtime/CesiumObjectPools.cs +39 -0
- package/Runtime/CesiumObjectPools.cs.meta +11 -0
- package/Runtime/CesiumOriginShift.cs +146 -0
- package/Runtime/CesiumOriginShift.cs.meta +11 -0
- package/Runtime/CesiumPointCloudRenderer.cs +246 -0
- package/Runtime/CesiumPointCloudRenderer.cs.meta +11 -0
- package/Runtime/CesiumPointCloudShading.cs +76 -0
- package/Runtime/CesiumPointCloudShading.cs.meta +11 -0
- package/Runtime/CesiumPolygonRasterOverlay.cs +109 -0
- package/Runtime/CesiumPolygonRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumPrimitiveFeatures.cs +130 -0
- package/Runtime/CesiumPrimitiveFeatures.cs.meta +11 -0
- package/Runtime/CesiumPropertyArray.cs +64 -0
- package/Runtime/CesiumPropertyArray.cs.meta +11 -0
- package/Runtime/CesiumPropertyTable.cs +126 -0
- package/Runtime/CesiumPropertyTable.cs.meta +11 -0
- package/Runtime/CesiumPropertyTableProperty.cs +1734 -0
- package/Runtime/CesiumPropertyTableProperty.cs.meta +11 -0
- package/Runtime/CesiumRasterOverlay.cs +239 -0
- package/Runtime/CesiumRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs +65 -0
- package/Runtime/CesiumRasterOverlayLoadFailureDetails.cs.meta +11 -0
- package/Runtime/CesiumRuntime.asmdef +32 -0
- package/Runtime/CesiumRuntime.asmdef.meta +7 -0
- package/Runtime/CesiumRuntime.cs +3 -0
- package/Runtime/CesiumRuntime.cs.meta +11 -0
- package/Runtime/CesiumRuntimeSettings.cs +188 -0
- package/Runtime/CesiumRuntimeSettings.cs.meta +11 -0
- package/Runtime/CesiumSampleHeightResult.cs +47 -0
- package/Runtime/CesiumSampleHeightResult.cs.meta +11 -0
- package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs +93 -0
- package/Runtime/CesiumSimplePlanarEllipsoidCurve.cs.meta +11 -0
- package/Runtime/CesiumSubScene.cs +473 -0
- package/Runtime/CesiumSubScene.cs.meta +11 -0
- package/Runtime/CesiumTileExcluder.cs +47 -0
- package/Runtime/CesiumTileExcluder.cs.meta +11 -0
- package/Runtime/CesiumTileMapServiceRasterOverlay.cs +93 -0
- package/Runtime/CesiumTileMapServiceRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumWebMapServiceRasterOverlay.cs +129 -0
- package/Runtime/CesiumWebMapServiceRasterOverlay.cs.meta +11 -0
- package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs +414 -0
- package/Runtime/CesiumWebMapTileServiceRasterOverlay.cs.meta +3 -0
- package/Runtime/CesiumWgs84Ellipsoid.cs +75 -0
- package/Runtime/CesiumWgs84Ellipsoid.cs.meta +11 -0
- package/Runtime/ConfigureReinterop.cs +926 -0
- package/Runtime/ConfigureReinterop.cs.meta +11 -0
- package/Runtime/Helpers.cs +122 -0
- package/Runtime/Helpers.cs.meta +11 -0
- package/Runtime/ICesiumRestartable.cs +17 -0
- package/Runtime/ICesiumRestartable.cs.meta +11 -0
- package/Runtime/NativeCoroutine.cs +28 -0
- package/Runtime/NativeCoroutine.cs.meta +11 -0
- package/Runtime/NativeDownloadHandler.cs +29 -0
- package/Runtime/NativeDownloadHandler.cs.meta +11 -0
- package/Runtime/Resources/CesiumCreditSystem.prefab +78 -0
- package/Runtime/Resources/CesiumCreditSystem.prefab.meta +7 -0
- package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss +2 -0
- package/Runtime/Resources/CesiumCreditSystemRuntimeTheme.tss.meta +11 -0
- package/Runtime/Resources/CesiumCreditSystemUI.uxml +4 -0
- package/Runtime/Resources/CesiumCreditSystemUI.uxml.meta +10 -0
- package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset +38 -0
- package/Runtime/Resources/CesiumCreditSystemUIPanelSettings.asset.meta +8 -0
- package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat +232 -0
- package/Runtime/Resources/CesiumDefaultTilesetMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph +14271 -0
- package/Runtime/Resources/CesiumDefaultTilesetShader.shadergraph.meta +10 -0
- package/Runtime/Resources/CesiumPointCloudShading.hlsl +156 -0
- package/Runtime/Resources/CesiumPointCloudShading.hlsl.meta +7 -0
- package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat +125 -0
- package/Runtime/Resources/CesiumPointCloudShadingMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumPointCloudShadingShader.shader +73 -0
- package/Runtime/Resources/CesiumPointCloudShadingShader.shader.meta +10 -0
- package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph +2207 -0
- package/Runtime/Resources/CesiumRasterOverlay.shadersubgraph.meta +10 -0
- package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph +722 -0
- package/Runtime/Resources/CesiumSelectTexCoords.shadersubgraph.meta +10 -0
- package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat +261 -0
- package/Runtime/Resources/CesiumUnlitTilesetMaterial.mat.meta +8 -0
- package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph +5873 -0
- package/Runtime/Resources/CesiumUnlitTilesetShader.shadergraph.meta +10 -0
- package/Runtime/Resources/DynamicCamera.prefab +253 -0
- package/Runtime/Resources/DynamicCamera.prefab.meta +7 -0
- package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph +2171 -0
- package/Runtime/Resources/TransformTextureCoordinates.shadersubgraph.meta +10 -0
- package/Runtime/Resources/green1x1.png +0 -0
- package/Runtime/Resources/green1x1.png.meta +123 -0
- package/Runtime/Resources.meta +8 -0
- package/Runtime/TestGltfModel.cs +56 -0
- package/Runtime/TestGltfModel.cs.meta +11 -0
- package/Runtime/TestReinterop.cs +21 -0
- package/Runtime/TestReinterop.cs.meta +11 -0
- package/Runtime/UnityLifetime.cs +27 -0
- package/Runtime/UnityLifetime.cs.meta +11 -0
- package/Runtime/WaitForTask.cs +25 -0
- package/Runtime/WaitForTask.cs.meta +11 -0
- package/Runtime/csc.rsp +1 -0
- package/Runtime/csc.rsp.meta +7 -0
- package/Runtime.meta +8 -0
- package/ThirdParty.json +27 -0
- package/ThirdParty.json.meta +7 -0
- package/WGS84.asset +18 -0
- package/WGS84.asset.meta +8 -0
- package/package.json +29 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
|
|
4
|
+
namespace CesiumForUnity
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
/// A pyramid of 2D images - sometimes terabytes or more in size - that can be draped over
|
|
8
|
+
/// a <see cref="Cesium3DTileset"/>.
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ExecuteInEditMode]
|
|
11
|
+
public abstract class CesiumRasterOverlay : MonoBehaviour
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// Encapsulates a method that receives details of a raster overlay load failure.
|
|
15
|
+
/// </summary>
|
|
16
|
+
/// <param name="details">The details of the load failure.</param>
|
|
17
|
+
public delegate void RasterOverlayLoadFailureDelegate(
|
|
18
|
+
CesiumRasterOverlayLoadFailureDetails details);
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// An event that is raised when the raster overlay encounters an error that prevents it from loading.
|
|
22
|
+
/// </summary>
|
|
23
|
+
public static event
|
|
24
|
+
RasterOverlayLoadFailureDelegate OnCesiumRasterOverlayLoadFailure;
|
|
25
|
+
|
|
26
|
+
internal static void BroadcastCesiumRasterOverlayLoadFailure(
|
|
27
|
+
CesiumRasterOverlayLoadFailureDetails details)
|
|
28
|
+
{
|
|
29
|
+
if (OnCesiumRasterOverlayLoadFailure != null)
|
|
30
|
+
{
|
|
31
|
+
OnCesiumRasterOverlayLoadFailure(details);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[SerializeField]
|
|
36
|
+
private string _materialKey = "0";
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// The key to use to match this overlay to the corresponding parameters in the tileset's material.
|
|
40
|
+
/// </summary>
|
|
41
|
+
/// <remarks>
|
|
42
|
+
/// In the tileset's materials, an overlay requires parameters for its texture, texture coordinate index,
|
|
43
|
+
/// and translation and scale. Overlays must specify a string key to match with the correct parameters.
|
|
44
|
+
/// The format of these parameters is as follows.
|
|
45
|
+
/// <list type="bullet">
|
|
46
|
+
/// <item><b>Overlay Texture</b>: _overlayTexture_KEY</item>
|
|
47
|
+
/// <item><b>Overlay Texture Coordinate Index</b>: _overlayTextureCoordinateIndex_KEY</item>
|
|
48
|
+
/// <item><b>Overlay Translation and Scale</b>: _overlayTranslationScale_KEY</item>
|
|
49
|
+
/// </list>
|
|
50
|
+
/// Material keys are useful for specifying the order of the raster overlays, or distinguishing them for
|
|
51
|
+
/// overlay-specific effects.
|
|
52
|
+
/// </remarks>
|
|
53
|
+
public string materialKey
|
|
54
|
+
{
|
|
55
|
+
get => this._materialKey;
|
|
56
|
+
set
|
|
57
|
+
{
|
|
58
|
+
this._materialKey = value;
|
|
59
|
+
this.Refresh();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[SerializeField]
|
|
64
|
+
private bool _showCreditsOnScreen = false;
|
|
65
|
+
|
|
66
|
+
/// <summary>
|
|
67
|
+
/// Whether or not to force this raster overlay's credits to be shown on the main screen. If false, the
|
|
68
|
+
/// credits are usually only shown on a "Data Attribution" popup.
|
|
69
|
+
/// </summary>
|
|
70
|
+
public bool showCreditsOnScreen
|
|
71
|
+
{
|
|
72
|
+
get => this._showCreditsOnScreen;
|
|
73
|
+
set
|
|
74
|
+
{
|
|
75
|
+
this._showCreditsOnScreen = value;
|
|
76
|
+
this.Refresh();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[SerializeField]
|
|
81
|
+
private float _maximumScreenSpaceError = 2.0f;
|
|
82
|
+
|
|
83
|
+
/// <summary>
|
|
84
|
+
/// The maximum number of pixels of error when rendering this overlay.
|
|
85
|
+
/// This is used to select an appropriate level-of-detail.
|
|
86
|
+
/// </summary>
|
|
87
|
+
/// <remarks>
|
|
88
|
+
/// When this property has its default value, 2.0, it means that raster overlay
|
|
89
|
+
/// images will be sized so that, when zoomed in closest, a single pixel in
|
|
90
|
+
/// the raster overlay maps to approximately 2x2 pixels on the screen.
|
|
91
|
+
/// </remarks>
|
|
92
|
+
public float maximumScreenSpaceError
|
|
93
|
+
{
|
|
94
|
+
get => this._maximumScreenSpaceError;
|
|
95
|
+
set
|
|
96
|
+
{
|
|
97
|
+
this._maximumScreenSpaceError = value;
|
|
98
|
+
this.Refresh();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[SerializeField]
|
|
103
|
+
private int _maximumTextureSize = 2048;
|
|
104
|
+
|
|
105
|
+
/// <summary>
|
|
106
|
+
/// The maximum texel size of raster overlay textures, in either direction.
|
|
107
|
+
/// </summary>
|
|
108
|
+
/// <remarks>
|
|
109
|
+
/// Images created by this overlay will be no more than this number of texels
|
|
110
|
+
/// in either direction.This may result in reduced raster overlay detail in
|
|
111
|
+
/// some cases.
|
|
112
|
+
/// </remarks>
|
|
113
|
+
public int maximumTextureSize
|
|
114
|
+
{
|
|
115
|
+
get => this._maximumTextureSize;
|
|
116
|
+
set
|
|
117
|
+
{
|
|
118
|
+
this._maximumTextureSize = value;
|
|
119
|
+
this.Refresh();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[SerializeField]
|
|
124
|
+
private int _maximumSimultaneousTileLoads = 20;
|
|
125
|
+
|
|
126
|
+
/// <summary>
|
|
127
|
+
/// The maximum number of overlay tiles that may simultaneously be in
|
|
128
|
+
/// the process of loading.
|
|
129
|
+
/// </summary>
|
|
130
|
+
public int maximumSimultaneousTileLoads
|
|
131
|
+
{
|
|
132
|
+
get => this._maximumSimultaneousTileLoads;
|
|
133
|
+
set
|
|
134
|
+
{
|
|
135
|
+
this._maximumSimultaneousTileLoads = value;
|
|
136
|
+
this.Refresh();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[SerializeField]
|
|
141
|
+
private long _subTileCacheBytes = 16 * 1024 * 1024;
|
|
142
|
+
|
|
143
|
+
/// <summary>
|
|
144
|
+
/// The maximum number of bytes to use to cache sub-tiles in memory.
|
|
145
|
+
/// </summary>
|
|
146
|
+
/// <remarks>
|
|
147
|
+
/// This is used by provider types that have an underlying tiling
|
|
148
|
+
/// scheme that may not align with the tiling scheme of the geometry tiles on
|
|
149
|
+
/// which the raster overlay tiles are draped. Because a single sub-tile may
|
|
150
|
+
/// overlap multiple geometry tiles, it is useful to cache loaded sub-tiles
|
|
151
|
+
/// in memory in case they're needed again soon. This property controls the
|
|
152
|
+
/// maximum size of that cache.
|
|
153
|
+
/// </remarks>
|
|
154
|
+
public long subTileCacheBytes
|
|
155
|
+
{
|
|
156
|
+
get => this._subTileCacheBytes;
|
|
157
|
+
set
|
|
158
|
+
{
|
|
159
|
+
this._subTileCacheBytes = value;
|
|
160
|
+
this.Refresh();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/// <summary>
|
|
165
|
+
/// Adds this raster overlay to the <see cref="Cesium3DTileset"/> on the same game object.
|
|
166
|
+
/// </summary>
|
|
167
|
+
/// <remarks>
|
|
168
|
+
/// If the overlay is already added or if the game object does not have a <see cref="Cesium3DTileset"/>,
|
|
169
|
+
/// this method does nothing.
|
|
170
|
+
/// </remarks>
|
|
171
|
+
public void AddToTileset()
|
|
172
|
+
{
|
|
173
|
+
Cesium3DTileset tileset = this.gameObject.GetComponent<Cesium3DTileset>();
|
|
174
|
+
if (tileset == null)
|
|
175
|
+
return;
|
|
176
|
+
|
|
177
|
+
// In case the material key changed, register the new key with the tileset.
|
|
178
|
+
tileset.UpdateOverlayMaterialKeys();
|
|
179
|
+
|
|
180
|
+
this.AddToTileset(tileset);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/// <summary>
|
|
184
|
+
/// Removes this raster overlay from the <see cref="Cesium3DTileset"/> on the same game object.
|
|
185
|
+
/// </summary>
|
|
186
|
+
/// <remarks>
|
|
187
|
+
/// If the overlay is not yet added or if the game object does not have a <see cref="Cesium3DTileset"/>,
|
|
188
|
+
/// this method does nothing.
|
|
189
|
+
/// </remarks>
|
|
190
|
+
public void RemoveFromTileset()
|
|
191
|
+
{
|
|
192
|
+
Cesium3DTileset tileset = this.gameObject.GetComponent<Cesium3DTileset>();
|
|
193
|
+
if (tileset == null)
|
|
194
|
+
return;
|
|
195
|
+
|
|
196
|
+
this.RemoveFromTileset(tileset);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/// <summary>
|
|
200
|
+
/// Refreshes this overlay by calling <see cref="RemoveFromTileset"/> followed by
|
|
201
|
+
/// <see cref="AddToTileset"/>. If the game object does not have a <see cref="Cesium3DTileset"/>,
|
|
202
|
+
/// this method does nothing.
|
|
203
|
+
/// </summary>
|
|
204
|
+
public void Refresh()
|
|
205
|
+
{
|
|
206
|
+
this.RemoveFromTileset();
|
|
207
|
+
|
|
208
|
+
if (this.enabled)
|
|
209
|
+
this.AddToTileset();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
private void OnEnable()
|
|
213
|
+
{
|
|
214
|
+
this.AddToTileset();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private void OnDisable()
|
|
218
|
+
{
|
|
219
|
+
this.RemoveFromTileset();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private void OnValidate()
|
|
223
|
+
{
|
|
224
|
+
this.Refresh();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/// <summary>
|
|
228
|
+
/// When implemented in a derived class, adds the raster overlay to the given tileset.
|
|
229
|
+
/// </summary>
|
|
230
|
+
/// <param name="tileset">The tileset.</param>
|
|
231
|
+
protected abstract void AddToTileset(Cesium3DTileset tileset);
|
|
232
|
+
|
|
233
|
+
/// <summary>
|
|
234
|
+
/// When implemented in a derived class, removes the raster overlay from the given tileset.
|
|
235
|
+
/// </summary>
|
|
236
|
+
/// <param name="tileset">The tileset.</param>
|
|
237
|
+
protected abstract void RemoveFromTileset(Cesium3DTileset tileset);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
namespace CesiumForUnity
|
|
2
|
+
{
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// The type of <see cref="CesiumRasterOverlay"/> load that encountered an error.
|
|
5
|
+
/// </summary>
|
|
6
|
+
public enum CesiumRasterOverlayLoadType
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// An unknown load error.
|
|
10
|
+
/// </summary>
|
|
11
|
+
Unknown,
|
|
12
|
+
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// A Cesium ion asset endpoint.
|
|
15
|
+
/// </summary>
|
|
16
|
+
CesiumIon,
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// An initial load needed to create the overlay's tile provider.
|
|
20
|
+
/// </summary>
|
|
21
|
+
TileProvider
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
/// Holds details of a <see cref="CesiumRasterOverlay"/> load failure.
|
|
26
|
+
/// </summary>
|
|
27
|
+
public struct CesiumRasterOverlayLoadFailureDetails
|
|
28
|
+
{
|
|
29
|
+
/// <summary>
|
|
30
|
+
/// The overlay that encountered the load failure.
|
|
31
|
+
/// </summary>
|
|
32
|
+
public CesiumRasterOverlay overlay;
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
/// The type of request that failed to load.
|
|
36
|
+
/// </summary>
|
|
37
|
+
public CesiumRasterOverlayLoadType type;
|
|
38
|
+
|
|
39
|
+
/// <summary>
|
|
40
|
+
/// The HTTP status code of the response that led to the failure.
|
|
41
|
+
/// </summary>
|
|
42
|
+
/// <remarks>
|
|
43
|
+
/// If there was no response or the failure did not follow from a request, then
|
|
44
|
+
/// the value of this property will be 0.
|
|
45
|
+
/// </remarks>
|
|
46
|
+
public long httpStatusCode;
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// A human-readable explanation of what failed.
|
|
50
|
+
/// </summary>
|
|
51
|
+
public string message;
|
|
52
|
+
|
|
53
|
+
public CesiumRasterOverlayLoadFailureDetails(
|
|
54
|
+
CesiumRasterOverlay overlay,
|
|
55
|
+
CesiumRasterOverlayLoadType type,
|
|
56
|
+
long httpStatusCode,
|
|
57
|
+
string message)
|
|
58
|
+
{
|
|
59
|
+
this.overlay = overlay;
|
|
60
|
+
this.type = type;
|
|
61
|
+
this.httpStatusCode = httpStatusCode;
|
|
62
|
+
this.message = message;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "CesiumRuntime",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"Unity.InputSystem",
|
|
6
|
+
"Unity.Mathematics",
|
|
7
|
+
"Unity.Splines"
|
|
8
|
+
],
|
|
9
|
+
"includePlatforms": [
|
|
10
|
+
"Android",
|
|
11
|
+
"Editor",
|
|
12
|
+
"iOS",
|
|
13
|
+
"macOSStandalone",
|
|
14
|
+
"WSA",
|
|
15
|
+
"WindowsStandalone64",
|
|
16
|
+
"LinuxStandalone64"
|
|
17
|
+
],
|
|
18
|
+
"excludePlatforms": [],
|
|
19
|
+
"allowUnsafeCode": true,
|
|
20
|
+
"overrideReferences": false,
|
|
21
|
+
"precompiledReferences": [],
|
|
22
|
+
"autoReferenced": true,
|
|
23
|
+
"defineConstraints": [],
|
|
24
|
+
"versionDefines": [
|
|
25
|
+
{
|
|
26
|
+
"name": "com.unity.splines",
|
|
27
|
+
"expression": "1.0.0",
|
|
28
|
+
"define": "SUPPORTS_SPLINES"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"noEngineReferences": false
|
|
32
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using System;
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#if UNITY_EDITOR
|
|
6
|
+
using UnityEditor;
|
|
7
|
+
#endif
|
|
8
|
+
|
|
9
|
+
namespace CesiumForUnity
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// Holds Cesium settings used at runtime.
|
|
13
|
+
/// </summary>
|
|
14
|
+
public sealed class CesiumRuntimeSettings : ScriptableObject
|
|
15
|
+
{
|
|
16
|
+
private static readonly string _settingsName = "CesiumSettings";
|
|
17
|
+
private static readonly string _filePath =
|
|
18
|
+
"Assets/" + _settingsName + "/Resources/CesiumRuntimeSettings.asset";
|
|
19
|
+
|
|
20
|
+
private static CesiumRuntimeSettings _instance;
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// Gets the singleton instance of this class. If the project does not yet contain an instance,
|
|
24
|
+
/// one is created and added at the specified file path.
|
|
25
|
+
/// </summary>
|
|
26
|
+
public static CesiumRuntimeSettings instance
|
|
27
|
+
{
|
|
28
|
+
get
|
|
29
|
+
{
|
|
30
|
+
if (_instance != null)
|
|
31
|
+
{
|
|
32
|
+
return _instance;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#if UNITY_EDITOR
|
|
36
|
+
_instance = AssetDatabase.LoadAssetAtPath(_filePath, typeof(CesiumRuntimeSettings))
|
|
37
|
+
as CesiumRuntimeSettings;
|
|
38
|
+
#else
|
|
39
|
+
_instance =
|
|
40
|
+
Resources.Load("CesiumRuntimeSettings") as CesiumRuntimeSettings;
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#if UNITY_EDITOR
|
|
44
|
+
if (_instance == null)
|
|
45
|
+
{
|
|
46
|
+
// Create the necessary folders if they don't already exist.
|
|
47
|
+
if (!AssetDatabase.IsValidFolder("Assets/" + _settingsName))
|
|
48
|
+
{
|
|
49
|
+
AssetDatabase.CreateFolder("Assets", _settingsName);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!AssetDatabase.IsValidFolder("Assets/" + _settingsName + "/Resources"))
|
|
53
|
+
{
|
|
54
|
+
AssetDatabase.CreateFolder("Assets/" + _settingsName, "Resources");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
string typeString = "t:"+ typeof(CesiumRuntimeSettings).Name;
|
|
58
|
+
|
|
59
|
+
string[] instanceGUIDS = AssetDatabase.FindAssets(typeString);
|
|
60
|
+
|
|
61
|
+
// If a CesiumRuntimeSettings asset is found outside of the preferred
|
|
62
|
+
// file path, move it to the correct location.
|
|
63
|
+
if (instanceGUIDS.Length > 0)
|
|
64
|
+
{
|
|
65
|
+
if (instanceGUIDS.Length > 1)
|
|
66
|
+
{
|
|
67
|
+
Debug.LogWarning("Found multiple CesiumRuntimeSettings assets " +
|
|
68
|
+
"in the project folder. The first asset found will be used.");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
string oldPath = AssetDatabase.GUIDToAssetPath(instanceGUIDS[0]);
|
|
72
|
+
_instance =
|
|
73
|
+
AssetDatabase.LoadAssetAtPath(oldPath, typeof(CesiumRuntimeSettings))
|
|
74
|
+
as CesiumRuntimeSettings;
|
|
75
|
+
if(_instance != null)
|
|
76
|
+
{
|
|
77
|
+
string result = AssetDatabase.MoveAsset(oldPath, _filePath);
|
|
78
|
+
AssetDatabase.Refresh();
|
|
79
|
+
if (string.IsNullOrEmpty(result))
|
|
80
|
+
{
|
|
81
|
+
Debug.LogWarning("A CesiumRuntimeSettings asset was found outside " +
|
|
82
|
+
"the Assets/" + _settingsName + "/Resources folder and has been moved " +
|
|
83
|
+
"appropriately.");
|
|
84
|
+
|
|
85
|
+
return _instance;
|
|
86
|
+
}
|
|
87
|
+
else
|
|
88
|
+
{
|
|
89
|
+
Debug.LogWarning("A CesiumRuntimeSettings asset was found outside " +
|
|
90
|
+
"the Assets/" + _settingsName + "/Resources folder, but could not " +
|
|
91
|
+
"be moved to the appropriate location. A new settings asset will be " +
|
|
92
|
+
"created instead.");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else
|
|
96
|
+
{
|
|
97
|
+
Debug.LogWarning("An invalid CesiumRuntimeSettings asset was found " +
|
|
98
|
+
"outside the Assets/" + _settingsName + "/Resources folder. " +
|
|
99
|
+
"A new settings asset will be created instead.");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
#endif
|
|
104
|
+
|
|
105
|
+
if (_instance == null)
|
|
106
|
+
{
|
|
107
|
+
// Create an instance even if the game is not running in the editor
|
|
108
|
+
// to prevent a crash.
|
|
109
|
+
_instance = ScriptableObject.CreateInstance<CesiumRuntimeSettings>();
|
|
110
|
+
#if UNITY_EDITOR
|
|
111
|
+
AssetDatabase.CreateAsset(_instance, _filePath);
|
|
112
|
+
AssetDatabase.Refresh();
|
|
113
|
+
#else
|
|
114
|
+
Debug.LogError("Cannot find a CesiumRuntimeSettings asset. " +
|
|
115
|
+
"Any assets that use the project's default token will not load.");
|
|
116
|
+
#endif
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return _instance;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[SerializeField]
|
|
124
|
+
private string _defaultIonAccessTokenID = "";
|
|
125
|
+
|
|
126
|
+
/// <summary>
|
|
127
|
+
/// The ID of the default Cesium ion access token to use within the project.
|
|
128
|
+
/// </summary>
|
|
129
|
+
[Obsolete("Define a CesiumIonServer instead.")]
|
|
130
|
+
public static string defaultIonAccessTokenID
|
|
131
|
+
{
|
|
132
|
+
get => instance._defaultIonAccessTokenID;
|
|
133
|
+
#if UNITY_EDITOR
|
|
134
|
+
set
|
|
135
|
+
{
|
|
136
|
+
instance._defaultIonAccessTokenID = value;
|
|
137
|
+
EditorUtility.SetDirty(_instance);
|
|
138
|
+
AssetDatabase.SaveAssetIfDirty(_instance);
|
|
139
|
+
AssetDatabase.Refresh();
|
|
140
|
+
}
|
|
141
|
+
#endif
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[SerializeField]
|
|
145
|
+
private string _defaultIonAccessToken = "";
|
|
146
|
+
|
|
147
|
+
/// <summary>
|
|
148
|
+
/// The default Cesium ion access token value to use within the project.
|
|
149
|
+
/// </summary>
|
|
150
|
+
[Obsolete("Define a CesiumIonServer instead.")]
|
|
151
|
+
public static string defaultIonAccessToken
|
|
152
|
+
{
|
|
153
|
+
get => instance._defaultIonAccessToken;
|
|
154
|
+
#if UNITY_EDITOR
|
|
155
|
+
set
|
|
156
|
+
{
|
|
157
|
+
instance._defaultIonAccessToken = value;
|
|
158
|
+
EditorUtility.SetDirty(_instance);
|
|
159
|
+
AssetDatabase.SaveAssetIfDirty(_instance);
|
|
160
|
+
AssetDatabase.Refresh();
|
|
161
|
+
}
|
|
162
|
+
#endif
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[SerializeField]
|
|
166
|
+
[Tooltip("The number of requests to handle before each prune of old cached results from the database. Must restart Unity to apply changes.")]
|
|
167
|
+
private int _requestsPerCachePrune = 10000;
|
|
168
|
+
|
|
169
|
+
/// <summary>
|
|
170
|
+
/// The number of requests to handle before each prune of old cached results from the database.
|
|
171
|
+
/// </summary>
|
|
172
|
+
public static int requestsPerCachePrune
|
|
173
|
+
{
|
|
174
|
+
get => instance._requestsPerCachePrune;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[SerializeField]
|
|
178
|
+
[Tooltip("The maximum number of items should be kept in the Sqlite database after pruning. Must restart Unity to apply changes.")]
|
|
179
|
+
private ulong _maxItems = 4096;
|
|
180
|
+
/// <summary>
|
|
181
|
+
/// The maximum number of items should be kept in the Sqlite database after pruning.
|
|
182
|
+
/// </summary>
|
|
183
|
+
public static ulong maxItems
|
|
184
|
+
{
|
|
185
|
+
get => instance._maxItems;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
using Unity.Mathematics;
|
|
2
|
+
|
|
3
|
+
namespace CesiumForUnity
|
|
4
|
+
{
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// The asynchronous result of a call to <see cref="Cesium3DTileset.SampleHeightMostDetailed"/>.
|
|
7
|
+
/// </summary>
|
|
8
|
+
public class CesiumSampleHeightResult
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// The positions and their sampled heights. The X component is Longitude (degrees),
|
|
12
|
+
/// the Y component is Latitude (degrees), and the Z component is Height (meters)
|
|
13
|
+
/// above the ellipsoid (usually WGS84).
|
|
14
|
+
/// </summary>
|
|
15
|
+
/// <remarks>
|
|
16
|
+
/// <para>
|
|
17
|
+
/// For each resulting position, its longitude and latitude values will match
|
|
18
|
+
/// values from its input. Its height will either be the height sampled from
|
|
19
|
+
/// the tileset at that position, or the original input height if the sample
|
|
20
|
+
/// was unsuccessful. To determine which, look at the value of
|
|
21
|
+
/// <see cref="CesiumSampleHeightResult.sampleSuccess"/> at the same index.
|
|
22
|
+
/// </para>
|
|
23
|
+
/// <para>
|
|
24
|
+
/// The returned height is measured from the ellipsoid (usually WGS84) and
|
|
25
|
+
/// should not be confused with a height above Mean Sea Level.
|
|
26
|
+
/// </para>
|
|
27
|
+
/// </remarks>
|
|
28
|
+
public double3[] longitudeLatitudeHeightPositions { get; set; }
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
/// Indicates whether the height for the position at the corresponding index was sampled
|
|
32
|
+
/// successfully.
|
|
33
|
+
/// </summary>
|
|
34
|
+
/// <remarks>
|
|
35
|
+
/// If true, then the corresponding position in
|
|
36
|
+
/// <see cref="CesiumSampleHeightResult.longitudeLatitudeHeightPositions"/> uses
|
|
37
|
+
/// the height sampled from the tileset. If false, the height could not be sampled for
|
|
38
|
+
/// the position, so its height is the same as the original input height.
|
|
39
|
+
/// </remarks>
|
|
40
|
+
public bool[] sampleSuccess { get; set; }
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
/// Any warnings that occurred while sampling heights.
|
|
44
|
+
/// </summary>
|
|
45
|
+
public string[] warnings { get; set; }
|
|
46
|
+
}
|
|
47
|
+
}
|