void OnScreenDataChange(ScreenData screen)
        {
            int angle = 0;

            switch (DeviceOrientationChange.GetDeviceOrientation())
            {
            case DeviceOrientation.LandscapeLeft:
                RotateLandscapeLeft();
                angle = 0;
                break;

            case DeviceOrientation.LandscapeRight:
                RotateLandscapeRight();
                angle = 180;
                break;

            case DeviceOrientation.Portrait:
                RotatePortrait();
                angle = 90;
                break;

            case DeviceOrientation.PortraitUpsideDown:
                RotatePortaitUpsideDown();
                angle = 270;
                break;
            }
            PikkartARCore.UpdateViewport((int)screen.resolution.x, (int)screen.resolution.y, angle);
        }
        public static ScreenData GetUpdatedDeviceOrientation()
        {
            ScreenData device_orientation = new ScreenData();

            device_orientation.Update();

            return(device_orientation);
        }
        void Awake()
        {
            //Screen.autorotateToLandscapeLeft = false;
            //Screen.autorotateToLandscapeRight = false;
            //Screen.autorotateToPortrait = false;
            //Screen.autorotateToPortraitUpsideDown = false;

            //Screen.orientation = ScreenOrientation.AutoRotation;

            Screen.autorotateToLandscapeLeft      = true;
            Screen.autorotateToLandscapeRight     = true;
            Screen.autorotateToPortrait           = true;
            Screen.autorotateToPortraitUpsideDown = true;
            screen = new ScreenData();
        }