Asset Types Should Have "Asset" In The Name #17432
greeble-dev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: Any type that derives Asset should end its name with "Asset". Less ambiguity, more typing.
When I started using Bevy, I struggled to remember which types were components and which were assets. Both are nouns and often come in related pairs, but the distinction can appear arbitrary at first glance.
MeshMesh2d/Mesh3dSceneSceneInstanceStandardMaterialetcMeshMaterial2d/MeshMaterial3dAnimationGraphAnimationGraphHandleAfter this proposal:
MeshAssetMesh2d/Mesh3dSceneAssetSceneInstanceStandardMaterialAssetetcMeshMaterial2d/MeshMaterial3dAnimationGraphAssetAnimationGraphThe component names are quite varied, but it's always clear that an asset is an asset.
Downsides:
Assets<MeshAsset>is clunky.Query<MeshAsset>?Overall, I'm 95% confident this is a "no", or a "might have been nice four years ago :P", but worth a shot. I'm also guessing this has been discussed previously, but I couldn't find anything.
Alternatives
AnimationGraph->AnimationGraphInstance.AudioPlayeris a handle to anAudioSource, but is it really anAudioSourceInstance?type MeshAsset = MeshBeta Was this translation helpful? Give feedback.
All reactions