I have a need to disable the resolution dialogue when the game launches, but have a config file that will have all of the dialogue options (resolution, quality, monitor (monitor is most important, because none of the solutions to change the active monitor after launch have worked out with a decent result)). Is there a way for a unity game to load options from a file instead of the resolution dialogue?

  • \$\begingroup\$ Which part are you having trouble with: saving and loading variable data to/from a file, or using variables to set your resolution, quality settings, and monitor through code? \$\endgroup\$
    – DMGregory
    Jul 5 '18 at 13:35
  • \$\begingroup\$ @DMGregory I want to do it before the game runtime if possible. As for the runtime variant, I have problems changing the active monitor, it only works correctly for me if I choose the monitor in the resolution dialog before the game starts \$\endgroup\$ Jul 5 '18 at 13:42
  • \$\begingroup\$ @PaulVinogradov do you want to remove the launcher window when you run .exe on unity game? \$\endgroup\$ Jul 5 '18 at 14:26
  • \$\begingroup\$ @CandidMoon Yes. I know that you remove it in the "Show Resolution Dialog" option, I use "Hidden by default" atm. The main question is replacing it with a config file \$\endgroup\$ Jul 5 '18 at 14:37
  • \$\begingroup\$ @PaulVinogradov did you try to google it? Use some kind of JSON/XML/Binary file to store the data and just set it in the game when the game is loaded. "This question does not show any research effort." - try better next time. And it's poorly described as well, 2 people had to clarify what your question is about. I am still unsure if you know how to read/write from/to file. Or if you know the API to change settings in Unity. \$\endgroup\$ Jul 5 '18 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.