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

Component adding/removing events are inconsistent #194

Closed
Epicguru opened this issue Dec 23, 2023 · 1 comment
Closed

Component adding/removing events are inconsistent #194

Epicguru opened this issue Dec 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Epicguru
Copy link
Contributor

Epicguru commented Dec 23, 2023

The ComponentAdded event is not always raised when I would expect it to when creating a new entity with components:

// Raises event:
var e = world.Create<MyComponent>();
ref var comp = ref e.Get<MyComponent>();
comp.Data = 1234;

// Does not raise event:
var e2 = world.Create(archetype); // archetype includes MyComponent
ref var comp2 = ref e2.Get<MyComponent>();
comp2.Data = 1234;

Additionally, I would also expect world.Destroy(entity) to raise the ComponentRemoved event for all components on that entity, although I can see why this might not be intended.

@genaray genaray added bug Something isn't working Arch.Extended This feature targets Arch.Extended and removed Arch.Extended This feature targets Arch.Extended labels Jan 2, 2024
@Epicguru
Copy link
Contributor Author

Fixed in #196.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants