๐ฎ Gorgeous Game Instance
Short Description
GameInstance subclass that hosts Object Variable data and default trunks for global state.
Long Description
UGorgeousGameInstance extends UGameInstance with an AdditionalGorgeousData map and a serialized trunk of default Object Variables. It also ensures root registry fallback behavior is consistent during startup and world changes.
๐ Features
- Global Object Variable storage via
AdditionalGorgeousData. - Serialized default payloads via
DefaultObjectVariableTrunk. - Root registry fallback handling.
๐ Usage Examples
UGorgeousGameInstance* GI = GetGameInstance<UGorgeousGameInstance>();
TMap<FName, FGorgeousObjectVariableEntry>& Data = GI->AdditionalGorgeousData;
Use the AdditionalGorgeousData map to store global Object Variables that persist across levels.
Init
Initializes the game instance and prepares QoL data structures.
void UGorgeousGameInstance::Init()
{
Super::Init();
}
Best Practices
- Store global settings or registries in the game instance map.
- Keep default trunks in sync with editor-authored Object Variables.
Troubleshooting
- If root fallback data is missing, ensure the game instance class is active in project settings.