On the Unity editor, you have two views, the Game view and the Scene view. The Game view simulates what your final rendered game will look like through your Scene Cameras. When you click the Play button, the simulation begins. The Scene view allows you to visually navigate and edit your Scene.
When the Editor Mode is enabled, ArcGIS Maps SDK for Unity loads ArcGIS Map content into the Scene view. This mode is useful when you place an object in the scene for example.
For more information about the Scene view, see Unity's documentation: The Scene view.
For the Editor Mode, there are three settings in the ArcGIS Map component that are enabled by default.
- Editor Mode: Loads the GIS data to the Scene view according to the camera that has the ArcGIS Camera component attached.
- Data Fetch Using Scene Camera: When you move the camera in the Scene view, it loads GIS data based on the Scene view camera's field of view. When you have multiple cameras in a scene, such as for a tabletop experience app, you may disable this option by using only the ArcGIS cameras in your scene to set fixed data loading points.
- Rebase In Scene View: Periodically updates the origin position as the editor camera moves around to avoid 32 bit floating point precision issues.
To enable or disable the Editor Mode:
The Map Creator UI is synchronized with the ArcGIS Map component. Click on the Settings tab, and find checkboxes to enable or disable the settings. The Editor Mode and Data Fetch Using Scene Camera options are enabled by default.
Click on the game object that has the ArcGIS Map component attached in the Hierarchy window. Then find checkboxes to enable or disable them in the Inspector window. The Editor Mode and Data Fetch Using Scene Camera options are enabled by default.
Execute attribute allows a script to run both in the editor and during play mode. For enabling the Editor view and the Editor view reposition, use the ArcGIS Map component.
You can find the sample code that enables the editor mode in the SampleAPIMapCreator.cs file. The sample script file is in:
Assets/Samples/ArcGIS Maps SDK for Unity/1.1.0/All Samples/Scripts/APISample