๐ Gorgeous World Settings
Short Description
WorldSettings subclass that stores world-scoped Object Variables and optional AutoReplication data.
Long Description
AGorgeousWorldSettings provides a world-scoped AdditionalGorgeousData map and an AutoReplication mixin for world-level settings. Use it for data tied to a specific world or map.
๐ Features
- World-level Object Variable storage.
- Optional AutoReplication for world settings.
- Default trunk for serialized payloads.
๐ Usage Examples
AGorgeousWorldSettings* WS = Cast<AGorgeousWorldSettings>(GetWorld()->GetWorldSettings());
WS->RegisterAutoReplicationEntry(TEXT("WorldConfig"), UString_SOV::StaticClass(), true, false, {});
Use the AdditionalGorgeousData map to store world-specific values.
RegisterAutoReplicationEntry
Registers or updates an AutoReplication entry for world settings data.
| Parameter Name | Type | Description |
|---|---|---|
Key |
FName |
Entry key used for lookup. |
DefaultClass |
TSubclassOf<UGorgeousObjectVariable> |
Class for the default variable. |
bReplicate |
bool |
Whether to replicate the entry. |
bOverrideStreamConfig |
bool |
Whether to override stream config. |
StreamConfigOverride |
FGorgeousAutoReplicationStreamConfig |
Optional stream config override. |
WS->RegisterAutoReplicationEntry(TEXT("WorldConfig"), UString_SOV::StaticClass(), true, false, {});
Best Practices
- Keep world settings data lightweight to avoid replication bloat.
Troubleshooting
- If data is missing, confirm your project uses
AGorgeousWorldSettingsin world settings.