How to add varaiable into actor.h

It is feasible but there is generally no reason to do so.

You can create a new c++ class that inherits from Actor that has your new variable in it and you can do that without recompiling the engine (or risking messing up the code).