public static ReturnStatus UpdateSceneInfo(ref INTERACTION_SCENE scene, ref INTERACTION_SCENE_INFO sceneInfo) { var rs = LeapIEUpdateSceneInfo(ref scene, ref sceneInfo); Logger.HandleReturnStatus(scene, "Update Scene Info", LogLevel.Info, rs); return(rs); }
/// <summary> /// Loads an ldat file loaded at a path relative to the streaming assets folder. The file /// is stored into the provided scene info struct. This method returns a disposable that /// releases the ldat resources when disposed. /// </summary> public static IDisposable LoadLdat(ref INTERACTION_SCENE_INFO info, string ldatPath) { string ldatFullPath = Path.Combine(getStreamingAssetsPath(), ldatPath); WWW ldat = new WWW(ldatFullPath); while (!ldat.isDone) { System.Threading.Thread.Sleep(1); } if (!string.IsNullOrEmpty(ldat.error)) { throw new Exception(ldat.error + ": " + ldatFullPath); } info.ldatData = Marshal.AllocHGlobal(ldat.bytes.Length); info.ldatSize = (uint)ldat.bytes.Length; info.ldatData = Marshal.AllocHGlobal(ldat.bytes.Length); Marshal.Copy(ldat.bytes, 0, info.ldatData, ldat.bytes.Length); return(new ReleaseUponDispose(info.ldatData)); }
private static extern ReturnStatus LeapIEUpdateSceneInfo(ref INTERACTION_SCENE scene, ref INTERACTION_SCENE_INFO sceneInfo);