Hi.
I created singleton which will be recording actions on the scene. I use Get() method to get this singleton for use where I need it.
ARecordingManager* ARecordingManager::Get()
{
if (!Instance) {
UWorld* World = GetWorld(); // error: illegal call of non-static member function
if (world) {
Instance = SpawnActor<ARecordingManager>();
}
}
return Instance;
}
Problem is that i can’t get world from static class. Is there any static method which would return a pointer to world ?
Or what should I do when I need to have this class available whole game ?
I don’t know how ensure spawning order so I can’t just place this into scene. This need to be available all from start.