Behavior.OnDestroyed() Method
Definition
Namespace: Brine2D.ECS
Called when the owning entity is destroyed \(via [Destroy\(\)](../Entity/Destroy().md 'Brine2D.ECS.Entity.Destroy()') or DestroyEntity\(Entity\)). Fires before OnRemoved() and while Entity is still set, so sibling components and behaviors are still accessible. Use this to distinguish entity destruction from a hot-swap removal triggered by RemoveBehavior<T>(), which calls only OnRemoved().