← All namespaces

source_control

Editor & system Core

Read and act on source-control state: file status, log, revert, and mark for add.

What it’s for

This area lets your assistant see and act on the version-control state of your content, using whatever provider the editor is already connected to (Perforce, Git, Subversion, and so on). It reads which assets are checked out, added, or modified, pulls an asset’s revision history, and performs the two everyday write operations an editing session needs: discarding local changes and marking new files for add.

The most common use is a safety check around edits. Before your assistant changes a Blueprint or a material, it can confirm the file’s current status; after a change it can revert the ones you don’t want to keep, or mark freshly created assets so they’re tracked. The revision log answers questions like “when did this asset last change” without leaving the editor.

It works through the editor’s own source-control integration, so it reflects exactly what the editor sees. If no provider is connected, start by checking the provider so your assistant knows whether the rest of the operations will do anything.

Examples

Check what changed, then revert the noise

Your assistant reads status for a batch of assets and discards the ones you didn’t mean to touch.

You: I only meant to edit BP_Player. Revert anything else that got dirtied.

  call("source_control.status", {assetPaths:["/Game/BP_Player", "/Game/BP_Enemy", "/Game/M_Floor"]})
    → {results:[{path:"/Game/BP_Player", state:"CheckedOut"}, {path:"/Game/BP_Enemy", state:"CheckedOut"}, {path:"/Game/M_Floor", state:"CheckedOut"}]}
  call("source_control.revert", {assetPaths:["/Game/BP_Enemy", "/Game/M_Floor"]})
    → {ok:true, reverted:2}

Done. Reverted BP_Enemy and M_Floor; left BP_Player checked out.

Track a newly created asset

After creating an asset, mark it for add so source control starts tracking it.

You: Add the new material I just made to source control.

  call("source_control.get_provider", {})
    → {provider:"Perforce", available:true, enabled:true}
  call("source_control.mark_for_add", {assetPaths:["/Game/Materials/M_Water"]})
    → {ok:true, added:1}

Done. M_Water marked for add under Perforce.

Look up an asset’s recent history

Pull the revision log for a single asset, capped to the latest few entries.

You: When was BP_Door last changed, and by whom?

  call("source_control.log", {assetPath:"/Game/BP_Door", maxRevisions:3})
    → {revisions:[{revision:"14", author:"amy", date:"2026-06-30"}, {revision:"11", author:"sam", date:"2026-06-18"}, {revision:"9", author:"amy", date:"2026-06-02"}]}

Done. Latest is revision 14 by amy on 2026-06-30.

← Back to all namespaces