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
| Task | API Call |
|---|---|
| Scan folder (bidirectional) | Subsystem->ScanFolder(Path) |
| Scan outbound only | Subsystem->ScanFolderOutbound(Path) |
| Scan inbound only | Subsystem->ScanFolderInbound(Path) |
| Check if safe to delete | Subsystem->IsFolderSafeToDelete(Path) |
| Safe delete folder | Subsystem->SafeDeleteFolder(Path) |
| Delete empty folders | Subsystem->DeleteEmptyFolders(Path) |
| Fix broken references | Subsystem->FixBrokenReferences(ScanResult) |
License Operations
| Task | API Call |
|---|---|
| Get license manager | Subsystem->GetLicenseManager() |
| Assign assets to source | Subsystem->AssignLicenseSourceForAssets(Paths) |
| Assign folder to source | Subsystem->AssignLicenseSourceForFolder(Path) |
| Unlink all in folder | Subsystem->UnlinkAllLicensesInFolder(Path) |
| Purge dead mappings | Subsystem->PurgeDeadMappings(Source) |
| Purge all dead mappings | Subsystem->PurgeAllDeadMappings() |
| Merge sources | Subsystem->MergeSourceInto(A, B, bDelete) |
License Manager Direct API
| Task | API Call |
|---|---|
| Get/create registry | LM->GetOrCreateRegistry() |
| Get all sources | LM->GetAllSources() |
| Create new source | LM->CreateNewSource(PackName) |
| Delete source | LM->DeleteSource(Source) |
| Assign assets | LM->AssignAssetsToSource(Paths, Source) |
| Unassign asset | LM->UnassignAsset(Path) |
| Get source for asset | LM->GetSourceForAsset(Path) |
| Get assets for source | LM->GetAssetsForSource(Source) |
UI Operations
| Task | API Call |
|---|---|
| Open Dependency Analyzer | Subsystem->OpenInsightsPanel(Path) |
| Open License Manager | Subsystem->OpenLicenseManagerPanel() |
| Open License Manager at folder | Subsystem->OpenLicenseManagerPanelAtFolder(Path) |
| Show license info | Subsystem->ShowLicenseInfoForAsset(Path) |
Data Structures
| Struct | Purpose |
|---|---|
FERP_AssetDependencyScanResult | Dependency scan results |
FERP_DependencyList | List 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
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.