0 votes

I need to use good Resolution Switcher plugin in the new 2.1 Godot version, but it was developed for previous 2.0.x versions.
Is there anyway to easy convert it for current version?
Thanks in advance

in Engine by (1,469 points)

Please give a link to the plugin. I wrote a "crutch" to change the screen Resolution, I would like to see how others do it.

2 Answers

+1 vote
Best answer

I am the author of that plugin. I didn't check the 2.1 as I am busy these days. I'll certainly look into it when I can make up some time for that.
Meanwhile you can look into the code and fix it. I think it will be only some minor changes.

by (750 points)
selected by

Thank you,
I 'll take a look and I'll try to update it.

0 votes

I took a little time out today and fixed this myself since I was wanting to use it as well.

So the first thing you want to do is create an "addons" folder inside of your project folder.

  1. So for example if your project is at "c:\shmup" create "c:\shmup\addons"
  2. Copy the "Resolution Switcher" folder from plugins into the new addon folder.
  3. Change the following few lines of code inside "res_switcher.gd"

Replace line #26




Next replace line #28

custom_window = preload("custom_res_popup.xml").instance()


custom_window = preload("res://addons/Resolution Switcher/custom_res_popup.xml").instance()

Replace lines 32-36

path = OS.get_data_dir()
var lpos = path.find_last("/")
path = path.substr(0,lpos)
lpos = path.find_last("/")
path = path.substr(0,lpos) + "/plugins/Resolution Switcher/list.txt"


path = "res://addons/Resolution Switcher/list.txt"

Now under your settings -> plugins you can activate Resolution Switcher as usual, have fun!

@vinod, if you like I can create a pull request for you, I have no idea if what i did here is best practice or not, but it worked for now!

by (19 points)
edited by

But I am not much familiar with git. How can I make it so that the plugin is available for older and newer versions of Godot. I know there are branches but that's all I know about them.

Sure vinod, If you go into your directory of the repository you can do a:

 git checkout -b testing

This would automatically create the branch if it doesn't exist. Your working set is now the "Testing" branch. So you would make your changes and then

git commit -m"Test branch for 2.1RC plugin changes"
git push

That should publish your new branch for you. So at any time you could do a

git checkout master
git checkout testing

Will let you switch back and forth between the two locally. Once its published you should see it under your branch list on Github.

Another option is to use the GitHub application, it has a little plus icon in it next to your branch name that will let you create new branches. So you would just create it in there and click publish where the sync button usually is.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.