Пример #1
0
        private void _UpdateDisplayGeometry()
        {
            if (!m_CachedScreenOrientation.HasValue ||
                Screen.orientation != m_CachedScreenOrientation)
            {
                m_CachedScreenOrientation = Screen.orientation;
                m_CachedDisplayRotation   = AndroidNativeHelper.GetDisplayRotation();
            }

            ExternApi.ArPresto_setDisplayGeometry(
                m_CachedDisplayRotation, Screen.width, Screen.height);
        }
Пример #2
0
        private void _UpdateDisplayGeometry()
        {
            IntPtr sessionHandle = IntPtr.Zero;

            ExternApi.ArPresto_getSession(ref sessionHandle);

            if (sessionHandle == IntPtr.Zero)
            {
                return;
            }

            if (!m_CachedScreenOrientation.HasValue || Screen.orientation != m_CachedScreenOrientation)
            {
                m_CachedScreenOrientation = Screen.orientation;
                m_CachedDisplayRotation   = AndroidNativeHelper.GetDisplayRotation();
            }

            ExternApi.ArSession_setDisplayGeometry(sessionHandle, (int)m_CachedDisplayRotation, Screen.width,
                                                   Screen.height);
        }