ArcGIS Maps SDK for Unity sample code

Get experience with the latest version of ArcGIS Maps SDK for Unity using the samples.

Samples in ArcGIS Maps SDK for Unity

The ArcGIS Maps SDK for Unity package includes basic samples that demonstrate how to use ArcGIS capabilities.

To see the samples, import sample assets to your Unity project. Open the sample Unity scenes in the folder according to the Render Pipeline of your project. C# script in the Scripts folder contains comments in the code. You can access these basic samples and scripts from the Sample Contents/Scenes folder via the directory in the Project window.

Assets/Samples/ArcGIS Maps SDK for Unity/[version]/Sample Content/Scenes/

  • API sample: display map data using the C# API
  • Components sample: display map data using components
  • OAuth sample: showcase how to load private content with user authentication
  • Tabletop sample: visualize and interact with map data in a scene placed on a surface within their virtual or physical environment

To see the results of the following samples, set your API key as described below:

  • APISample: Set the APIKey field of the SampleAPIMapCreator game object or in the SampleAPIMapCreator.cs file

For other samples in the plugin, set your API key in the Project Settings, Map Creator, or ArcGIS Map component.

Samples in GitHub

The samples in GitHub show the combined capability of ArcGIS Maps SDK for Unity, Unity and ArcGIS REST APIs.

The code samples described on this page are also available on GitHub (choose the main branch). With a free GitHub account, you can:

  • Keep a local repository (or 'repo') of the samples and sync whenever you see updates.
  • Subscribe to the repo to get notified of updates (merges to main) or you can check the repo for updates at your convenience.
  • Subscribe to activities at the issue level.
  • Suggest changes via pull requests and the ArcGIS Maps SDK for Unity team may merge the changes after a full review and testing phase.

New to GitHub

GitHub is a web-based hosting service for software development projects that uses an open-source revision control system called Git. To learn how to interact with Git repositories with GitHub and to sign up for a free account, visit github.com.

Sample Viewer

A Sample Viewer scene is available under the Assets folder for the samples in GitHub. With the sample viewer, you can switch sample scenes during play mode and see the functionality. Each sample scene is in the Assets/SampleViewer/Samples folder.

Follow the Instructions to set up the sample viewer.

Sample viewer Go to GitHub sample repository

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.