Example #1
0
        public void LoadMap(SDKJob job)
        {
            JobLoadMapBinaryAsync j = new JobLoadMapBinaryAsync();

            j.id        = job.id;
            j.OnResult += (SDKMapResult result) =>
            {
                Debug.Log(string.Format("Load map {0} ({1} bytes)", job.id, result.mapData.Length));

                Color            pointCloudColor = ARMap.pointCloudColors[UnityEngine.Random.Range(0, ARMap.pointCloudColors.Length)];
                ARMap.RenderMode renderMode      = m_ARMap?.renderMode ?? ARMap.RenderMode.EditorAndRuntime;

                ARSpace.LoadAndInstantiateARMap(null, result, renderMode, pointCloudColor);
            };

            m_Jobs.Add(j);
        }