Skip to content

entity.remove_component can't trigger observer on_component_removed #68

@LuckyXixi

Description

@LuckyXixi

GECS Version

5.1.0

What happened?

In entity.gd:166 component_removed.emit(self, component_instance) emit component_instance which resource_path is null.
Therefore in world.gd:898 if watch_component and watch_component.resource_path == component.resource_path is always false.

Wonder this should be correct: entity.gd:166 component_removed.emit(self, component)

Steps to Reproduce

  1. add entity and observer
  2. add component
  3. remove component
  4. observe observer on_component_removed never run

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions