Skip to content

Create a Custom Program

Programs are apps inside the simulated OS — Explorer, Terminal, Store, or your own tools. Each program is a class derived from UOperatingSystemBaseProgram with optional widget, settings, and data classes.

Detailed property tables: New Program.

flowchart TB
  subgraph row1[" "]
    direction LR
    BP["UOperatingSystemBaseProgram"] --> Widget["UOperatingSystemProgramWidget"]
    BP --> Icon["UOperatingSystemProgramIconWidget"]
    BP --> Settings["UOperatingSystemProgramSettings"]
  end
  subgraph row2[" "]
    direction LR
    OS["UOperatingSystem"] -->|"Install program"| BP
    Widget --> UI["UMG program window"]
  end
  1. Content Browser → Blueprint Class
  2. Search Operating System Base Program
  3. Name it BP_Prog_MyApp
  4. Re-open the asset to enter data-only view

Default program view

PropertyGuidance
NameDisplay name in Store and title bar
IdentifierUnique FName — never duplicate across programs
VersionFOperatingSystemVersion
Widget ClassMain UMG UI — subclass UOperatingSystemProgramWidget
Icon Widget ClassDesktop/taskbar icon — UOperatingSystemProgramIconWidget
  1. Create Widget Blueprint parented to Operating System Program Widget (duplicate WBP_Program from plugin as a starting point).
  2. Assign to Widget Class on the program.
  3. In the widget Graph, use Get Owning Program to reach program settings and data.
flowchart LR
  NC["Native Construct"] --> GOP["Get Owning Program"]
  GOP --> GPS["Get Program Settings<br/><i>cast to your settings class</i>"]
  GOP --> GPD["Get Program Data<br/><i>if Data Class set</i>"]
  GOP --> GOS["Get Operating System"]
  GOS --> FS["Filesystem / notifications / install"]

Bundled reference: open WBP_Mail or WBP_Calculator under OperatingSystemContent/Shared/Blueprints/Widgets/Programs/ after duplicating into your project.

Add your program class to one of:

  • Must Have Programs on your OS Blueprint (pre-installed)
  • Post Install Startup Programs (optional install set)
  • Store collection Data Asset for in-game installation

Collections live under OperatingSystemContent/.../Programs/ — duplicate into your project.

Override On Validate to block broken configs:

Blueprint validate

Return Create Generic Error when validation fails — same pattern as C++ OnValidate in New Program.

stateDiagram-v2
  [*] --> Installed: OS boot / Store install
  Installed --> Validated: On Validate
  Validated --> Running: Player double-clicks icon
  Running --> Running: On Program Started
  Running --> Idle: Player closes window
  Idle --> Running: Launch again
  Idle --> [*]: OS shutdown (SaveOnExit)

Boot the device. Your program should appear in the Start menu / desktop after install. Launch it and confirm window drag, taskbar button, and focus states (EOperatingSystemProgramViewState).

PropertyEffect
Allow Dragging / Allow ResizingDraggable window chrome via Draggable Window integration
Override Window ClassPer-program window frame
Single Instance OnlyOne process at a time
Start Window StateNormal, maximized, minimized
GoalTutorial
Native C++ programC++ program from scratch
Custom file extensionCustom file type
Persist settingsSave and load