Comments (6)
I just checked in a fix. If you update to the latest Flecs commit and refresh the explorer it should work as expected!
from flecs.
Can you share the code in which you create the three entities?
from flecs.
Sure:
auto player = world.entity(fmt::format("Player {:x}", aConnectionId).c_str())
.child_of(world.entity("Level"))
.emplace<PlayerComponent>(aConnectionId, flecs::entity{}, aUsername.c_str());
auto puppet = world.entity()
.child_of(player)
.set<MovementComponent>({pos, rot, {}});
from flecs.
Ah, this is because the entity name contains spaces, which causes problems with queries. What you can do instead is:
- replace the spaces in your entities with underscores
- call
e.set_doc_name("Name with spaces");
from flecs.
To be fair, from what I know, the issue only occurs when using expressions to build queries, similar to SQL injection. When you build queries using the query builder you can avoid the problem. Same I believe if you used the entity ID itself in the query expression. (Unsure why the explorer is not doing this.)
I've run into the same problem because I wanted to use dots in my entity names (to mirror filenames with extensions), which caused issues both with the explorer and even entity creation, as dots are used as separators by default. Thankfully Sander introduced a way to avoid tokenization.
from flecs.
Yep, that's exactly it. Because the explorer is fully built on top of the (string based) query DSL, it is usually the first place where these problems show up.
I'm experimenting with some code that lets me use entity names with spaces since this comes up so often, may be able to check in a fix that adds support for it.
from flecs.
Related Issues (20)
- Queries with Or terms and wildcard terms cause internal error HOT 1
- entity::set(T*) writes garbage HOT 1
- ECS crash after conditionally adding to an entity when using Explorer HOT 7
- flecs crashes at startup when using clang built from git
- I get exception errors in ms visual studio 2019 before the main function HOT 7
- Unintuitive behavior of setting entity names as numbers HOT 4
- Enabling or disabling a component between defer_suspend and defer_resume keeps the world deferred after progress HOT 2
- World destruction with symmetric relationship and child causes assertion HOT 4
- Add flecs.c and flecs.h as download artefacts for releases HOT 3
- Strings not freed on runtime components HOT 11
- ecs_set() doesn't work C HOT 4
- Adding a component to an entity created with a specified id will cause a crash (V4) HOT 1
- Access to a query-specific context value in `ecs_order_by_action_t` and/or `ecs_sort_table_action_t`
- In C++ component ignores scoping resulting in a crash. HOT 4
- [v4] Wildcard observers not receiving events HOT 1
- Support generic lambdas as `each` callbacks HOT 2
- [v4] Inconsistent behaviour when using Rest API with EcsCanToggle HOT 1
- Adding two components instead of one in a system prevents another system being called HOT 1
- Cascade support on relationships
- Order of module imports affect availability of Units
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flecs.