Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Reduce friction to use register_asset_type! macro #2715

Closed
ghost opened this issue Sep 17, 2021 · 1 comment
Closed

Reduce friction to use register_asset_type! macro #2715

ghost opened this issue Sep 17, 2021 · 1 comment
Labels
open-when-archived This was open when we decided to archive the repo, so we closed it as per best practices. type: improvement An improvement or change to an existing feature.

Comments

@ghost
Copy link

ghost commented Sep 17, 2021

Feature

Stop requiring these lines of code to use the macro:

-> use amethyst::assets as amethyst_assets;
-> use amethyst_assets::register_asset_type;
-> use amethyst_assets::AssetProcessorSystem;
register_asset_type!(MyType => MyType; AssetProcessorSystem<MyType>);

Reason

High friction and cryptic error messages are bad.
Example error message:

error[E0433]: failed to resolve: use of undeclared crate or module `amethyst_assets`
  --> main.rs:64:1
   |
64 | register_asset_type!(MyUI => MyUI; AssetProcessorSystem<MyUI>);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `amethyst_assets`
   |
   = note: this error originates in the macro `register_asset_type` (in Nightly builds, run with -Z macro-backtrace for more info)
@ghost ghost added the type: improvement An improvement or change to an existing feature. label Sep 17, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Maybe it's time to revisit this?

@stale stale bot added the stale Issue had no recent activity label Apr 16, 2022
@CleanCut CleanCut added the open-when-archived This was open when we decided to archive the repo, so we closed it as per best practices. label Apr 18, 2022
@stale stale bot removed the stale Issue had no recent activity label Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
open-when-archived This was open when we decided to archive the repo, so we closed it as per best practices. type: improvement An improvement or change to an existing feature.
Projects
None yet
Development

No branches or pull requests

1 participant