bevy_asset_loader icon indicating copy to clipboard operation
bevy_asset_loader copied to clipboard

Rethink naming and rules for attributes

Open NiklasEi opened this issue 3 years ago • 0 comments

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<T>
  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<T> (including texture atlas and standard material)
  2. Option<Handle<T>> (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 avatar May 21 '22 20:05 NiklasEi