Where is the Cast<> Macro/Function defined?

Which header do i need to use Cast<> in C++? I didn’t manage to find Cast<> on the OnlineDocumentation and neither on google(i found a lot of examples, but always without headers)

It’s defined in Engine/Source/Runtime/CoreUObject/Public/Templates/Casts.h

You should be able to just include “Templates/Casts.h”, although I would think it gets pulled in when you are including other UObject headers.

Thanks, i’ll look into it when i am back home after work. And confirm the Answer then :slight_smile:

Mark the answer as accepted answer; let’s follow the rules, ain’t all that hard.

I can only accept an answer if it worked(and i can’t do things while at work). But yes, it did the trick. The author of the answer is right, that pulling UObjects in does it. In my case i simply added Object.h