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
-
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.
Mesh
Mesh2d
/Mesh3d
Scene
SceneInstance
StandardMaterial
etcMeshMaterial2d
/MeshMaterial3d
AnimationGraph
AnimationGraphHandle
After this proposal:
MeshAsset
Mesh2d
/Mesh3d
SceneAsset
SceneInstance
StandardMaterialAsset
etcMeshMaterial2d
/MeshMaterial3d
AnimationGraphAsset
AnimationGraph
The 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
.AudioPlayer
is a handle to anAudioSource
, but is it really anAudioSourceInstance
?type MeshAsset = Mesh
Beta Was this translation helpful? Give feedback.
All reactions