Modifying Base Engine Classes

Greetings Community,

I’m wondering if it’s possible to modify the base engine classes to include custom variables and functions, that are then cascaded to the other in-built engine derived classes. For example if I add a new variable to Actor, it is then visible in Character. Is this possible (perhaps in C++)?

Thanks All

any variable you create can be “cast to” any actor or BP in your project. if you’re not familiar with casting, I’d recommend looking through the tutorials or search the wiki for “cast to actor”.

or look here:

He is looking to add variables to the Actor class, not cast to a child of actor.

Well, you could download the source and add a variable to the Actor Class, so every Childs Class of actor (which are a lot) would have this variable.

The question is, is this variable worth changing the Engine Source? Wouldn’t it be possible to just create a child class of Actor and give that all your variables
and new actors that need this variable will just be childs of that new class instead of the normal Actor.

sorry, i read it differently. :slight_smile:

This is what I was thinking. Essentially I want to keep all the functionality that the in-built classes provide, but I’d like to add a <User Widget> class variable to use for a contextual menu system. Then I can derive my own blueprints that maintain the parent’s in-built functionality, but also contain the contextual menu class reference as a base property of Actor.