I have a .h file that contains commonvariables used by multiple classes.
I am able to access them through c++ but the aren’t visible in blueprints.
Is there a way to expose them to blueprint
I have a .h file that contains commonvariables used by multiple classes.
I am able to access them through c++ but the aren’t visible in blueprints.
Is there a way to expose them to blueprint
No, UE4 reflection system don’t support static variables, you need to create object containing them, then you need to get a object containing them to access them.
Great place for valuables available everywhere is to put them in GameMode class or even GameInstance.
Alternatively whatever you doing, UE4 does support static functions, so you can make a functions accessing those variables. Just remember that UObject* (this includes pointers to actors) require UPROPERTY() or else you will may have invalid pointers on them when they get deleted, you practicaly need to manage them manually