Beispiel #1
0
        /// <summary>
        /// Handle Unity *Start* event.
        /// </summary>
        private void Start()
        {
            if (!Application.isPlaying)
            {
                return;
            }

            // Get required Maps Service component on this GameObject.
            MapsService mapsService = GetComponent <MapsService>();

            // Set real-world location to load.
            mapsService.InitFloatingOrigin(mapsService.MapPreviewOptions.Location);

            // Load map with default options.
            mapsService.LoadMap(mapsService.GetPreviewBounds(), mapsService.MaybeGetGameObjectOptions());
        }