Example #1
0
        public override IEnumerator RunJob()
        {
            Debug.Log("*************************** CoroutineJobFreeMap ***************************");

            BaseMapper mapper = host as BaseMapper;

            if (mapper.pcr.ContainsKey(id))
            {
                int mapId = mapper.pcr[id].mapId;

                Task <int> t0 = Task.Run(() =>
                {
                    return(Immersal.Core.FreeMap(mapId));
                });

                while (!t0.IsCompleted)
                {
                    yield return(null);
                }

                PointCloudRenderer p = mapper.pcr[id];
                p.ClearCloud();
                mapper.pcr.Remove(id);
            }
        }
        public override IEnumerator RunJob()
        {
            Debug.Log("*************************** CoroutineJobFreeMap ***************************");

            if (pcr.ContainsKey(id))
            {
                int handle = pcr[id].handle;

                Task <int> t0 = Task.Run(() =>
                {
                    return(Immersal.Core.FreeMap(handle));
                });

                while (!t0.IsCompleted)
                {
                    yield return(null);
                }

                PointCloudRenderer p = pcr[id];
                p.ClearCloud();
                pcr.Remove(id);
            }
        }