Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Listeners

Ahmed Castro edited this page Jul 13, 2020 · 3 revisions

SetModDownloadListener

Registers a function to be called every time a mod finished downloading.

Parameters

Name Type Description
ModId int32 Mod's unique identifier.
Delegate FModioListenerDelegate FModioListenerDelegate containing the Id of the Mod that was just downloaded. This is called when the process finished.

C++ example

Modio->SetModDownloadListener(FModioListenerDelegate::CreateUObject(ModioManager, &UMyModioManager::OnModDownload));

// ...

void UMyModioManager::OnModDownload(int32 ResponseCode, int32 ModId)
{
  // ResponseCode should be 200 when a mod was just downloaded
  Modio->InstallDownloadedMods();
}

See also: SDK function

SetModUploadListener

Registers a function to be called every time a modfile upload finishes.

Parameters

Name Type Description
ModId int32 Mod's unique identifier.
Delegate FModioListenerDelegate FModioListenerDelegate containing the Id of the Mod that was just uploaded. This is called when the process finished.

C++ example

Modio->SetModUploadListener(FModioOnModDownloadDelegate::CreateUObject(ModioManager, &UMyModioManager::OnModUpload));

// ...

void UMyModioManager::OnModUpload(int32 ResponseCode, int32 ModId)
{
  // ResponseCode should be 200 when a mod was just uploaded
}

See also: SDK function