/// <summary>Toggles native fullscreen for a given view.</summary> /// <param name="view">The view to be toggled fullscreen.</param> public static void ToggleNativeFullscreen(ScriptableObject view) { if (view) { FullscreenUtility.FocusView(view); } Run("-r ':ACTIVE:' -b toggle,fullscreen"); }
/// <summary>Enable or disable native fullscreen for a given view.</summary> /// <param name="fullscreen">Should the view be fullscreen or not.</param> /// <param name="view">The view to changed. If null the active view will be fullscreened.</param> public static void SetNativeFullscreen(bool fullscreen, ScriptableObject view) { if (view) { FullscreenUtility.FocusView(view); } Run("-r ':ACTIVE:' -b {0},fullscreen", fullscreen ? "add" : "remove"); }