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,788 @@
|
|
|
1
|
+
using Reinterop;
|
|
2
|
+
using System;
|
|
3
|
+
using System.Collections;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using System.Threading.Tasks;
|
|
6
|
+
using Unity.Mathematics;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
|
|
9
|
+
namespace CesiumForUnity
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// Specifies the source of a Cesium dataset.
|
|
13
|
+
/// </summary>
|
|
14
|
+
public enum CesiumDataSource
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
/// The dataset is from Cesium ion.
|
|
18
|
+
/// </summary>
|
|
19
|
+
FromCesiumIon,
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
/// The dataset is from a regular web URL.
|
|
23
|
+
/// </summary>
|
|
24
|
+
FromUrl,
|
|
25
|
+
|
|
26
|
+
/// <summary>
|
|
27
|
+
/// The dataset is generated from the georeference ellipsoid.
|
|
28
|
+
/// </summary>
|
|
29
|
+
FromEllipsoid
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// A tileset in the 3D Tiles format. <see href="https://github.com/CesiumGS/3d-tiles">3D Tiles</see>
|
|
34
|
+
/// is an open specification for sharing, visualizing, fusing, and interacting with massive
|
|
35
|
+
/// heterogenous 3D geospatial content across desktop, web, and mobile applications. The tileset is
|
|
36
|
+
/// streamed incrementally into Unity based on the current camera view(s).
|
|
37
|
+
/// </summary>
|
|
38
|
+
/// <remarks>
|
|
39
|
+
/// <para>
|
|
40
|
+
/// A GameObject with this component must be nested inside one with a <see cref="CesiumGeoreference"/>
|
|
41
|
+
/// component. The georeference controls how this tileset is mapped into the Unity world.
|
|
42
|
+
/// </para>
|
|
43
|
+
/// <para>
|
|
44
|
+
/// In most cases, the Transform of the GameObject that contains this component, and its ancestors, should
|
|
45
|
+
/// be an identity transform: 0 position, 0 rotation, 1 scale. Otherwise, this tileset will be misaligned
|
|
46
|
+
/// with other globe tilesets. However, it is sometimes useful to purposely offset a tileset.
|
|
47
|
+
/// </para>
|
|
48
|
+
/// </remarks>
|
|
49
|
+
[ExecuteInEditMode]
|
|
50
|
+
[ReinteropNativeImplementation("CesiumForUnityNative::Cesium3DTilesetImpl", "Cesium3DTilesetImpl.h")]
|
|
51
|
+
[AddComponentMenu("Cesium/Cesium 3D Tileset")]
|
|
52
|
+
[IconAttribute("Packages/com.cesium.unity/Editor/Resources/Cesium-24x24.png")]
|
|
53
|
+
public partial class Cesium3DTileset : MonoBehaviour, IDisposable, ISerializationCallbackReceiver
|
|
54
|
+
{
|
|
55
|
+
public void Dispose()
|
|
56
|
+
{
|
|
57
|
+
this.OnDisable();
|
|
58
|
+
this.DisposeImplementation();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#region Events and Delegates
|
|
62
|
+
|
|
63
|
+
/// <summary>
|
|
64
|
+
/// Encapsulates a method that receives details of a tileset load failure.
|
|
65
|
+
/// </summary>
|
|
66
|
+
/// <param name="details">The details of the load failure.</param>
|
|
67
|
+
public delegate void TilesetLoadFailureDelegate(
|
|
68
|
+
Cesium3DTilesetLoadFailureDetails details);
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
/// An event that is raised when the tileset encounters an error that prevents it from loading.
|
|
72
|
+
/// </summary>
|
|
73
|
+
public static event TilesetLoadFailureDelegate OnCesium3DTilesetLoadFailure;
|
|
74
|
+
|
|
75
|
+
internal static void
|
|
76
|
+
BroadcastCesium3DTilesetLoadFailure(Cesium3DTilesetLoadFailureDetails details)
|
|
77
|
+
{
|
|
78
|
+
if (OnCesium3DTilesetLoadFailure != null)
|
|
79
|
+
{
|
|
80
|
+
OnCesium3DTilesetLoadFailure(details);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/// <summary>
|
|
84
|
+
/// Occurs when a new GameObject is instantiated for a Tile in the tileset.
|
|
85
|
+
/// </summary>
|
|
86
|
+
/// <remarks>
|
|
87
|
+
/// This event can be used to customize the Tile GameObjects as they are loaded,
|
|
88
|
+
/// such as adding components, changing materials, or applying transformations.
|
|
89
|
+
/// </remarks>
|
|
90
|
+
public event Action<GameObject> OnTileGameObjectCreated;
|
|
91
|
+
|
|
92
|
+
internal void BroadcastNewGameObjectCreated(GameObject go)
|
|
93
|
+
{
|
|
94
|
+
if (OnTileGameObjectCreated != null)
|
|
95
|
+
{
|
|
96
|
+
OnTileGameObjectCreated(go);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
internal static event Action OnSetShowCreditsOnScreen;
|
|
101
|
+
|
|
102
|
+
#endregion
|
|
103
|
+
|
|
104
|
+
#region Fields
|
|
105
|
+
[SerializeField]
|
|
106
|
+
private bool _showCreditsOnScreen = false;
|
|
107
|
+
|
|
108
|
+
/// <summary>
|
|
109
|
+
/// Whether or not to force this tileset's credits to be shown on the main screen. If false, the
|
|
110
|
+
/// credits are usually only shown on a "Data Attribution" popup.
|
|
111
|
+
/// </summary>
|
|
112
|
+
public bool showCreditsOnScreen
|
|
113
|
+
{
|
|
114
|
+
get => this._showCreditsOnScreen;
|
|
115
|
+
set
|
|
116
|
+
{
|
|
117
|
+
this._showCreditsOnScreen = value;
|
|
118
|
+
this.SetShowCreditsOnScreen(this._showCreditsOnScreen);
|
|
119
|
+
if (Cesium3DTileset.OnSetShowCreditsOnScreen != null)
|
|
120
|
+
{
|
|
121
|
+
Cesium3DTileset.OnSetShowCreditsOnScreen();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
[SerializeField]
|
|
128
|
+
private CesiumDataSource _tilesetSource = CesiumDataSource.FromCesiumIon;
|
|
129
|
+
|
|
130
|
+
/// <summary>
|
|
131
|
+
/// The source of the data for this tileset: Cesium ion or a regular URL.
|
|
132
|
+
/// </summary>
|
|
133
|
+
public CesiumDataSource tilesetSource
|
|
134
|
+
{
|
|
135
|
+
get => this._tilesetSource;
|
|
136
|
+
set
|
|
137
|
+
{
|
|
138
|
+
this._tilesetSource = value;
|
|
139
|
+
this.RecreateTileset();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
[SerializeField]
|
|
144
|
+
private string _url = "";
|
|
145
|
+
|
|
146
|
+
/// <summary>
|
|
147
|
+
/// The URL from which to load the tileset. This property is used only if
|
|
148
|
+
/// <see cref="tilesetSource"/> is set to "FromUrl".
|
|
149
|
+
/// </summary>
|
|
150
|
+
public string url
|
|
151
|
+
{
|
|
152
|
+
get => this._url;
|
|
153
|
+
set
|
|
154
|
+
{
|
|
155
|
+
this._url = value;
|
|
156
|
+
this.RecreateTileset();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[SerializeField]
|
|
161
|
+
private long _ionAssetID = 0;
|
|
162
|
+
|
|
163
|
+
/// <summary>
|
|
164
|
+
/// The Cesium ion asset ID from which to load the tileset. This property is used
|
|
165
|
+
/// only if <see cref="tilesetSource"/> is set to "FromCesiumIon".
|
|
166
|
+
/// </summary>
|
|
167
|
+
public long ionAssetID
|
|
168
|
+
{
|
|
169
|
+
get => this._ionAssetID;
|
|
170
|
+
set
|
|
171
|
+
{
|
|
172
|
+
this._ionAssetID = value;
|
|
173
|
+
this.RecreateTileset();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[SerializeField]
|
|
178
|
+
private string _ionAccessToken = "";
|
|
179
|
+
|
|
180
|
+
/// <summary>
|
|
181
|
+
/// The Cesium ion access token to use when loading the tileset from Cesium ion. This property is used
|
|
182
|
+
/// only if <see cref="tilesetSource"/> is set to "FromCesiumIon".
|
|
183
|
+
/// </summary>
|
|
184
|
+
public string ionAccessToken
|
|
185
|
+
{
|
|
186
|
+
get => this._ionAccessToken;
|
|
187
|
+
set
|
|
188
|
+
{
|
|
189
|
+
this._ionAccessToken = value;
|
|
190
|
+
this.RecreateTileset();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
[SerializeField]
|
|
195
|
+
private CesiumIonServer _ionServer = null;
|
|
196
|
+
|
|
197
|
+
/// <summary>
|
|
198
|
+
/// The Cesium ion server from which this tileset is loaded.
|
|
199
|
+
/// </summary>
|
|
200
|
+
public CesiumIonServer ionServer
|
|
201
|
+
{
|
|
202
|
+
get
|
|
203
|
+
{
|
|
204
|
+
if (this._ionServer == null)
|
|
205
|
+
{
|
|
206
|
+
#if UNITY_EDITOR
|
|
207
|
+
// See OnAfterDeserialize.
|
|
208
|
+
if (this._useDefaultServer)
|
|
209
|
+
this._ionServer = CesiumIonServer.defaultServer;
|
|
210
|
+
else
|
|
211
|
+
this._ionServer = CesiumIonServer.serverForNewObjects;
|
|
212
|
+
|
|
213
|
+
this._useDefaultServer = false;
|
|
214
|
+
#else
|
|
215
|
+
this._ionServer = CesiumIonServer.serverForNewObjects;
|
|
216
|
+
#endif
|
|
217
|
+
}
|
|
218
|
+
return this._ionServer;
|
|
219
|
+
}
|
|
220
|
+
set
|
|
221
|
+
{
|
|
222
|
+
if (value == null) value = CesiumIonServer.serverForNewObjects;
|
|
223
|
+
this._ionServer = value;
|
|
224
|
+
this.RecreateTileset();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
[SerializeField]
|
|
229
|
+
private float _maximumScreenSpaceError = 16.0f;
|
|
230
|
+
|
|
231
|
+
/// <summary>
|
|
232
|
+
/// The maximum number of pixels of error when rendering this tileset.
|
|
233
|
+
/// </summary>
|
|
234
|
+
/// <remarks>
|
|
235
|
+
/// <para>
|
|
236
|
+
/// This is used to select an appropriate level-of-detail: A low value
|
|
237
|
+
/// will cause many tiles with a high level of detail to be loaded, causing
|
|
238
|
+
/// a finer visual representation of the tiles, but with a higher performance
|
|
239
|
+
/// cost for loading and rendering. A higher value will cause a coarser
|
|
240
|
+
/// visual representation, with lower performance requirements.
|
|
241
|
+
/// </para>
|
|
242
|
+
/// <para>
|
|
243
|
+
/// When a tileset uses the older layer.json / quantized-mesh format rather
|
|
244
|
+
/// than 3D Tiles, this value is effectively divided by 8.0. So the default
|
|
245
|
+
/// value of 16.0 corresponds to the standard value for quantized-mesh
|
|
246
|
+
/// terrain of 2.0.
|
|
247
|
+
/// </para>
|
|
248
|
+
/// </remarks>
|
|
249
|
+
public float maximumScreenSpaceError
|
|
250
|
+
{
|
|
251
|
+
get => this._maximumScreenSpaceError;
|
|
252
|
+
set
|
|
253
|
+
{
|
|
254
|
+
this._maximumScreenSpaceError = value;
|
|
255
|
+
this.RecreateTileset();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[SerializeField]
|
|
260
|
+
private bool _preloadAncestors = true;
|
|
261
|
+
|
|
262
|
+
/// <summary>
|
|
263
|
+
/// Whether to preload ancestor tiles.
|
|
264
|
+
/// </summary>
|
|
265
|
+
/// <remarks>
|
|
266
|
+
/// Setting this to true optimizes the zoom-out experience and provides more
|
|
267
|
+
/// detail in newly-exposed areas when panning. The down side is that it
|
|
268
|
+
/// requires loading more tiles.
|
|
269
|
+
/// </remarks>
|
|
270
|
+
public bool preloadAncestors
|
|
271
|
+
{
|
|
272
|
+
get => this._preloadAncestors;
|
|
273
|
+
set
|
|
274
|
+
{
|
|
275
|
+
this._preloadAncestors = value;
|
|
276
|
+
this.RecreateTileset();
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[SerializeField]
|
|
281
|
+
private bool _preloadSiblings = true;
|
|
282
|
+
|
|
283
|
+
/// <summary>
|
|
284
|
+
/// Whether to preload sibling tiles.
|
|
285
|
+
/// </summary>
|
|
286
|
+
/// <remarks>
|
|
287
|
+
/// Setting this to true causes tiles with the same parent as a rendered
|
|
288
|
+
/// tile to be loaded, even if they are culled. Setting this to true may
|
|
289
|
+
/// provide a better panning experience at the cost of loading more tiles.
|
|
290
|
+
/// </remarks>
|
|
291
|
+
public bool preloadSiblings
|
|
292
|
+
{
|
|
293
|
+
get => this._preloadSiblings;
|
|
294
|
+
set
|
|
295
|
+
{
|
|
296
|
+
this._preloadSiblings = value;
|
|
297
|
+
this.RecreateTileset();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
[SerializeField]
|
|
302
|
+
private bool _forbidHoles = false;
|
|
303
|
+
|
|
304
|
+
/// <summary>
|
|
305
|
+
/// Whether to prevent refinement of a parent tile when a child isn't done loading.
|
|
306
|
+
/// </summary>
|
|
307
|
+
/// <remarks>
|
|
308
|
+
/// When this is set to true, the tileset will guarantee that the tileset will
|
|
309
|
+
/// never be rendered with holes in place of tiles that are not yet loaded,
|
|
310
|
+
/// even though the tile that is rendered instead may have low resolution.
|
|
311
|
+
/// When false, overall loading will be faster, but newly-visible parts of the
|
|
312
|
+
/// tileset may initially be blank.
|
|
313
|
+
/// </remarks>
|
|
314
|
+
public bool forbidHoles
|
|
315
|
+
{
|
|
316
|
+
get => this._forbidHoles;
|
|
317
|
+
set
|
|
318
|
+
{
|
|
319
|
+
this._forbidHoles = value;
|
|
320
|
+
this.RecreateTileset();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
[SerializeField]
|
|
325
|
+
private uint _maximumSimultaneousTileLoads = 20;
|
|
326
|
+
|
|
327
|
+
/// <summary>
|
|
328
|
+
/// The maximum number of tiles that may be loaded simultaneously.
|
|
329
|
+
/// </summary>
|
|
330
|
+
/// <remarks>
|
|
331
|
+
/// When new parts of the tileset become visible, the tasks to load the
|
|
332
|
+
/// corresponding tiles are put into a queue. This value determines how
|
|
333
|
+
/// many of these tasks are processed at the same time. A higher value may
|
|
334
|
+
/// cause the tiles to be loaded and rendered more quickly, at the cost of
|
|
335
|
+
/// a higher network and processing load.
|
|
336
|
+
/// </remarks>
|
|
337
|
+
public uint maximumSimultaneousTileLoads
|
|
338
|
+
{
|
|
339
|
+
get => this._maximumSimultaneousTileLoads;
|
|
340
|
+
set
|
|
341
|
+
{
|
|
342
|
+
this._maximumSimultaneousTileLoads = value;
|
|
343
|
+
this.RecreateTileset();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
[SerializeField]
|
|
348
|
+
private long _maximumCachedBytes = 512 * 1024 * 1024;
|
|
349
|
+
|
|
350
|
+
/// <summary>
|
|
351
|
+
/// The maximum number of bytes that may be cached for this tileset.
|
|
352
|
+
/// </summary>
|
|
353
|
+
/// <remarks>
|
|
354
|
+
/// Note that this value, even if 0, will never cause tiles that are needed
|
|
355
|
+
/// for rendering to be unloaded. However, if the total number of loaded
|
|
356
|
+
/// bytes is greater than this value, tiles will be unloaded until the
|
|
357
|
+
/// total is under this number or until only required tiles remain, whichever
|
|
358
|
+
/// comes first.
|
|
359
|
+
/// </remarks>
|
|
360
|
+
public long maximumCachedBytes
|
|
361
|
+
{
|
|
362
|
+
get => this._maximumCachedBytes;
|
|
363
|
+
set
|
|
364
|
+
{
|
|
365
|
+
this._maximumCachedBytes = value;
|
|
366
|
+
this.RecreateTileset();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
[SerializeField]
|
|
371
|
+
private uint _loadingDescendantLimit = 20;
|
|
372
|
+
|
|
373
|
+
/// <summary>
|
|
374
|
+
/// The number of loading descendents a tile should allow before deciding to render itself instead of waiting.
|
|
375
|
+
/// </summary>
|
|
376
|
+
/// <remarks>
|
|
377
|
+
/// Setting this to 0 will cause each level of detail to be loaded
|
|
378
|
+
/// successively. This will increase the overall loading time, but cause
|
|
379
|
+
/// additional detail to appear more gradually. Setting this to a high value
|
|
380
|
+
/// like 1000 will decrease the overall time until the desired level of detail
|
|
381
|
+
/// is achieved, but this high-detail representation will appear at once, as
|
|
382
|
+
/// soon as it is loaded completely.
|
|
383
|
+
/// </remarks>
|
|
384
|
+
public uint loadingDescendantLimit
|
|
385
|
+
{
|
|
386
|
+
get => this._loadingDescendantLimit;
|
|
387
|
+
set
|
|
388
|
+
{
|
|
389
|
+
this._loadingDescendantLimit = value;
|
|
390
|
+
this.RecreateTileset();
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[SerializeField]
|
|
395
|
+
private bool _enableFrustumCulling = true;
|
|
396
|
+
|
|
397
|
+
/// <summary>
|
|
398
|
+
/// Whether to cull tiles that are outside the frustum.
|
|
399
|
+
/// </summary>
|
|
400
|
+
/// <remarks>
|
|
401
|
+
/// <para>
|
|
402
|
+
/// By default this is true, meaning that tiles that are not visible with
|
|
403
|
+
/// the current camera configuration will be ignored. It can be set to false,
|
|
404
|
+
/// so that these tiles are still considered for loading, refinement and rendering.
|
|
405
|
+
/// </para>
|
|
406
|
+
/// <para>
|
|
407
|
+
/// This will cause more tiles to be loaded, but helps to avoid holes and
|
|
408
|
+
/// provides a more consistent mesh, which may be helpful for physics and shadows.
|
|
409
|
+
/// </para>
|
|
410
|
+
/// <para>
|
|
411
|
+
/// Note that frustum calling will be disabled if <see cref="useLodTransitions"/> is set to true.
|
|
412
|
+
/// </para>
|
|
413
|
+
/// </remarks>
|
|
414
|
+
public bool enableFrustumCulling
|
|
415
|
+
{
|
|
416
|
+
get => this._enableFrustumCulling;
|
|
417
|
+
set
|
|
418
|
+
{
|
|
419
|
+
this._enableFrustumCulling = value;
|
|
420
|
+
this.RecreateTileset();
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
[SerializeField]
|
|
425
|
+
private bool _enableFogCulling = true;
|
|
426
|
+
|
|
427
|
+
/// <summary>
|
|
428
|
+
/// Whether to cull tiles that are occluded by fog.
|
|
429
|
+
/// </summary>
|
|
430
|
+
/// <remarks>
|
|
431
|
+
/// <para>
|
|
432
|
+
/// This does not refer to the atmospheric fog rendered by Unity, but to an
|
|
433
|
+
/// internal representation of fog: Depending on the height of the camera
|
|
434
|
+
/// above the ground, tiles that are far away (close to the horizon) will be
|
|
435
|
+
/// culled when this flag is enabled.
|
|
436
|
+
/// </para>
|
|
437
|
+
/// <para>
|
|
438
|
+
/// Note that this will always be disabled if <see cref="useLodTransitions"/> is set to true.
|
|
439
|
+
/// </para>
|
|
440
|
+
/// </remarks>
|
|
441
|
+
public bool enableFogCulling
|
|
442
|
+
{
|
|
443
|
+
get => this._enableFogCulling;
|
|
444
|
+
set
|
|
445
|
+
{
|
|
446
|
+
this._enableFogCulling = value;
|
|
447
|
+
this.RecreateTileset();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
[SerializeField]
|
|
453
|
+
private bool _enforceCulledScreenSpaceError = true;
|
|
454
|
+
|
|
455
|
+
/// <summary>
|
|
456
|
+
/// Whether a specified screen-space error should be enforced for tiles
|
|
457
|
+
/// that are outside the frustum or hidden in fog.
|
|
458
|
+
/// </summary>
|
|
459
|
+
/// <remarks>
|
|
460
|
+
/// <para>
|
|
461
|
+
/// When <see cref="enableFrustumCulling"/> and <see cref="enableFogCulling"/> are both true,
|
|
462
|
+
/// tiles outside the view frustum or hidden in fog are effectively ignored,
|
|
463
|
+
/// and so their level-of-detail doesn't matter. And in this scenario, this
|
|
464
|
+
/// property is ignored.
|
|
465
|
+
/// </para>
|
|
466
|
+
/// <para>
|
|
467
|
+
/// However, when either of those flags are false, these "would-be-culled"
|
|
468
|
+
/// tiles continue to be processed, and the question arises of how to handle
|
|
469
|
+
/// their level-of-detail. When this property is false, refinement terminates
|
|
470
|
+
/// at these tiles, no matter what their current screen-space error. The tiles
|
|
471
|
+
/// are available for physics, shadows, etc., but their level-of-detail may be
|
|
472
|
+
/// very low.
|
|
473
|
+
/// </para>
|
|
474
|
+
/// <para>
|
|
475
|
+
/// When set to true, these tiles are refined until they achieve the specified
|
|
476
|
+
/// <see cref="culledScreenSpaceError"/>. This allows control over the minimum quality
|
|
477
|
+
/// of these would-be-culled tiles.
|
|
478
|
+
/// </para>
|
|
479
|
+
/// </remarks>
|
|
480
|
+
public bool enforceCulledScreenSpaceError
|
|
481
|
+
{
|
|
482
|
+
get => this._enforceCulledScreenSpaceError;
|
|
483
|
+
set
|
|
484
|
+
{
|
|
485
|
+
this._enforceCulledScreenSpaceError = value;
|
|
486
|
+
this.RecreateTileset();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[SerializeField]
|
|
491
|
+
private float _culledScreenSpaceError = 64.0f;
|
|
492
|
+
|
|
493
|
+
/// <summary>
|
|
494
|
+
/// The screen-space error to be enforced for tiles that are outside the frustum or hidden in fog.
|
|
495
|
+
/// </summary>
|
|
496
|
+
/// <remarks>
|
|
497
|
+
/// <para>
|
|
498
|
+
/// When <see cref="enableFrustumCulling"/> and <see cref="enableFogCulling"/> are both true,
|
|
499
|
+
/// tiles outside the view frustum or hidden in fog are effectively ignored,
|
|
500
|
+
/// and so their level-of-detail doesn't matter. And in this scenario, this
|
|
501
|
+
/// property is ignored.
|
|
502
|
+
/// </para>
|
|
503
|
+
/// <para>
|
|
504
|
+
/// However, when either of those flags are false, these \"would-be-culled\"
|
|
505
|
+
/// tiles continue to be processed, and the question arises of how to handle
|
|
506
|
+
/// their level-of-detail. When this property is false, refinement terminates
|
|
507
|
+
/// at these tiles, no matter what their current screen-space error. The tiles
|
|
508
|
+
/// are available for physics, shadows, etc., but their level-of-detail may be
|
|
509
|
+
/// very low.
|
|
510
|
+
/// </para>
|
|
511
|
+
/// <para>
|
|
512
|
+
/// When set to true, these tiles are refined until they achieve the specified
|
|
513
|
+
/// "Culled Screen Space Error". This allows control over the minimum quality
|
|
514
|
+
/// of these would-be-culled tiles.
|
|
515
|
+
/// </para>
|
|
516
|
+
/// </remarks>
|
|
517
|
+
public float culledScreenSpaceError
|
|
518
|
+
{
|
|
519
|
+
get => this._culledScreenSpaceError;
|
|
520
|
+
set
|
|
521
|
+
{
|
|
522
|
+
this._culledScreenSpaceError = value;
|
|
523
|
+
this.RecreateTileset();
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
[SerializeField]
|
|
528
|
+
private Material _opaqueMaterial = null;
|
|
529
|
+
|
|
530
|
+
/// <summary>
|
|
531
|
+
/// The Material to use to render opaque parts of tiles.
|
|
532
|
+
/// </summary>
|
|
533
|
+
public Material opaqueMaterial
|
|
534
|
+
{
|
|
535
|
+
get => this._opaqueMaterial;
|
|
536
|
+
set
|
|
537
|
+
{
|
|
538
|
+
this._opaqueMaterial = value;
|
|
539
|
+
this.RecreateTileset();
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
//[SerializeField]
|
|
544
|
+
//private bool _useLodTransitions = false;
|
|
545
|
+
|
|
546
|
+
//public bool useLodTransitions
|
|
547
|
+
//{
|
|
548
|
+
// get => this._useLodTransitions;
|
|
549
|
+
// set
|
|
550
|
+
// {
|
|
551
|
+
// this._useLodTransitions = value;
|
|
552
|
+
// this.RecreateTileset();
|
|
553
|
+
// }
|
|
554
|
+
//}
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
//[SerializeField]
|
|
558
|
+
//private float _lodTransitionLength = 0.5f;
|
|
559
|
+
|
|
560
|
+
//public float lodTransitionLength
|
|
561
|
+
//{
|
|
562
|
+
// get => this._lodTransitionLength;
|
|
563
|
+
// set
|
|
564
|
+
// {
|
|
565
|
+
// this._lodTransitionLength = value;
|
|
566
|
+
// this.RecreateTileset();
|
|
567
|
+
// }
|
|
568
|
+
//}
|
|
569
|
+
|
|
570
|
+
[SerializeField]
|
|
571
|
+
private bool _generateSmoothNormals = false;
|
|
572
|
+
|
|
573
|
+
/// <summary>
|
|
574
|
+
/// Whether to generate smooth normals when normals are missing in the glTF.
|
|
575
|
+
/// </summary>
|
|
576
|
+
/// <remarks>
|
|
577
|
+
/// According to the glTF spec: "When normals are not specified, client
|
|
578
|
+
/// implementations should calculate flat normals." However, calculating flat
|
|
579
|
+
/// normals requires duplicating vertices. This option allows the glTFs to be rendered
|
|
580
|
+
/// with smooth normals instead when the original glTF is missing normals.
|
|
581
|
+
/// </remarks>
|
|
582
|
+
public bool generateSmoothNormals
|
|
583
|
+
{
|
|
584
|
+
get => this._generateSmoothNormals;
|
|
585
|
+
set
|
|
586
|
+
{
|
|
587
|
+
this._generateSmoothNormals = value;
|
|
588
|
+
this.RecreateTileset();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
[SerializeField]
|
|
593
|
+
private CesiumPointCloudShading _pointCloudShading;
|
|
594
|
+
|
|
595
|
+
/// <summary>
|
|
596
|
+
/// The CesiumPointCloudShading attached to this tileset. If the tileset
|
|
597
|
+
/// contains points, their appearance can be configured with the point
|
|
598
|
+
/// cloud shading parameters.
|
|
599
|
+
/// </summary>
|
|
600
|
+
public CesiumPointCloudShading pointCloudShading
|
|
601
|
+
{
|
|
602
|
+
get => this._pointCloudShading;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
[SerializeField]
|
|
606
|
+
private bool _suspendUpdate = false;
|
|
607
|
+
|
|
608
|
+
/// <summary>
|
|
609
|
+
/// Pauses level-of-detail and culling updates of this tileset.
|
|
610
|
+
/// </summary>
|
|
611
|
+
public bool suspendUpdate
|
|
612
|
+
{
|
|
613
|
+
get => this._suspendUpdate;
|
|
614
|
+
set
|
|
615
|
+
{
|
|
616
|
+
this._suspendUpdate = value;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// Normally tilesets are destroyed when anything in the editor changes.
|
|
621
|
+
// But if suspendUpdate is the only value that has changed, the tileset
|
|
622
|
+
// should not be reloaded, and instead continue updating after the setting
|
|
623
|
+
// has been toggled. This variable saves the last value of suspendUpdate,
|
|
624
|
+
// so OnValidate() can determine if this property was modified. If so, it
|
|
625
|
+
// prevents the tileset from being destroyed.
|
|
626
|
+
private bool _previousSuspendUpdate = false;
|
|
627
|
+
|
|
628
|
+
internal bool previousSuspendUpdate
|
|
629
|
+
{
|
|
630
|
+
get => this._previousSuspendUpdate;
|
|
631
|
+
set
|
|
632
|
+
{
|
|
633
|
+
this._previousSuspendUpdate = value;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
[SerializeField]
|
|
638
|
+
private bool _showTilesInHierarchy = false;
|
|
639
|
+
|
|
640
|
+
/// <summary>
|
|
641
|
+
/// Whether to show tiles as individual game objects in the hierarchy window.
|
|
642
|
+
/// </summary>
|
|
643
|
+
public bool showTilesInHierarchy
|
|
644
|
+
{
|
|
645
|
+
get => this._showTilesInHierarchy;
|
|
646
|
+
set
|
|
647
|
+
{
|
|
648
|
+
this._showTilesInHierarchy = value;
|
|
649
|
+
this.RecreateTileset();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
[SerializeField]
|
|
654
|
+
private bool _updateInEditor = true;
|
|
655
|
+
|
|
656
|
+
/// <summary>
|
|
657
|
+
/// If true, this tileset is ticked/updated in the editor. If false, it is only ticked while playing (including Play-in-Editor).
|
|
658
|
+
/// </summary>
|
|
659
|
+
public bool updateInEditor
|
|
660
|
+
{
|
|
661
|
+
get => this._updateInEditor;
|
|
662
|
+
set
|
|
663
|
+
{
|
|
664
|
+
this._updateInEditor = value;
|
|
665
|
+
this.RecreateTileset();
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
[SerializeField]
|
|
670
|
+
private bool _logSelectionStats = false;
|
|
671
|
+
|
|
672
|
+
/// <summary>
|
|
673
|
+
/// Whether to log details about the tile selection process.
|
|
674
|
+
/// </summary>
|
|
675
|
+
public bool logSelectionStats
|
|
676
|
+
{
|
|
677
|
+
get => this._logSelectionStats;
|
|
678
|
+
set { this._logSelectionStats = value; }
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
[SerializeField]
|
|
682
|
+
private bool _createPhysicsMeshes = true;
|
|
683
|
+
|
|
684
|
+
/// <summary>
|
|
685
|
+
/// Whether to generate physics meshes for this tileset.
|
|
686
|
+
/// </summary>
|
|
687
|
+
/// <remarks>
|
|
688
|
+
/// Disabling this option will improve the performance of tile loading,
|
|
689
|
+
/// but it will no longer be possible to collide with the tileset since
|
|
690
|
+
/// the physics meshes will not be created.
|
|
691
|
+
/// </remarks>
|
|
692
|
+
public bool createPhysicsMeshes
|
|
693
|
+
{
|
|
694
|
+
get => this._createPhysicsMeshes;
|
|
695
|
+
set
|
|
696
|
+
{
|
|
697
|
+
this._createPhysicsMeshes = value;
|
|
698
|
+
this.RecreateTileset();
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
#endregion
|
|
703
|
+
|
|
704
|
+
#region Public Methods
|
|
705
|
+
|
|
706
|
+
/// <summary>
|
|
707
|
+
/// Estimate the percentage of the tiles for the current view that have been loaded.
|
|
708
|
+
/// </summary>
|
|
709
|
+
/// <returns>
|
|
710
|
+
/// A float value between 0 and 100 representing the load progress.
|
|
711
|
+
/// </returns>
|
|
712
|
+
public partial float ComputeLoadProgress();
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
/// <summary>
|
|
716
|
+
/// Destroy and recreate the tilset. All tiles are unloaded, and then the tileset is reloaded
|
|
717
|
+
/// based on the current view.
|
|
718
|
+
/// </summary>
|
|
719
|
+
public partial void RecreateTileset();
|
|
720
|
+
|
|
721
|
+
/// <summary>
|
|
722
|
+
/// Zoom the Editor camera to this tileset. This method does nothing outside of the Editor.
|
|
723
|
+
/// </summary>
|
|
724
|
+
public partial void FocusTileset();
|
|
725
|
+
|
|
726
|
+
/// <summary>
|
|
727
|
+
/// Initiates an asynchronous query for the height of this tileset at a list of
|
|
728
|
+
/// cartographic positions, where the longitude (X) and latitude (Y) are given in degrees.
|
|
729
|
+
/// The most detailed available tiles are used to determine each height.
|
|
730
|
+
/// </summary>
|
|
731
|
+
/// <remarks>
|
|
732
|
+
/// <para>
|
|
733
|
+
/// The height of the input positions is ignored, unless height sampling fails
|
|
734
|
+
/// at that location. The output height is expressed in meters above the ellipsoid
|
|
735
|
+
/// (usually WGS84), which should not be confused with a height above mean sea level.
|
|
736
|
+
/// </para>
|
|
737
|
+
/// <para>
|
|
738
|
+
/// Use <see cref="WaitForTask"/> inside a coroutine to wait for the asynchronous height
|
|
739
|
+
/// query to complete.
|
|
740
|
+
/// </para>
|
|
741
|
+
/// </remarks>
|
|
742
|
+
/// <param name="longitudeLatitudeHeightPositions">
|
|
743
|
+
/// The cartographic positions for which to sample heights. The X component is the
|
|
744
|
+
/// Longitude (degrees), the Y component is the Latitude (degrees), and the Z component
|
|
745
|
+
/// is the Height (meters).
|
|
746
|
+
/// </param>
|
|
747
|
+
/// <returns>An asynchronous task that will provide the requested heights when complete.</returns>
|
|
748
|
+
public partial Task<CesiumSampleHeightResult> SampleHeightMostDetailed(params double3[] longitudeLatitudeHeightPositions);
|
|
749
|
+
|
|
750
|
+
#endregion
|
|
751
|
+
|
|
752
|
+
#region Private Methods
|
|
753
|
+
|
|
754
|
+
private partial void SetShowCreditsOnScreen(bool value);
|
|
755
|
+
|
|
756
|
+
private partial void Start();
|
|
757
|
+
private partial void Update();
|
|
758
|
+
private partial void OnValidate();
|
|
759
|
+
|
|
760
|
+
private partial void OnEnable();
|
|
761
|
+
private partial void OnDisable();
|
|
762
|
+
|
|
763
|
+
internal partial void UpdateOverlayMaterialKeys();
|
|
764
|
+
|
|
765
|
+
#endregion
|
|
766
|
+
|
|
767
|
+
#region Backward Compatibility
|
|
768
|
+
|
|
769
|
+
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
|
770
|
+
{
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
|
774
|
+
{
|
|
775
|
+
#if UNITY_EDITOR
|
|
776
|
+
// For backward compatibility, tilesets loaded without a server should adopt
|
|
777
|
+
// the default one rather than the current one.
|
|
778
|
+
if (this._ionServer == null)
|
|
779
|
+
this._useDefaultServer = true;
|
|
780
|
+
#endif
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
#if UNITY_EDITOR
|
|
784
|
+
private bool _useDefaultServer = false;
|
|
785
|
+
#endif
|
|
786
|
+
#endregion
|
|
787
|
+
}
|
|
788
|
+
}
|