feat: Implement BPC_PlatformServiceAbstraction for unified platform detection and SDK routing
- Added BPC_PlatformServiceAbstraction to centralize platform detection and SDK routing for achievements, cloud saves, and overlays. - Updated dependencies across various systems to utilize the new platform service for consistent platform handling. - Deprecated old platform enums in favor of a unified EPlatformFamily enum. - Enhanced documentation for affected systems to reflect changes in platform handling and dependencies.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
Central authority for render pipeline configuration. Reads `DA_RenderPipelineProfile` Data Assets to determine the appropriate rendering method (Lumen vs Baked Lightmass), shadow system (VSM vs CSM), upscaler (DLSS/FSR/TSR/PSSR), and mesh strategy (Nanite vs LOD) for the current platform and quality preset. Applies settings via UE5 console variables, coordinates with `BPC_PerformanceScaler` for runtime quality tier adjustments, and broadcasts pipeline changes so dependent systems (Planar Capture, Audio, UI) can adapt.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** [`DA_RenderPipelineProfile`](../14-data-assets/DA_RenderPipelineProfile.md) (render configs), [`SS_SettingsSystem`](105_SS_SettingsSystem.md) (saved quality preferences), [`GI_GameFramework`](../01-core/04_GI_GameFramework.md) (game phase for pre-load apply)
|
||||
- **Requires:** [`DA_RenderPipelineProfile`](../14-data-assets/DA_RenderPipelineProfile.md) (render configs), [`BPC_PlatformServiceAbstraction`](../01-core/150_BPC_PlatformServiceAbstraction.md) (central platform detection), [`SS_SettingsSystem`](105_SS_SettingsSystem.md) (saved quality preferences), [`GI_GameFramework`](../01-core/04_GI_GameFramework.md) (game phase for pre-load apply)
|
||||
- **Required By:** [`BPC_PerformanceScaler`](../10-adaptive/91_BPC_PerformanceScaler.md) (delegates CVar application), [`SS_PlanarCaptureManager`](../17-capture/138_SS_PlanarCaptureManager.md) (capture quality cap on pipeline change), [`WBP_SettingsMenu`](../06-ui/57_WBP_SettingsMenu.md) (Video tab quality controls)
|
||||
- **Engine/Plugin Requirements:** DLSS Plugin (optional), FSR Plugin (optional), XeSS Plugin (optional), GameplayTags, Enhanced Input
|
||||
|
||||
@@ -25,7 +25,8 @@ Central authority for render pipeline configuration. Reads `DA_RenderPipelinePro
|
||||
|
||||
## 1. Enums
|
||||
|
||||
*See [`DA_RenderPipelineProfile`](../14-data-assets/DA_RenderPipelineProfile.md) for: `ERenderPipelineMethod`, `EShadowMethod`, `EReflectionMethod`, `EUpscalerMethod`, `EMeshStrategy`, `EPlatformFamily`.*
|
||||
*See [`DA_RenderPipelineProfile`](../14-data-assets/DA_RenderPipelineProfile.md) for: `ERenderPipelineMethod`, `EShadowMethod`, `EReflectionMethod`, `EUpscalerMethod`, `EMeshStrategy`.*
|
||||
*See [`BPC_PlatformServiceAbstraction`](../01-core/150_BPC_PlatformServiceAbstraction.md) for: `EPlatformFamily` (unified — all systems use this).*
|
||||
|
||||
### `ERenderPipelineChangeType`
|
||||
| Value | Description |
|
||||
@@ -41,7 +42,7 @@ Central authority for render pipeline configuration. Reads `DA_RenderPipelinePro
|
||||
### `SActivePipelineState`
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `Platform` | `EPlatformFamily` | Detected platform |
|
||||
| `Platform` | `EPlatformFamily` | Detected platform (from BPC_PlatformServiceAbstraction) |
|
||||
| `ActivePreset` | `FName` | Currently applied quality preset name |
|
||||
| `PendingPreset` | `FName` | Queued preset awaiting reload |
|
||||
| `ActivePipelineProfile` | `DA_RenderPipelineProfile` | Currently loaded profile Data Asset |
|
||||
@@ -81,7 +82,8 @@ Central authority for render pipeline configuration. Reads `DA_RenderPipelinePro
|
||||
- **Description:** Detects platform, loads the appropriate `DA_RenderPipelineProfile`, reads saved quality from `SS_SettingsSystem`, and applies initial pipeline settings.
|
||||
- **Flow:**
|
||||
1. Get Owner → Cast to PlayerController → cache
|
||||
2. If `bAutoDetectPlatform`: call `DetectPlatform()` → set `DetectedPlatform`
|
||||
2. Bind to `GI_GameFramework.GetSubsystem(BPC_PlatformServiceAbstraction).OnPlatformReady`
|
||||
3. In handler: read `PlatformService.GetPlatformFamily()` → set `DetectedPlatform`
|
||||
3. Lookup `DA_RenderPipelineProfile` from `PlatformProfileMap` by `DetectedPlatform`
|
||||
4. If not found: log error, fallback to `PC_High` profile
|
||||
5. Read `SS_SettingsSystem.GetSettingFloat("QualityPreset")` → resolve preset name
|
||||
@@ -173,7 +175,7 @@ Central authority for render pipeline configuration. Reads `DA_RenderPipelinePro
|
||||
3. Call `ApplyRenderConfig(PendingPreset, Config)`
|
||||
4. Broadcast `OnRenderPipelineChanged(PendingPreset, RequiresLevelReload)`
|
||||
|
||||
#### `DetectPlatform` → `EPlatformFamily`
|
||||
#### `DetectPlatform` → `EPlatformFamily` *(deprecated — use BPC_PlatformServiceAbstraction.GetPlatformFamily() instead)*
|
||||
- **Description:** Auto-detect the current platform and GPU capability.
|
||||
- **Flow:**
|
||||
1. Check `UGameplayStatics::GetPlatformName()`:
|
||||
|
||||
Reference in New Issue
Block a user