With the new support for Cesium 3D Tiles that was recently added to the Unity engine, Unity users can now combine the high-fidelity rendering power of Unity with high-quality 3D geospatial data. Mesh data can be loaded not only from Cesium ion but also from SkylineGlobe Server, which exposes the mesh layers as 3D Tiles for the Unity user.
In this article:
- Create or Open a Project with the Cesium for Unity Package
- Add a 3D Tileset from SkylineGlobe Server
Create or Open a Project with the Cesium for Unity Package
You can either start with a sample Cesium for Unity project or create a new Unity project with the Cesium for Unity package.
Open Cesium for Unity Sample Project
The Cesium for Unity Samples is a starter project, for exploring and learning more about the Cesium for Unity plugin.
- Download the Cesium for Unity Samples zip file from GitHub.
- Extract the .zip file into a suitable location on your computer.
- Install the Unity Hub management tool, and click Open on the Projects tab, or open the Unity Editor directly and select Open Project. Then, browse to the extracted directory. Unity will load the project and also download Cesium for Unity using the Package Manager.
- In the Asset Browser, under the Project window, select and load Assets -> Scenes -> 01_CesiumWorld. You can also select other scenes as you browse and explore the samples.
- Follow the steps below to add a 3D Tileset from SkylineGlobe Server.
Create a New Unity Project with the Cesium For Unity Package
- Follow step 1 in Cesium for Unity Quickstart to create a new project and import the Cesium for Unity package.
- Follow the steps below to add a 3D Tileset from SkylineGlobe Server.
Add a 3D Tileset from SkylineGlobe Server
- In the Unity Editor, open the Cesium ion panel by clicking the Cesium button in the toolbar. Then add a Blank 3D Tileset to your scene using the Quick Add Basic Entities section of the Cesium window. A new object is added to the Entity Outliner panel.
- Select the newly created Cesium3DTileset game object in the Entity Outliner panel. It should appear underneath the existing CesiumGeoreference game object. Then in the Inspector > Cesium3DTileset’s Tileset Source parameter >set it to From URL. Setting this will enable the URL field.
- Set URL to HTTPS://[SGS Server]/sg/[Site Name]/b3dm/[LayerID or Alias Name]/tileset.Json. E.g., https://cloud.skylineglobe.com/sg/demos/b3dm/Frederick/tileset.json.
- If needed, configure the main camera.
Note: You can add a globe map to your scene, by connecting to Cesium ion.