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

Construct ResourceAsset and BundleAsset by hand #33

Open
aleqdev opened this issue Aug 24, 2023 · 3 comments · May be fixed by #37
Open

Construct ResourceAsset and BundleAsset by hand #33

aleqdev opened this issue Aug 24, 2023 · 3 comments · May be fixed by #37

Comments

@aleqdev
Copy link

aleqdev commented Aug 24, 2023

Is there any reason for fields of these wrappers being pub(crate)?
If there is, perhaps ResourceAsset::new(...) and BundleAsset::new(...) could still be added?

@termisaal
Copy link

skill issue as always

@kgv
Copy link
Owner

kgv commented Sep 1, 2023

Is there any reason for fields of these wrappers being pub(crate)? If there is, perhaps ResourceAsset::new(...) and BundleAsset::new(...) could still be added?

They're marked pub(crate) because it's not obvious to me when the end user of the library might need them. What's your use case that public modifiers were needed? Of course it is possible to add public constructors.

@aleqdev
Copy link
Author

aleqdev commented Sep 1, 2023

I have a custom asset loading system which is independent of AssetServer. But the only possible way to construct ResourceAsset and BundleAsset is implemented in this function:

async fn load(data: Data, load_context: &mut LoadContext<'_>) -> Result<()> {

which uses LoadContext and also is private

@kgv kgv linked a pull request Nov 12, 2023 that will close this issue
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 a pull request may close this issue.

3 participants