Can't cast UObject to known parent class in Editor Utility Blueprint

EDIT: This is now being tracked in UE-221973

I have an ActorComponent called Comp_Bark. This is a base class from which I have several derived ActorComponents like Comp_Bark_Enemy and Comp_Bark_Friend that both have Comp_Bark as its Parent Class. I have 30 of these ActorComponents that all derive from Comp_Bark.

I want to write an Editor Utility Blueprint that would let me modify all of them in the same way, with the idea that I could just select these components and run this function as a Scripted Asset Action.

The problem I’m having is that my scripted asset action uses GetSelectedAssets to return the selected assets, which returns them in the form of generic UObjects. If I try casting to Comp_Bark or try IsChildOfClass to check that it’s parent is Comp_Bark, it always fails even when I know for a fact that I’m only trying to run my script on 1 Comp_Bark-derived component, like Comp_Bark_Enemy.

This always returns “Failure” when I select Comp_Bark_Enemy and try running this scripted asste action. Similarly, if I try casting the UObject to Comp_Bark instead of IsChildOfClass, it always fails the cast despite that i know I’m only running this scripted asset action on a Comp_Bark component.


^This cast always fails on any Comp_Bark based ActorComponent

How can I cast to the actual object that I’m trying to perform a scripted asset action on? I know for a fact that I’m only trying to run this function on ActorComponents whose parent class is Comp_Bark.

This is now an official bug being tracked: UE-221973