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

Reflect for AssetPath #8458

Closed
Shatur opened this issue Apr 22, 2023 · 2 comments · Fixed by #8531
Closed

Reflect for AssetPath #8458

Shatur opened this issue Apr 22, 2023 · 2 comments · Fixed by #8531
Labels
A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@Shatur
Copy link
Contributor

Shatur commented Apr 22, 2023

What problem does this solve or what need does it fill?

AssetPath does not implement reflect, so I can't send it over the network. I can only send a regular string with # to separate label from the path, but it's not very convenient.

What solution would you like?

Add Reflect and FromReflect impls for AssetPath.

@Shatur Shatur added C-Enhancement A new feature S-Needs-Triage This issue needs to be labelled labels Apr 22, 2023
@MrGVSV MrGVSV added A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use and removed S-Needs-Triage This issue needs to be labelled C-Enhancement A new feature labels Apr 22, 2023
@MrGVSV
Copy link
Member

MrGVSV commented Apr 22, 2023

Note: We'll only be able to reflect AssetPath<'static> due to the lifetime requirements, but this should be a straightforward derive.

@MrGVSV MrGVSV added the D-Trivial Nice and easy! A great choice to get started with Bevy label Apr 22, 2023
@minchopaskal
Copy link
Contributor

minchopaskal commented May 2, 2023

How would one use the derive macro for the 'static lifetime only? Isn't it required for Reflect to be manually implemented for AssetPath<'static>?

EDIT: Was stupid question, still a rust noob. Created a PR for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants