UMagicLeapCameraComponent

The MagicLeapCameraComponent provides access to and maintains state for camera capture functionality.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

MagicLeapCamera

Header

/Engine/Plugins/Lumin/MagicLeapCamera/Source/MagicLeapCamera/Public/MagicLeapCameraComponent.h

Include

#include "MagicLeapCameraComponent.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(ClassGroup=MagicLeap, BlueprintType, Blueprintable, EditInlineNew,
       Meta=(BlueprintSpawnableComponent))
class UMagicLeapCameraComponent : public UActorComponent

Remarks

The MagicLeapCameraComponent provides access to and maintains state for camera capture functionality. The connection to the device's camera is managed internally. Users of this component are able to asynchronously capture camera images and footage to file. Alternatively, a camera image can be captured directly to texture. The user need only make the relevant asynchronous call and then register the appropriate event handlers for the operation's completion.

Functions

Name Description

Public function Virtual UFunction BlueprintCallable, Category

bool

 

CaptureImageToFileAsync()

The newly created jpeg file will have an automatically generated name which is guaranteed to be unique. Upon completion, a successful operation will provide the file path of the newly created jpeg to the FMagicLeapCameraCaptureImgToFile event handler.

Public function Virtual UFunction BlueprintCallable, Category

bool

 

CaptureImageToTextureAsync()

The user should register event handlers for both the success and fail events. Upon completion, a successful operation will provide a dynamically generated texture containing the captured image to the FMagicLeapCameraCaptureImgToTextureSuccess event handler.

Public function Const UFunction BlueprintPure, Category

bool

 

IsCapturing()

Gets the capture state of the component.

Public function Virtual UFunction BlueprintCallable, Category

bool

 

StartRecordingAsync()

Initiates the capturing of video/audio data on a separate thread.

Public function Virtual UFunction BlueprintCallable, Category

bool

 

StopRecordingAsync()

Stops the recording and saves the video/audio data to an mp4 file.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

BeginPlay()

Notifies the MagicLeapCameraPlugin of a new user.

Public function Virtual

void

 

EndPlay

(
    const EEndPlayReason::Type EndPlayR...
)

Notifies the MagicLeapCameraPlugin that a user is being destroyed (needed for auto-disconnecting the camera).

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss