public static void SetGameViewAspectRatio(XrRemoteApp.Reader remote) { int width = remote.getDevice().getScreenWidth(); int height = remote.getDevice().getScreenHeight(); if (width == 0 || height == 0) { return; } GameViewSizeGroupType buildPlatform = GetGameViewSizeGroupType(); string name = "XR Remote"; if (!SizeExists(buildPlatform, width, height)) { AddCustomSize(GameViewSizeType.AspectRatio, buildPlatform, width, height, name); } SetSize(FindSize(buildPlatform, width, height)); }
private void BufferForSend(XrRemoteApp.Reader remote) { // Unity processes screen width 1440 @ 7fps, 770 @ 15fps, 360 @ 20fps remote_.SetDeviceInfo( remote.getDevice().getScreenWidth(), remote.getDevice().getScreenHeight(), (int)ToDeviceOrientation(remote.getDevice().getOrientation())); foreach (var t in remote.getTouches()) { XRInternalRemote.XrInternalRemoteData.Touch touch = new XRInternalRemote.XrInternalRemoteData.Touch(); touch.positionX = t.getPositionX(); touch.positionY = t.getPositionY(); touch.frameCount = t.getTimestamp(); touch.fingerId = t.getFingerId(); touch.phase = (int)ToTouchPhase(t.getPhase()); touch.tapCount = t.getTapCount(); remote_.AddTouch(touch); } }