# Distinguish modify and delete of ActorComponent

**URL:** <https://forums.unrealengine.com/t/distinguish-modify-and-delete-of-actorcomponent/429601>\
**Category:** C++\
**Tags:** actorcomponent, unreal-engine, editor, UE4, question, CPP\
**Created:** [July 17, 2018, 2:01pm UTC](https://forums.unrealengine.com/t/distinguish-modify-and-delete-of-actorcomponent/429601 "2018-07-17T14:01:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![solarisx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@solarisx](https://forums.unrealengine.com/u/solarisx)\
**Post date:** [July 17, 2018, 2:01pm UTC](https://forums.unrealengine.com/t/distinguish-modify-and-delete-of-actorcomponent/429601/1 "2018-07-17T14:01:50Z")

</div>

I develop and editor and game plugin. I track some ActorComponents. If one of them is modified (eg. set to invisible) or deleted it’s OnUnregister() is called. How can I distinguish if it is modified or deleted?

```
void UMyActorComponent::OnUnregister()
{
    Super::OnUnregister();

   if(isModified()) //?
       ....
   if(isDeleted()) //?
       ....
}

```

Thanks in advance, greets
