top of page

Geopipe for Unity: What You Need to Know

Updated: May 5, 2023


For the most current documentation, please see our streaming documentation page.

 

So, you're ready to use Geopipe models in Unity? Great. If you just want to a use a single model, make an account, download your model, and follow the attached README.md!

If you're ready for more, use our SDK. Here are the details:


Download the SDK by logging into your account. Click the drop down menu next to your user name and select "Unity SDK."




Prerequisites:

Unity Versions

This SDK is fully compatible with the following Unity versions

  • 2020.3 LTS

  • 2021.3 LTS

  • 2022.x

External Dependencies


In addition to installing this package, it is also necessary to install glTFast v4.8.5. Before installing glTFast, make sure that git LFS is installed on your computer. Install glTFast using the Package Manager with the option Install from a git URL and https://github.com/atteneder/glTFast.git#v4.8.5 in the URL box.


Installing the SDK

Create a new Unity project and install the Geopipe Unity SDK custom package using the Package Manager. The Geopipe Unity SDK is provided as a .tar.gz file. Use the option Add package from tarball.



  • The Standard Renderer Pipeline (SRP) and the High Definition Render Pipeline (HDRP) are supported.

  • Unity version 2020.x and higher is supported.


Loading a Sample Project


Choose your sample based on your render pipeline. From within the Package Manager, you can install the following samples into your project:


  • Standard Renderer Sample.

  • HDRP Sample.


Each sample will provide a scene for your project that is set up (minus API credentials) and can be used out of the box to explore our demo New York region.


Adding User Credentials to the SDK

To get an API key, download an area, then find the streaming column in the Downloads page.



Click the button to copy the API key to your clipboard and paste it into the GeopipeModelEngine component. Make sure to also copy and paste the latitude-longitude coordinates as well. The default coordinates are at the center of your download area. Feel free to adjust the coordinates to fit your needs.



Deploying


Models

When you're ready to build a binary with the Geopipe Unity SDK, you can either bake in the cache you populated during testing (the ModelCache~, DirCache~, TreeCache~, and other *Cache~ folders), or you can let the Unity SDK dynamically fetch models from Geopipe's API.



Rendering

If you're building a binary with the standard rendering pipeline, be sure to include the ShaderRetention scene in your binary. Although you should not explicitly load this scene, its presence in the binary will force Unity to include necessary shaders it might otherwise omit (causing no models to load or render).


Questions? Comments? Projects to share? Jump into our Discord and let us know!

bottom of page