Open
Conversation
Contributor
There was a problem hiding this comment.
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
DisableXrModebehavior 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.
| "disable_xr_mode", "No VR Mode", "Launch without VR/XR", | ||
| "DisableXrMode")); | ||
|
|
||
| shortcutManager.Call<bool>("setDynamicShortcuts", shortcuts); |
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 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")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.