LCK operations return error codes to indicate success or failure.
Always check return values and handle errors appropriately.
ELCKError Enum
| Name | Value | Description |
|---|---|---|
None | 0 | Operation completed successfully |
InvalidTrackingId | 1 | Tracking ID is missing or not in UUID v4 format |
RecordingAlreadyStarted | 2 | Cannot start recording - already in progress |
NotCurrentlyRecording | 3 | Cannot stop recording - not currently recording |
EncoderNotAvailable | 4 | Platform encoder not found or failed to initialize |
InsufficientStorage | 5 | Not enough disk space for recording |
PermissionDenied | 6 | Microphone or storage permission was denied |
EncodingError | 7 | Error occurred during video/audio encoding |
TextureError | 8 | Failed to capture or process render texture |
AudioError | 9 | Audio capture or mixing error |
SaveError | 10 | Failed to save recording to disk |
InvalidState | 11 | Operation not valid in current state |
Error Handling Patterns
Basic Error Check
Async Error Handling
Validation Before Recording
Common Error Scenarios
InvalidTrackingId
InvalidTrackingId
Cause: The Tracking ID in Project Settings is empty or not in valid UUID v4 format.Solution:
- Get your Tracking ID from the LCK Dashboard
- Go to Project Settings > Plugins > LCK SDK
- Enter the Tracking ID in the format:
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
RecordingAlreadyStarted
RecordingAlreadyStarted
Cause: Attempted to start recording while already recording.Solution: Check recording state before starting:
EncoderNotAvailable
EncoderNotAvailable
Cause: Platform-specific encoder failed to initialize.Common Reasons:
- Windows: Media Foundation not available
- Android: Hardware encoder not supported
- Vulkan interop failed
- Verify platform requirements are met
- Check LogLCKEncoding for detailed errors
- Ensure GPU supports H.264 encoding
InsufficientStorage
InsufficientStorage
Cause: Not enough free disk space for recording.Solution:
- Check available storage before recording
- Clear old recordings
- Reduce quality profile to decrease file size
PermissionDenied
PermissionDenied
Cause: User denied microphone or storage permission on Android.Solution:
- Request permissions before using LCK features
- Handle permission denial gracefully
- Show explanation to user why permissions are needed
RECORD_AUDIO- for microphone captureWRITE_EXTERNAL_STORAGE- for saving recordings (API < 29)
Error Logging
LCK uses Unreal’s logging system with these categories:| Category | Description |
|---|---|
LogLCK | General SDK operations |
LogLCKEncoding | Video/audio encoding |
LogLCKAudio | Audio capture and mixing |
LogLCKUI | UI component operations |
LogLCKTablet | Tablet-specific operations |