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 @@
|
||||
Abstraction layer for all controller haptic feedback and force feedback effects. Gameplay systems trigger haptics by GameplayTag (e.g., `Haptic.Damage.Heavy`) rather than calling raw UE5 haptic APIs. This component handles platform detection (Xbox rumble vs PS5 DualSense adaptive triggers vs generic PC gamepad), respects accessibility settings (`BPC_AccessibilitySettings.bHapticsEnabled`), and manages effect priority/conflict resolution.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** [`DA_HapticProfile`](docs/blueprints/14-data-assets/121_DA_HapticProfile.md) (effect definitions), [`BPC_AccessibilitySettings`](docs/blueprints/12-settings/104_BPC_AccessibilitySettings.md) (master toggle), [`BPC_StateManager`](docs/blueprints/16-state/130_BPC_StateManager.md) (heart rate for heartbeat haptic)
|
||||
- **Requires:** [`DA_HapticProfile`](docs/blueprints/14-data-assets/121_DA_HapticProfile.md) (effect definitions), [`BPC_AccessibilitySettings`](docs/blueprints/12-settings/104_BPC_AccessibilitySettings.md) (master toggle), [`BPC_StateManager`](docs/blueprints/16-state/130_BPC_StateManager.md) (heart rate for heartbeat haptic), [`BPC_PlatformServiceAbstraction`](docs/blueprints/01-core/150_BPC_PlatformServiceAbstraction.md) (platform detection — replaces own platform enum)
|
||||
- **Required By:** `BPC_HealthSystem` (damage haptics), `BPC_FirearmSystem` (weapon fire kick), `BPC_MeleeSystem` (melee impact), `BPC_PhysicsDragSystem` (grab/release), `BPC_ScareEventSystem` (tension rumble), `BP_ItemPickup` (pickup pulse), `BPC_MovementStateSystem` (footstep rumble via GASP notifies)
|
||||
- **Engine/Plugin Requirements:** Enhanced Input Plugin (controller detection), PlayStation 5 Controller Plugin (DualSense adaptive triggers — optional, graceful fallback)
|
||||
|
||||
@@ -56,7 +56,7 @@ Abstraction layer for all controller haptic feedback and force feedback effects.
|
||||
| `Right = 1` | Right (high-frequency) motor only |
|
||||
| `Both = 2` | Both motors simultaneously |
|
||||
|
||||
### `EControllerPlatform`
|
||||
### `EControllerPlatform` *(deprecated — use EPlatformFamily from BPC_PlatformServiceAbstraction. This enum is mapped internally from the unified platform enum.)*
|
||||
| Value | Description |
|
||||
|-------|-------------|
|
||||
| `Unknown = 0` | Platform not yet detected |
|
||||
|
||||
@@ -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