CCTV Program
The bundled program Blueprint is a thin child of native UOperatingSystemCCTVProgram. C++ owns validation, startup, and the capture tick loop via UOperatingSystemCCTVProgramData.
flowchart TB
subgraph row1[" "]
direction LR
Prog["BP_Prog_CCTV"] --> Data["BP_Prog_CCTVData"]
end
subgraph row2[" "]
direction LR
Widget["WBP_CCTV"] --- Sub["UOperatingSystemCCTVWorldSubsystem"]
end
Prog --> Widget
Data --> Sub
Plugin path:
OperatingSystemContent/Shared/Blueprints/Programs/CCTV/BP_Prog_CCTV
C++ defaults
Section titled “C++ defaults”These are set in UOperatingSystemCCTVProgram and inherited by BP_Prog_CCTV:
| Property | Default | Description |
|---|---|---|
| Identifier | cctv | Used by OS to resolve the program |
| Data Class | UOperatingSystemCCTVProgramData | Required — bRequiresData = true |
| Save Method | DoNotSave | No persistent CCTV preferences |
| Space Required | 100 MB | Shown in Store metadata |
| Start Window State | StartMaximized | Opens fullscreen monitoring UI |
| Can Run On Portable Device | true | Laptops / tablets supported |
| Initial Layout | SingleView | One large feed on launch |
| Capture Method | FrameBased | Recommended for performance |
| Capture Speed | Medium | Capture every 30 frames |
| Capture Time | 0.2 s | Used when method is TimeBased |
Layout modes
Section titled “Layout modes”EOperatingSystemCCTV_Layout controls how many feeds render at once:
| Layout | Cameras shown | Render target |
|---|---|---|
SingleView | 1 (selected) | Main view (2048×1024 default) |
LayoutFour | Up to 4 | Grid view (512×256 each) |
LayoutSix | Up to 6 | Grid view |
LayoutEight | Up to 8 | Grid view |
LayoutNine | Up to 9 | Grid view |
stateDiagram-v2 [*] --> SingleView: Program starts SingleView --> LayoutFour: Set Layout SingleView --> LayoutNine: Set Layout LayoutFour --> SingleView: Set Layout LayoutNine --> SingleView: Set Selected Camera
On layout change, the data object swaps each camera between main and grid render targets, then triggers an immediate capture.
Capture methods
Section titled “Capture methods”EOperatingSystemCCTV_CaptureMethod determines when scene captures run:
| Method | Behavior | Best for |
|---|---|---|
Manual | Only when Capture Now is called | Scripted snapshots, cutscenes |
TimeBased | Every Capture Time seconds | Fixed refresh rate regardless of frame rate |
FrameBased | Every N frames (Capture Speed) | Recommended — scales with game performance |
Capture speed (frame-based)
Section titled “Capture speed (frame-based)”| Enum | Frames between captures |
|---|---|
EveryFrame (Realtime) | 1 |
VeryFast | 5 |
Fast | 15 |
Medium | 30 |
Slow | 60 |
VerySlow | 120 |
Blueprint API
Section titled “Blueprint API”Call these on a reference to BP_Prog_CCTV (or UOperatingSystemCCTVProgram) after the program has started:
Switch layout
Section titled “Switch layout”Event On Layout Button Clicked (Custom UI) → Get Parent Program (as UOperatingSystemCCTVProgram) → Set Layout (Layout Four)OnLayoutChanged fires on the program when the layout updates successfully.
Change capture settings at runtime
Section titled “Change capture settings at runtime”Set Capture Method (Frame Based) → Set Capture Speed (Slow)Set Capture Speed only succeeds when the current method is FrameBased.
Select active camera (single view)
Section titled “Select active camera (single view)”On Camera List Item Clicked (AOperatingSystemCCTVActor reference) → Set Selected Camera (Clicked Camera) → Set Layout (Single View)Manual capture
Section titled “Manual capture”On Refresh Button Clicked → Capture NowList all cameras
Section titled “List all cameras”Event Construct (WBP_CCTV) → Get Parent Program (as UOperatingSystemCCTVProgram) → Get All CCTV Actors → Out CCTV Actors (array) → For Each Loop → Add entry to camera list UIData object lifecycle
Section titled “Data object lifecycle”sequenceDiagram
participant OS
participant Prog as UOperatingSystemCCTVProgram
participant Data as UOperatingSystemCCTVProgramData
participant Sub as World Subsystem
OS->>Prog: Install / launch
Prog->>Data: ShouldCreate
Data->>Sub: GetAllCCTVActors
alt No cameras in level
Data-->>Prog: false — program data not created
else Cameras found
Data->>Data: SetupId on each actor
Prog->>Data: OnCreate — apply capture defaults
Prog->>Data: OnProgramStarted — enable tick
loop Tick
Data->>Data: Internal_Capture per method
end
Prog->>Data: OnProgramClosed — disable tick
end
Extending in C++
Section titled “Extending in C++”Subclass UOperatingSystemCCTVProgram, override OnStart to apply custom defaults, and create a Blueprint child for editor-tweakable properties — same pattern as C++ program from scratch.
Required: Data Class must be UOperatingSystemCCTVProgramData or a child thereof (OnValidate enforces this).
Related
Section titled “Related”- CCTV widget — display feeds in UMG
- Camera actor — world placement
- API — UOperatingSystemCCTVProgram