Skip to main content

API Reference

Complete API documentation for Elys License Manager Blueprint and C++ interfaces.

Overview

Elys License Manager provides a comprehensive API accessible from both Blueprints and C++. The main entry point is the Editor Subsystem, which provides high-level operations for both license management and dependency analysis.

Main Components

Editor Subsystem

Class: UERP_AssetInsightsEditorSubsystem

The primary API for all operations. Access via:

UERP_AssetInsightsEditorSubsystem* Subsystem =
GEditor->GetEditorSubsystem<UERP_AssetInsightsEditorSubsystem>();

License Manager

Class: UERP_AssetLicenseManager

Manages license sources and asset-to-source mappings:

UERP_AssetLicenseManager* LM = Subsystem->GetLicenseManager();

Dependency Scanner

Class: UERP_AssetDependencyScanner

Scans folders for asset dependencies and broken references.


Quick Reference

Dependency Operations

TaskAPI Call
Scan folder (bidirectional)Subsystem->ScanFolder(Path)
Scan outbound onlySubsystem->ScanFolderOutbound(Path)
Scan inbound onlySubsystem->ScanFolderInbound(Path)
Check if safe to deleteSubsystem->IsFolderSafeToDelete(Path)
Safe delete folderSubsystem->SafeDeleteFolder(Path)
Delete empty foldersSubsystem->DeleteEmptyFolders(Path)
Fix broken referencesSubsystem->FixBrokenReferences(ScanResult)

License Operations

TaskAPI Call
Get license managerSubsystem->GetLicenseManager()
Assign assets to sourceSubsystem->AssignLicenseSourceForAssets(Paths)
Assign folder to sourceSubsystem->AssignLicenseSourceForFolder(Path)
Unlink all in folderSubsystem->UnlinkAllLicensesInFolder(Path)
Purge dead mappingsSubsystem->PurgeDeadMappings(Source)
Purge all dead mappingsSubsystem->PurgeAllDeadMappings()
Merge sourcesSubsystem->MergeSourceInto(A, B, bDelete)

License Manager Direct API

TaskAPI Call
Get/create registryLM->GetOrCreateRegistry()
Get all sourcesLM->GetAllSources()
Create new sourceLM->CreateNewSource(PackName)
Delete sourceLM->DeleteSource(Source)
Assign assetsLM->AssignAssetsToSource(Paths, Source)
Unassign assetLM->UnassignAsset(Path)
Get source for assetLM->GetSourceForAsset(Path)
Get assets for sourceLM->GetAssetsForSource(Source)

UI Operations

TaskAPI Call
Open Dependency AnalyzerSubsystem->OpenInsightsPanel(Path)
Open License ManagerSubsystem->OpenLicenseManagerPanel()
Open License Manager at folderSubsystem->OpenLicenseManagerPanelAtFolder(Path)
Show license infoSubsystem->ShowLicenseInfoForAsset(Path)

Data Structures

StructPurpose
FERP_AssetDependencyScanResultDependency scan results
FERP_DependencyListList of dependency paths

Code Examples

License Management

UERP_AssetInsightsEditorSubsystem* Subsystem =
GEditor->GetEditorSubsystem<UERP_AssetInsightsEditorSubsystem>();

UERP_AssetLicenseManager* LM = Subsystem->GetLicenseManager();

// Create a new source
UERP_AssetSourceData* Source = LM->CreateNewSource("Medieval Props Pack");

// Assign assets
TArray<FString> Paths = { "/Game/Props/SM_Table", "/Game/Props/SM_Chair" };
LM->AssignAssetsToSource(Paths, Source);

// Check which source an asset belongs to
UERP_AssetSourceData* FoundSource = LM->GetSourceForAsset("/Game/Props/SM_Table");

// Purge dead links
int32 Removed = LM->PurgeDeadMappings(Source);

// Merge two sources
LM->MergeSourceInto(OldSource, NewSource, /*bDeleteAfter=*/ true);

Dependency Analysis

UERP_AssetInsightsEditorSubsystem* Subsystem =
GEditor->GetEditorSubsystem<UERP_AssetInsightsEditorSubsystem>();

// Scan folder
FERP_AssetDependencyScanResult Result = Subsystem->ScanFolder("/Game/MyFolder");

// Check results
UE_LOG(LogElysLicenseManager, Log, TEXT("Scanned %d assets"), Result.TotalAssetsScanned);
UE_LOG(LogElysLicenseManager, Log, TEXT("Outbound leaks: %d"), Result.TotalOutboundLeaks);
UE_LOG(LogElysLicenseManager, Log, TEXT("Inbound leaks: %d"), Result.TotalInboundLeaks);
UE_LOG(LogElysLicenseManager, Log, TEXT("Safe to delete: %s"), Result.bSafeToDelete ? TEXT("Yes") : TEXT("No"));

// Fix broken references
if (Result.BrokenReferenceCount > 0)
{
int32 Fixed = Subsystem->FixBrokenReferences(Result);
}

Logging

All API operations log to the LogElysLicenseManager category.

Enable verbose logging:

UE_LOG(LogElysLicenseManager, Verbose, TEXT("Detailed message"));

Thread Safety

Editor Thread Only

All Elys License Manager APIs must be called from the Editor/Game thread. They are not thread-safe and should not be called from background threads.