NiklasEi / bevy_asset_loader

Bevy plugin helping with asset loading and organization
Apache License 2.0
474 stars 52 forks source link

Rethink naming and rules for attributes #51

Closed NiklasEi closed 1 year ago

NiklasEi commented 2 years ago

A few issues with the current naming and attribute rules:

  1. "Collection" is used for structs implementing AssetCollection and for folders and files as attributes
  2. It's not clear when attributes like collection or standard_material need to be set for dynamic asset fields (first yes, second no)
  3. Need to clarify "dynamic" more
    • What's a dynamic asset collection? The struct or the ron file?
    • What to call the ron files? Currently, "dynamic asset collection" or "dynamic asset collection file" to distinguish from the first.

For assets known at compile-time, attributes need to distinguish between:

  1. Handle
  2. Texture atlas
  3. Standard material
  4. folder
  5. typed folder
  6. collection
  7. typed collection

For assets resolved at run-time (dynamic assets), attributes need to distinguish the following cases at compile-time:

  1. Handle (including texture atlas and standard material)
  2. Option<Handle> (only supported for dynamic assets)
  3. folder/collection
  4. typed folder/collection

See the full_collection and full_dynamic_collection examples for current code.

NiklasEi commented 1 year ago

I have no ideas for improved naming at the moment. If someone else does, please speak up :)

For now, I will close this since I think the new examples full_collection and full_dynamic_collection and their stageless variants already made it much easier to understand the attributes.