} //END Start //---------------------------------// private void CallStart() //---------------------------------// { //Find the current XR device XRMode.GetCurrentXRDevice(out currentXRDevice); //Set the current Screen Orientation currentOrientation = Screen.orientation; } //END CallStart
} //END IsTouchInputEnabled //-----------------------------------// public void SetDistortionBasedOnSettings() //-----------------------------------// { //Make sure that the proper scripts exist in the scene AddBarrelDistortionScriptToCamera(); //Find the current XR device, if we're supposed to, then set the barrel settings based on the current XR device if( FixLensDistortionSettings != null && FixLensDistortionSettings.Count > 0 && XRMode.GetCurrentXRDevice( out currentHelper.XRDeviceType ) ) { foreach( XRCameraBarrelDistortionHelper helper in FixLensDistortionSettings ) { if( showDebug ) Debug.Log( "SetDistortionBasedOnSettings() helper.PlatformType( " + helper.PlatformType + " ) == Application.Platform( " + Application.platform + ") = " + ( helper.PlatformType == Application.platform ) + ", ......... and helper.device( " + helper.device + " ) == currentHelper.XRDeviceType( " + currentHelper.XRDeviceType + " ) = " + ( helper.device == currentHelper.XRDeviceType ) + ", ....... enableDistortion = " + helper.enableDistortion ); if( helper.PlatformType == Application.platform && helper.device == currentHelper.XRDeviceType ) { if( XRCameraBarrelDistortion.instance != null ) { XRCameraBarrelDistortion.instance.SetCameraDistortionCorrection( helper.enableDistortion, helper.strength ); } if( XRCameraBarrelDistortionLine.instance != null ) { XRCameraBarrelDistortionLine.instance.SetDistortionLine( helper.showCenterLine ); } return; } } } //We didn't find any matching settings, disable distortion and the center line if( XRCameraBarrelDistortion.instance != null ) { XRCameraBarrelDistortion.instance.enableDistortion = false; } if( XRCameraBarrelDistortionLine.instance != null ) { XRCameraBarrelDistortionLine.instance.SetDistortionLine( false ); } } //END SetDistortionBasedOnSettings