Is there a way for a global variable without casting in Bluprints?

Hi,
the reason, why I’m asking for this, is, that both, the casting and the access of the variable from the the cast output, are super slow. A 1000 iteration loop that just gets acces to a Game State variable via “get game state → cast to Game State Blueprint” needs over 9 seconds on my machine. With only one casting before the loop it needs 0.12s…

I know, I can try to minimize the casting an that’s what I do so far. But I’m just wondering if there is a better way that I can have a variable on server which is directly super fast accessible. I’m using this for Blueprint function librarys for server functionality of AIs.

If you know, I’m happy to hear it!

You should take a look here: How create global variable? - Editor Scripting - Unreal Engine Forums