/// Forces the orientation of impressions to the given orientation. #if UNITY_IPHONE /// If your project is properly setup to autorotate, animated native views /// will work as expected and you should not need to set this. #elif UNITY_ANDROID /// To use this method, you must set the targetSdkVersion in your /// AndroidManifest.xml to 13 or less. #endif public static void forceOrientation(ScreenOrientation orient) { if (!checkInitialized()) { return; } #if UNITY_ANDROID _plugin.Call("forceOrientation", orient.ToString()); #elif UNITY_IPHONE _chartBoostForceOrientation(orient.ToString()); #endif }
// Forces the orientation of interstital ads. If your project is properly setup to autoroate animated native views will work as expected and you should not need to set this public static void forceOrientation(ScreenOrientation orient) { if (Application.platform == RuntimePlatform.IPhonePlayer) { _chartBoostForceOrientation(orient.ToString()); } }
private void OnGUI() { GUIStyle newStyle = new GUIStyle(); newStyle.fontSize = 150; GUI.Label(new Rect(10, 10, 200, 200), _orientation.ToString(), newStyle); }
GenerateTargetScreenRotation (ScreenOrientation orientation) { switch (orientation) { case ScreenOrientation.Portrait: return(0); case ScreenOrientation.LandscapeLeft: return(90); case ScreenOrientation.PortraitUpsideDown: return(180); case ScreenOrientation.LandscapeRight: return(270); default: Debug.LogWarning( "Unexpected target rotation (" + orientation.ToString() + ") in ScreenRotationEnforcer." + "GenerateTargetScreenRotation" ); return(0); } }
protected void initEyes(string page, ScreenOrientation deviceOrientation = ScreenOrientation.Portrait) { string testName = NUnit.Framework.TestContext.CurrentContext.Test.MethodName; ILogHandler logHandler = TestUtils.InitLogHandler(testName); eyes = new Eyes(logHandler); initEyesSettings(false, true); eyes.AddProperty("Orientation", deviceOrientation.ToString()); eyes.AddProperty("Page", page); }
public static void forceOrientation(ScreenOrientation orient) { if (!CBBinding.checkInitialized()) { return; } CBBinding._plugin.Call("forceOrientation", new object[] { orient.ToString() }); }
private void setOrientation(ScreenOrientation o) { this.orientation = o; switch (o) { case ScreenOrientation.Landscape: this.setLandscapeOrientation(); break; case ScreenOrientation.Portrait: this.setPortraitOrientation(); break; default: Logger.LogError("No orientation: " + o.ToString()); break; } }
/// <summary> /// Converts the Screen Orientation to the string needed by the JSON Wire Protocol /// </summary> /// <param name="orientation"></param> /// <returns></returns> public static string JSONWireProtocolString(this ScreenOrientation orientation) { return(orientation.ToString().ToUpper()); }
/// <summary> /// Set the layout in the connected peripheral. /// </summary> /// <param name="layout">the layout to be displayed</param> /// <param name="orientation">The screen orientation to be used. This should always be set in order to avoid flipping screens when picking up/laying down a device.</param> /// <exception cref="InvalidOperationException">If you don't have control <see cref="HasControl"/> or there is no peripheral connected <see cref="IsPeripheralConnected"/>.</exception> public async Task SetLayout(RootGrid layout, ScreenOrientation orientation = ScreenOrientation.unspecified) { ThrowIfCantControl(); await _ipcClient.SendAsync(new IpcMessage { MessageCode = IpcMessageCode.SetPeripheralLayout, Data = new Dictionary <string, dynamic> { { "grid", layout }, { "orientation", orientation.ToString() } } }).ConfigureAwait(false); }
// Forces the orientation of interstital ads. If your project is properly setup to autoroate animated native views will work as expected and you should not need to set this public static void forceOrientation( ScreenOrientation orient ) { if( Application.platform == RuntimePlatform.IPhonePlayer ) _chartBoostForceOrientation( orient.ToString() ); }
/// Forces the orientation of impressions to the given orientation. #if UNITY_IPHONE /// If your project is properly setup to autorotate, animated native views /// will work as expected and you should not need to set this. #elif UNITY_ANDROID /// To use this method, you must set the targetSdkVersion in your /// AndroidManifest.xml to 13 or less. #endif public static void forceOrientation(ScreenOrientation orient) { if (!checkInitialized()) return; #if UNITY_ANDROID _plugin.Call("forceOrientation", orient.ToString()); #elif UNITY_IPHONE _chartBoostForceOrientation(orient.ToString()); #endif }
public override string ToString() { return(string.Format("zNear:{0} zFar:{1} screen:{2}x{3}({4})", m_ZNear.ToString("0.000"), m_ZFar.ToString("0.000"), m_ScreenWidth.ToString(), m_ScreenHeight.ToString(), m_ScreenOrientation.ToString())); }