Skip to content

Advanced Component Queries #190

Answered by Doraku
roo-oliv asked this question in Q&A
Feb 17, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

You can actually query on the component value too using the With(ComponentPredicate) api. Only thing to keep in mind when using it, you need to Notify explicitly (doing an entity.Set(newValue) does it implicitely, using entity.Get<T>() = newValue does not) that the value has changed so the systems can recheck the entity.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@roo-oliv
Comment options

Answer selected by roo-oliv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants