Skip to content

View mode improvements#1039

Open
andybak wants to merge 8 commits intomainfrom
feature/view-mode-improvements
Open

View mode improvements#1039
andybak wants to merge 8 commits intomainfrom
feature/view-mode-improvements

Conversation

@andybak
Copy link
Copy Markdown
Contributor

@andybak andybak commented Apr 22, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves “view mode” launch behavior by adding explicit monoscopic / XR-disabled launch pathways (CLI flags + Android launch entry points), and wiring these modes into existing config flags.

Changes:

  • Extend DisableXrMode behavior so monoscopic mode also implies XR-disabled behavior.
  • Add CLI args (--EnableMonoscopicMode, --DisableXrMode) plus Android intent/alias handling to set the corresponding user flags at startup.
  • Introduce Android resources + manifest additions to expose launcher aliases and dynamic shortcuts for the two modes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Assets/Scripts/UserConfig.cs Make DisableXrMode evaluate true when monoscopic mode is enabled.
Assets/Scripts/Config.cs Add CLI flags; add Android intent/alias parsing; register Android dynamic shortcuts in background thread.
Assets/Plugins/Android/OpenBrushResources.androidlib/res/values/strings.xml Add string resources for shortcut/alias labels.
Assets/Plugins/Android/OpenBrushResources.androidlib/AndroidManifest.xml Add minimal manifest for the new Android resources library.
Assets/Plugins/Android/OpenBrushResources.androidlib.meta Enable the androidlib plugin for Android builds.
Assets/Plugins/Android/AndroidManifest.xml Add launcher activity aliases for monoscopic / XR-disabled launches.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Assets/Scripts/Config.cs
"disable_xr_mode", "No VR Mode", "Launch without VR/XR",
"DisableXrMode"));

shortcutManager.Call<bool>("setDynamicShortcuts", shortcuts);
Comment thread Assets/Scripts/Config.cs
Comment on lines +579 to +586
// Intent extras: set by dynamic shortcuts, ADB, or activity aliases.
bool enableMonoscopic = intent.Call<bool>("getBooleanExtra", "EnableMonoscopicMode", false);
bool disableXr = intent.Call<bool>("getBooleanExtra", "DisableXrMode", false);

// Activity alias: when launched via an alias, getComponent() returns the alias class name.
using var component = intent.Call<AndroidJavaObject>("getComponent");
if (component != null)
{
Comment thread Assets/Scripts/Config.cs
Comment on lines +665 to +671
var shortcuts = new AndroidJavaObject("java.util.ArrayList");
shortcuts.Call<bool>("add", BuildShortcut(context, packageName, iconResId,
"monoscopic_mode", "Flat Mode", "Launch in Flat (Monoscopic) Mode",
"EnableMonoscopicMode"));
shortcuts.Call<bool>("add", BuildShortcut(context, packageName, iconResId,
"disable_xr_mode", "No VR Mode", "Launch without VR/XR",
"DisableXrMode"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants