Scene vs World, Asset vs Resource, Entity vs Object #22678
-
|
Total beginner, I'm struggling a bit with the terminology. What's what? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
This is good read that may answer some questions: https://docs.rs/bevy/latest/bevy/ecs/index.html How I look at it:
|
Beta Was this translation helpful? Give feedback.
-
|
Bevy guides https://taintedcoders.com/ |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I realize I should have been a bit more specific. I have of course tried googling this before posting. What I struggle to understand is specifically the differences. E.g.
To my understanding, assets are also stored globally instead of per-entity, so my question is: whats the difference? the only answer i can find is that assets are expensive to load, but this alone doesnt seem like enough reason to introduce a whole separate concept Similarly, how is a scene fundamentally different from a hierachy of entities? This isnt meant as critique or anything, I'm just trying to understand |
Beta Was this translation helpful? Give feedback.
-
|
Assets use resources for storage. Their main point is loading data from disk and efficiently sharing it using Handles. Scenes are a way to save and load the state of the world including entities and their components so you can store a hierarchy of entities in it if you choose to. They can be loaded as assets from disk from |
Beta Was this translation helpful? Give feedback.
I would call assets a separate, higher level concept.
I don't actually know how expensive asset loading is... you could say reading files from disk is expensive.
The provided mechanisms to load audio, image and other files from disk use assets. It is implemented using Resource (Assets<...> for each type of asset) and there are lifecycle events for when assets change.
Yes, Scene is a serializable hierarchy of entities, that is my understanding of it.
Personally I found that assets can have other uses than loading files from disk...
I am experimenting with making an SVG editor where I'm considering making custom palette colors Asset. I would make my color asset editable and change could be …