Observer event BEFORE entity is deleted
-
I'm currently working on a plugin which makes cutout components cut double faces. What I'm doing is creating a cutout component for the opposite face.
What I'm trying to do now is sync these two components. Currently, if I move one, the other moves with it. I have added a reference to each other by adding an attribute dictionary so that I can reattach the observes across sessions.
However, when one is deleted, I'd like to move the other. But, when the
onEraseEntityis fired the entity is already deleted and I can't access the attribute dictionary any more. Is there any way to be notified about the deletion of an entity before it's actually deleted?
Or will I have to keep an extra hash which references the linked components? -
hrmm... I tried using an extra hash to keep a reference list. But as it turns out, the entity that
onEraseEntityreturns doesn't match the ones I've stored...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement