You are viewing documentation for v1.1. Switch to current version โ†’

๐ŸŒ Module Core Globals

Short Description

The Globals library provides a centralized set of static functions for accessing QoL references, managing player IDs, and configuring AutoReplication settings.

Long Description

The UGorgeousCoreRuntimeGlobals class acts as the primary "Glue" between different Gorgeous systems in Blueprints. It provides shorthand nodes for resolving singleton QoL instances (like GameMode or GameState), managing stable player identifiers for networking, and fine-tuning the AutoReplication backend (Iris, Replication Graph) at runtime. Use these globals when you need to access Gorgeous systems from within generic Blueprints that don't inherit from QoL base classes.

๐Ÿš€ Features

  • QoL Resolution: Type-safe retrieval of singleton Gorgeous objects using DeterminesOutputType.
  • Stable Player IDs: Map local player controllers to persistent string identifiers for stable networking.
  • AutoReplication Config: Toggle Iris and Replication Graph support or override stream settings per-entry.
  • Game Feature Helpers: Enable or disable Game Feature Plugins dynamically at runtime.
  • Variable Shortcuts: Quickly get or set variables by their display name without manually traversing the registry.

๐Ÿ“š Usage Examples

AGorgeousWorldSettings* Settings = UGorgeousCoreRuntimeGlobals::GetGorgeousWorldSettings(this);

Use Get QoL Reference and select GorgeousGameState as the class. The node's output will automatically cast to the correct type.

GetQualityOfLifeReference

Retrieves a registered Gorgeous singleton instance.

Parameter Name Type Description
QualityOfLifeClass TSubclassOf<UObject> The QoL class to retrieve (must implement the QoL interface).
Parameter Name Type Description
ReturnValue UObject* The resolved instance, cast to the input class.

RegisterLocalPlayerStableId

Assigns a stable string ID to a player controller. This ID persists across reconnections and is used for stable networking in the Signal Bridge.

Parameter Name Type Description
PlayerController APlayerController* The controller to register.
StableId FString The identifier to assign.

SetAutoReplicationBackendsEnabled

Enables or disables modern networking backends at runtime.

Parameter Name Type Description
bEnableIris bool Whether to enable Unreal Iris support.
bEnableReplicationGraph bool Whether to enable the AutoReplication graph.

SetGameFeaturePluginActive

Dynamically loads or unloads a Game Feature Plugin.

Parameter Name Type Description
PluginName FName The internal name of the plugin.
bNewActive bool Target state.

Best Practices

  • Avoid Hardcoding IDs: When using GetNamedObjectVariable, ensure the name is defined in a centralized data asset or constant to avoid typo-related bugs.
  • Transition Check: When enabling Game Feature Plugins at runtime, be aware that not all features (like UI layers) may initialize immediately.
  • Stable IDs for UI: Use GetLocalPlayerStableId to identify which player's inventory or stats to show in split-screen UI.

Troubleshooting

  • QoL Reference Null: Ensure the target class correctly implements IGorgeousQualityOfLifeNodeTarget_I and has called its registration logic in BeginPlay.
  • Iris Not Working: Iris support requires specific engine-level configuration. If SetAutoReplicationBackendsEnabled has no effect, verify your DefaultEngine.ini settings.
  • Plugin Not Found: SetGameFeaturePluginActive will fail silently if the plugin name does not match the descriptor file exactly.