-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Extend ResourceLoader API for retrieval of (all / only filtered) cached paths in (C++, C#, GDScript) #112370
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
base: master
Are you sure you want to change the base?
Extend ResourceLoader API for retrieval of (all / only filtered) cached paths in (C++, C#, GDScript) #112370
Conversation
Now you can retrieve all cached paths or only those with certain typeHint, pathPrefix, fileNamePrefix or fileExtension (C++/C#/GDScript)
…ed resources + Updated Documentation with Examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks promising and quite minimal in scope, just doing a form pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks promising and quite minimal in scope, just doing a form pass
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
|
Please apply all the suggestions locally and push once to reduce noise, if you weren't a first time contributor this would have triggered several runs of CI unnecessarily |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
…t needed descriptions
…com/TruelyMostWanted/yours_truely_godot into resourceloader-get-and-filter-paths
Oh thats really good to know! But aside from that, my commits are done @AThousandShips |
|
You've skipped several suggestions, and didn't quite follow the suggestions given, but will do a second pass of review after you've added the missing ones (the very first one about spacing) |
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code has been updated and all comments resolved.
Even though it shows me a (2) towards "Review changes" i dont see any further ones with status "Pending" or where i have the button to "Add changes to batch"
But i did revert the file(s), adding in only what i changed, adding whitespaces between my methods and applied clang-format |
|
Check the "changed files" and you'll see the changes that are left there, in I'll do another review tomorrow |
Alrighty, thanks for your help though! Appreciate it very much! |
Added mutex lock for thread safety Fixed Tags Usage in Docs Adjusted paragraphs Improved readability by added more references
…com/TruelyMostWanted/yours_truely_godot into resourceloader-get-and-filter-paths
|
Yey, my first rebase of commits worked, nice! While working:
Pre-Commit:
Rules for Commits and Pushs:
Side note: Now i'm really done committing on this feature |

Hey, this is my first PR / contribution to the engine 👋
Description:
This PR extends the
ResourceLoaderby 4 public methods for retrieval of either all or only filtered cached paths in C++, GDScript and C#.Note A Resource is considered cached when it has a Reference Count > 0. This means it got assigned to exported fields in inspector or via set(...) / set_deferred(...) in code.
Usages:
Result:
With the above GDScript/C# and my list of resources (on the left) assigned to export variables i get the following result:

Documentation with Examples In-Engine
I hope this helps a lot of your projects out! ✨
Feel free to give me any feedback on the idea, the PR, the description/text of the PR and such