void XRGetAppEnvironment() { NativeByteArray bytes = new NativeByteArray(); c8XRIos_getXRAppEnvironment(ref bytes); byte[] ret = new byte[bytes.size]; Marshal.Copy(bytes.bytes, ret, 0, bytes.size); XRAppEnvironment.Reader r = Serialize.read(bytes).getRoot(XRAppEnvironment.factory); xrAppEnvironment.setRoot(XRAppEnvironment.factory, r); }
void XRGetAppEnvironment() { if (!XRIsStreamingSupported()) { XRGetAppEnvironmentUnsupported(); return; } NativeByteArray bytes = new NativeByteArray(); c8XRStreaming_getXRAppEnvironment(ref bytes); if (bytes.bytes == IntPtr.Zero) { return; } byte[] ret = new byte[bytes.size]; Marshal.Copy(bytes.bytes, ret, 0, bytes.size); XRAppEnvironment.Reader r = Serialize.read(bytes).getRoot(XRAppEnvironment.factory); xrAppEnvironment.setRoot(XRAppEnvironment.factory, r); }