Right, so coming from Unity, you could literally make a public reference and drag it in, or a private reference and use getcomponent.
However, Unreal seems to be super confusing and there is no obvious way to do it that i have found.
I am trying to access my class “ALevelGenerator” in my Gamemode. Through this code:
.h
public:
class ALevelGenerator* LevelCreator;
.cpp
in constructor
LevelCreator = Cast(GetComponentByClass(ALevelGenerator::StaticClass()));
P.S i have the file #included too. This does not compile. Any ideas?