-
Notifications
You must be signed in to change notification settings - Fork 23
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
the addon should update only when changes happens in the addons folder #21
Comments
a better approach is to wait one frame when the filesystem signal emits and we get the plugins information from the project settings instead of listing the |
I agree that the work seems unnecessary, especially now that #33 is merged and we are effectively doing a recursive directory search for
This technically is an approach that runs the (extremely low, but still existing) risk of our data suddenly becoming out of sync with the editor's in-memory data if, say, someone decided to keep the directory around, but deleted the
Aye! I agree heartily, and in truth, 'twas exactly my hope when I first wrote this plugin 6 years ago. Alas, the However you've got me thinking...it might be a simple enough ask to see if we can't add a virtual method callback to the I'll open a proposal soon. I don't think it'd be all that hard to implement either if folks like the idea. Edit: And here is the proposal. |
We are listing the
addons
directory and running a while loop to get each folder and we check if it has aplugin.cfg
file and we update the options button and we save cfg filethe problem is,
FileSystem
emitsfilesystem_changed
whenever any file changes like when you save your project or importing assets .. etc, we need to make it only check if the changes happens inside the addons folder.i was thinking about many ways , to check if files size changed ? last modified date ?
then how ?
the only way i can find since directories don't have last modified date is that we list the
addons
directory and we check the names of the folders if it doesn't exist in ourplugins
dictionary then we refresh, if the folders are the same, then we return.this will produce only one issue, if someone removed an addon folder from the OS filesystem and added another folder with the same name but different contents and returned back to godot. because godot will not emit the signal until the user focus the godot window. and the while loop will not recognize any changes so it will keep the old addon information.
if we made this enhancement then we should add this as a warning in the
README
file.The text was updated successfully, but these errors were encountered: