We have a game that uses custom Lightmass settings (configured in World Settings). Is there a way to force our custom values to be the default values in the World Settings for each map? Or a way to set them all at once? We have hundreds of levels and it would be convenient to change our settings in one place and have them propagate to all of our levels. Thanks!
Still looking for help here. What about a way to bulk change world settings across multiple maps? Any guidance would be much appreciated. Thank you!
I have no idea why, but the class WorldSettings is not blueprintable.
Which means you need to extend it with a C++ class with annotation UCLASS(Blueprintable), and then you will be able to create a blueprint with WorldSettings.
After that, set World Settings Class in Project Settings to your new class.
The changes, however, are only visible after editor restart (this is probably why the class is not blueprintable).
Thanks, that seems like a reasonable solution.
We ended up needing a system to go through and process geometry on every level of the game (merging actors for perf), so one of our engineers added the ability for us to specify WorldSettings as part of that process. I believe he used the commandlet system to implement that so it can be automated as part of the build server process.
Nice to have a couple of different options for the next project though.
I believe your best solution would be to create a new WorldSettings class that derives from AWorldSettings - something like:
UCLASS(config = game, notplaceable)
class AMySpiffyGameWorldSettings : public AWorldSettings
{
GENERATED_BODY()
public:
AMySpiffyGameWorldSettings();
};
…etc. In the constructor, you can override whatever default values you’d like, add new members, override functions - anything you need.
Specify the worldsettings class to use in your DefaultEngine.ini:
[/Script/Engine.Engine]
WorldSettingsClassName=/Script/MySpiffyGame.MySpiffyGameWorldSettings
You can also specify the world settings class to use in-editor at Project Settings->Engine->General Settings->Default Classes