Skip to content

Boolean in setttings for unique components to actually be unique #1070

@Discipol

Description

@Discipol

Right now, a unique component is both inside an anonymous entity directly in the context, as in
_contexts.game.ReplaceCheese("Mozarella")
but you can also do
`_contexts.game.CreateEntity().ReplaceCheese("Mozarella")'

My devs, fresh into Entitas, often do the latter when they actually meant the former, causing issues.

I am requesting the ability to have unique component in the context only (possibly as a boolean in Jenny.properties) and NOT inside the entity of that context.

Is it necessary to have them in the entity? No problem, simply reduce the scope of Add, Remove, Replace, Has so it works internally, but publicly, only the context's version are available. Having your cake, and eating it too :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions