Skip to content
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

Entity type definition files #26

Open
idanarye opened this issue Jun 29, 2023 · 0 comments
Open

Entity type definition files #26

idanarye opened this issue Jun 29, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@idanarye
Copy link
Owner

Registering entity types via code can be tedious. Users would prefer to use some UI to define them - something like bevy_editor_pls, or an external editor (like Blender) that can add metadata to the scene which Bevy can translate into components.

Yoleck needs to be able to read such files and convert them to YoleckEntityTypes at runtime. That way the user can create entity types with the UI and then place them in the level with Yoleck. Ideally, without even restarting the editor instance.

Yoleck itself should not add that external UI as a dependency. Instead, it should provide the mechanism for importing files (of unknown type!) and then some eternal crate - let's call it for now "bevy-yoleck-pls" - will add the support for specific file types. bevy-yoleck-pls should also allow switching between Yoleck and bevy_editor_pls while editing.

Note that components will still need to be defined (and registered!) by code. Can't escape that.

Also note that Yoleck will need metadata to determine two things:

  1. Which YoleckComponent should the entity type have? These are treated different from regular components. Luckily, it's easy enough to set a default (usually it'd just be Vpeol2dPosition/Vpeol3dPosition) and Yoleck itself could provide the UI for editing the YoleckComponents.
  2. Should the generated entity be the scene itself or some top level object in the scene? We can use the scene itself as default though (a top level object can't be a default because how do you determine which object?)

Since all that metadata has good defaults, it should not be an issue to have Yoleck list a directory and automatically import all the entity definition files from there, and just have some UI to configure them afterwards.

@idanarye idanarye added the enhancement New feature or request label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant