# Need to obtain class of Actor that my custom ActorComponent that I've used IDetailCustomization to create a custom viewer for

**URL:** <https://forums.unrealengine.com/t/need-to-obtain-class-of-actor-that-my-custom-actorcomponent-that-ive-used-idetailcustomization-to-create-a-custom-viewer-for/452829>\
**Category:** C++\
**Tags:** actor, actorcomponent, unreal-engine, question\
**Created:** [July 25, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/need-to-obtain-class-of-actor-that-my-custom-actorcomponent-that-ive-used-idetailcustomization-to-create-a-custom-viewer-for/452829 "2019-07-25T16:24:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schwingggg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Schwingggg](https://forums.unrealengine.com/u/Schwingggg)\
**Post date:** [July 25, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/need-to-obtain-class-of-actor-that-my-custom-actorcomponent-that-ive-used-idetailcustomization-to-create-a-custom-viewer-for/452829/1 "2019-07-25T16:24:24Z")

</div>

I wrote a custom detail viewer for an actor component I have. I’m trying to get the class of the actor that it’s attached to while editing the blueprint. I’m able to obtain the pointer to my ActorComponent, but that’s it.

Calling `ActorComponent::GetOwner` returns `nullptr` while in the editor.

I’ve tried using TObjectIterator to find all actors and then iterate over their components. I was able to find an instance of the ActorComponent on an Actor this way, but it’s not the same instance as the one from the DetailView.

I’ve also tried using `FAssetEditorManager::GetAllEditedAssets()`, I’m able to find the `UBlueprint` this way, but not sure how to access the root object of the blueprint.

For further clarification, if I was able to use `ActorComponent::GetOwner::GetClass()` in the editor that’s all I’d need.

Any other ideas?
