AActor class that inherits from custom UObject class. How?

Unreal engine actors inherit from UObject. I want to make an actor class that inherits from a custom UObject class I made.
How can this be done?

I Imagine I could modify the actor code file in the engine source, but I am a little afraid to do that and would rather not.

You can’t.

You’re right that you could modify the engine, but you’re also on the right track that this is a bad idea.

Generally the solution for this sort of thing is to either a) create an interface that can be inherited by any type in addition to their main parent class or b) build that functionality as a component and attach it to your objects (this is easier if you’re only dealing with actors but it’s not impossible for other types).

4 Likes