private void LoadColliders(ref List <DrawColliderTask> tasks, IntPtr group, uint cnt) { Util.CheckInterop(); if (tasks == null) { tasks = new List <DrawColliderTask>((int)cnt); } else { tasks.Clear(); } for (uint i = 0; i < cnt; i++) { DrawColliderTask t; IntPtr pm = IntPtr.Zero, pbs = IntPtr.Zero; BrowserInterop.vtsDrawsColliderTask(group, i, ref pm, ref pbs); Util.CheckInterop(); if (pm == IntPtr.Zero) { continue; } t.data = (DrawColliderBase)Marshal.PtrToStructure(pbs, typeof(DrawColliderBase)); t.mesh = Load(pm); tasks.Add(t); } }