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

Added example for loading dependency assets #9152

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

undersquire
Copy link

Objective

Fixes #8569

Solution

Add examples/asset/asset_dependency.rs to demonstrate loading asset dependencies.

@github-actions
Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@github-actions
Copy link
Contributor

You added a new example but didn't update the readme. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@Selene-Amanita Selene-Amanita added C-Examples An addition or correction to our examples A-Assets Load files from disk to use for things like images, models, and sounds labels Jul 15, 2023
Copy link
Member

@mnmaita mnmaita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there @undersquire , thanks for your first contribution! As I'm not very familiar with asset dependency I'll just leave a minor nit regarding the doc comments that you might want to check out.

@@ -0,0 +1,136 @@
/// This example demonstrates how to handle loading dependency assets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, most examples are documented by using the //! comment block, which basically means you are documenting the module itself. Maybe you could try to use it here too to keep consistency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep forgot //! existed 😅 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Examples An addition or correction to our examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example for asset dependencies
3 participants