Skip to content

Events For Plugins

REghZy edited this page Mar 11, 2026 · 1 revision

This page explains the global events available to plugins

Engine creation/destruction

The MemoryEngineManager class (accessible via MemoryEngineManager.Instance) allows you to hook into an engine window being created and destroyed.

Example code:

protected override async Task OnApplicationFullyLoaded() {
    MemoryEngineManager.Instance.EngineOpened += this.OnEngineWindowCreated;
}

private void OnEngineWindowCreated(object? sender, MemoryEngineViewState e) {
    e.Engine.ScanningProcessor.SetScanRange(0x82000000, 0x1000);
}

Connected notification actions

The MemoryEngineManager class provides the ProvidePostConnectionActions event, which allows you to add extra actions to the "Connected to console" notification.

Example code (from PS3 plugin):

protected override async Task OnApplicationFullyLoaded() {
    MemoryEngineManager.Instance.ProvidePostConnectionActions += OnProvidePostConnectionActions;
}

private static void OnProvidePostConnectionActions(object? sender, ProvidePostConnectionActionsEventArgs e) {
    if (e.Connection is IPs3ConsoleConnection) {
        e.Notification.Actions.Add(new CommandNotificationAction("Attach to Game Process", "commands.ps3.SetProcessToActiveGameCommand") {
            ToolTip = "Attach CCAPI to the current running game process. This is required to read/write game memory"
        });
    }
}

Clone this wiki locally