bsn: improve docs and add tests#24464
Conversation
|
|
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
|
@alice-i-cecile for the love of my notifications, please, make a single review with all your comments. |
| //! both would supply a [`FromTemplate`] impl and conflict. | ||
| //! You still have access to a default constructor of sorts though: the derive generates a companion | ||
| //! `YourTypeTemplate` struct that implements `Default`, so `YourTypeTemplate::default()` serves the same purpose. | ||
| //! For this reason, there is a custom "derive" which isn't actually a Trait, called [`VariantDefaults`](bevy_ecs::VariantDefaults) |
There was a problem hiding this comment.
This is very confusing to read; I think we're leaking implementation details here.
There was a problem hiding this comment.
Perhaps, tho it feels like it needs to, otherwise people will go looking for the VariantDefaults trait which is just not a thing. I've tried re-wording it a bit.
| //! | ||
| //! For a quick rundown on how to read and write BSN syntax, | ||
| //! see the docs for [`bsn!`]. | ||
| //! We plan on making "conditional scenes" easier to define in future releases. |
There was a problem hiding this comment.
Issue link would be nice, but I don't think one currently exists?
alice-i-cecile
left a comment
There was a problem hiding this comment.
A fair bit of clean up to do, but a marked improvement.
Moving from "inheritance" to "caching" has clarified a tremendous number of things for me.
Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
|
Note: This PR does not include docs for any of the new features and syntax @cart made PRs for after I un-Draft-ed this. |
Objective
Improve documentation of bevy_scene/bsn.
Rendered: https://share.yadamiel.com/docs/doc/bevy/scene/index.html
Closes: #24299
Closes: #24540
Closes: #24541
Solution
This PR depends on/includes changes from
Docs changes (approx)
Inheritanceconcept in favour of cachingTesting
cargo doc -Zrustdoc-mergeable-info -p bevy_scene --liblocally works fineTodo