/// <summary> /// Update current rotation index. /// /// This function will make a query from native Android and decide what is the current screen orientation. /// </summary> public static void UpdateCurrentRotationIndex() { int index = AndroidHelper.GetScreenOrientation(); switch (index) { case 1: m_rotationTDefault = ROTATION90_T_DEFAULT; break; case 2: m_rotationTDefault = ROTATION180_T_DEFAULT; break; case 3: m_rotationTDefault = ROTATION270_T_DEFAULT; break; default: m_rotationTDefault = Matrix4x4.identity; break; } }