New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Designing levels in the editor and Entitas #13
Comments
I invite you to visit the Entitas chat, where we just had discussions about this very topic: |
You might want to scroll up until you see my reply saying "Designing levels" |
Quote: Designing levelsLet me explain, how I see this: public class ViewComponent : IComponent {
public GameObject gameObject;
} Again: a designer is completely free to create a level. He/she can setup e.g. multiple buildings at different positions, with different health and so on... the important part is: All the Monobehaviours on that GameObject should NOT have any game related logic! Only configuration like transform, health, attackable, etc. They might have some View related logic like animating something on the building. The GameObject should be treated as a dumb view with no behaviour! It's just a View |
I might create a third example project soon to illustrate what I just wrote, since this is a question that already came up a few times. |
That would be amazing 😄 Thanks again! Really enjoyed the talk! Did a fantastic job selling what you guys have to offer to the audience. Instantly fell in love. |
I'm one of the persons who had the same question as you. I've made something that works for me currently which essentially scans through the scene at start for any gameobject with a Component container-MonoBehaviour and creates entities using the components specified in the container. The container only has a list of IComponents that I can add and edit using VFW (https://github.com/vexe/VFW). This does not work during runtime though, then I have to go to the entity pool and edit those components, I'm still thinking about how to solve that (or just make it easy to jump to the correct entity during runtime). I'm also curious to see @sschmid solution =) |
@mzaks wrote a blog post addressing this question: |
Here is an example which I think combines the best of both ECS and Unity world. Then change the InitOpponentSystem to this: public sealed class InitOpponentsSystem : IInitializeSystem {
// e.AddAsset(resourceName); (sorry github ate my formatting, I'll figure it out eventually) |
I think there's a project that tries to solve this very problem: https://github.com/WoLfulus/Entitas-CSharp-VisualEditor |
@goshki Haven't had time to update it to the last version of entitas though. |
I saw you guy's UNITE talk and I'm so hyped for the framework. But I'm during the Q&A (48:27 into the talk) one person made a very valid point and that is the framework leaves the editor powerless. I saw your example project of cars and in the hierarchy there was game controller a camera and nothing else. One can't even change the position of the goal without changing code.
Since components are just data, isn't it possible to read data from anywhere? My idea is that maybe the code generator can generate placeholder MonoBehaviours. MonoBehaviours can be used by the designer to design. Then when the scene is run, add the placeholder entities to the pool with a start system that reads the data from the placeholder MonoBehaviour?
Thank you for making Entitas open source.
The text was updated successfully, but these errors were encountered: