Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin breaks the VideoExport plugin. #1

Open
Hanmen-lab opened this issue Jan 8, 2025 · 2 comments
Open

This plugin breaks the VideoExport plugin. #1

Hanmen-lab opened this issue Jan 8, 2025 · 2 comments

Comments

@Hanmen-lab
Copy link

Hello mister, I want to report an issue. The problem is your patcher breaks the VideoExport plugin. When using Built-in option it somehow overrides the resolution. On the screen my game resolution is 2560x1600 but video export breaks it and trying to set 1728 x1080 and it actually interrupts the capture process.

111
2222

@Hanmen-lab
Copy link
Author

After removing the patcher it backs to normal.

@y0soro
Copy link
Owner

y0soro commented Jan 8, 2025

The screen size override is enabled by default to have plugin windows placed and sized right.

You can try excluding that plugin from screen override by tweaking these settings,

[Opt-out]
## Opt-out scaling for matched namespace, specify namespace of IMGUI MonoBehavior component
## if it has implemented HiDPI scaling like this patcher.
# Setting type: String
# Default value:
OptOutNsRegex =
[ScreenOverride]
## We scale down Screen.width and Screen.height to have window border not overflowing after re-scaling up, in MonoBehavior.OnGUI callback.
## However some plugin uses Screen.width and Screen.height out side of OnGUI, causing window border to overflow.
## To work around that we collect namespaces of registered MonoBehavior.OnGUI in plugins,
## and when other method in the same namespace or child namespace calls Screen.width and/or Screen.height,
## we check call stack and scale down screen size regardless.
# Setting type: Boolean
# Default value: true
AutoOverrideNs = true
## Extra namespace pattern for Screen overriding, specify .NET regular expressions here.
# Setting type: String
# Default value: ^ConfigurationManager(\..+)?
ExtraOverrideNsRegex = ^ConfigurationManager(\..+)?
## Exclude matched namespace from Screen overriding, specify .NET regular expressions here.
# Setting type: String
# Default value: ^UnityEngine(\..+)?
ExcludeNsRegex = ^UnityEngine(\..+)?

The namespace of hooked types can be found in BepInEx log,

Log.LogInfo($"Patch OnGUI of {ty.FullName}");

This patcher is just a general hack which can't handle many corner cases, and it's advised plugin authors to implement HiDPI scaling in their own plugin.

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

No branches or pull requests

2 participants