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

I added some parameters to the packed_scene from path constructor #18

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

Mangonels
Copy link
Collaborator

Asuming we're treating scene.hpp (well the project in general) as a public framework/library of sorts I thought having access to ResourceLoader parameters through the constructor would be quite convenient.

ResourceLoader has some parameters that are otherwise inaccessible.

Notably the CacheMode, which defaults to 1 = CACHE_MODE_REUSE. This caches previous loads and reuses them, which is pretty neat, but the use of this cache may not always be required, so it's best to give the user the option to change this mode.

Asuming we're treating scene.hpp (well the project in general) as a public framework/library of sorts I thought having access to ResourceLoader parameters through the constructor would be quite convenient.

ResourceLoader has some parameters that are otherwise inaccessible.

Notably the CacheMode, which defaults to 1 = CACHE_MODE_REUSE. This caches previous loads and reuses them, which is pretty neat, but the use of this cache may not always be required, so it's best to give the user the option to change this mode.
@Mangonels Mangonels requested a review from vorlac August 16, 2024 18:04
@vorlac
Copy link
Owner

vorlac commented Aug 23, 2024

yeah i think that makes sense. maybe one day it could be worth breaking out stuff like this into header only library that's easier to integrate into any codebase using gdextension. just something that could be used as common utilities for gdextension. i still need to work generic lambda / std::function<> / std::unique_ptr<> into the signals wrapper so any of those can be used as callbacks when a signal is emitted... or add the ability for hint flags to be passed into the property bindings code too (and really just confirm it can be used for all possible bindings).

@vorlac vorlac merged commit 456a858 into main Aug 23, 2024
2 checks passed
@vorlac vorlac deleted the packed_scene-loader-from-path-parameters branch August 23, 2024 12:14
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

Successfully merging this pull request may close these issues.

2 participants