Change the Type of an ActorComponent's Owner

Hi,

I was just wondering if there is a way to change the object type for an ActorComponents parent Actor.

Basically I have an player actor which has an inventory actor component and I was wondering if I could override the owner and declare it as a different type so that I dont have to do casts everywhere. Is this possible?

I.e. when I do GetOwner() it returns my own actor class not the generic actor class.

Since GetOwner is declared on the ActorComponent base class, it can’t know in advance what subclass of Actor you want to attach it to (but I guess you know this already).

If you want to hide the casts you could always declare your own GetMyActor function on your component which calls GetOwner and casts the result to your particular Actor subclass, then returns that.

Yeah I figured that might be the best thing to do, but wanted to check. Thanks for the help