Beispiel #1
0
    /**<summary> Called when areas response got </summary>*/
    private void OnAreasResponse(bool success, Area[] areas)
    {
        if (App.config.debug)
        {
            Array.ForEach(areas, (Area a) =>
            {
                Debug.Log(a);
#if UNITY_EDITOR
                areaID = a.areaID;
#endif
            });
        }

        this.areas = areas;

        NativeMethods.ShowToast("Point your device forward to locate accurate position");

        arController.StartTracking();
        ServerAPI.OnLocationResponse -= OnLocationResponse;
        ServerAPI.OnLocationResponse += OnLocationResponse;
        // Enable arController auto update
#if !UNITY_EDITOR
        arController.AutomaticLocationSync = true;
#endif
    }