I would prefer doing this by BP but if I can only do it via C++ that is fine. I simply can’t find a way to change any of the world settings in BP because I can’t get a reference to the world settings.
How do you get a reference to the WorldSettings class in a BP or C++ (or both )?
In C++ you can use UWorld::GetWorldSettings or AActor::GetWorldSettings. Neither is directly exposed to Blueprint though as far as I can tell. However in Blueprint you should still be able to get the WorldSettings actor by using a “Get All Actors Of Class” node. Note that these types of nodes may have a performance impact if you run them too frequently (for example in tick). You should therefore probably do that once and store the result for use later on.