How to initialize static TMap?
Problem is mainly that the TMap has no initializer. I cannot mark it const nor do I know how to initialize it. It's just a lookup dictionary. In worst case I could convert it from a TMap to a TArray and cast the enum to int32 (blueprints do not support uint8) all the time but this is kinda bad. A last resort would be to store it inside a singleton I guess.
Also I hope that it won't be garbage collected because I cannot mark it as a UPROPERTY.
I got it to work by using a static function as the 'initializer'. Feels like a dirty workaround but until someone can give me something better it at least seems to work so far. I'm still not 100% sure though if it gets garbage collected but it's still not collected after 5 minutes so that is good:
Follow this question
Once you sign in you will be able to subscribe for any updates here