# MagicLeap Camera Player in Unreal

**URL:** <https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090>\
**Category:** General\
**Tags:** development\
**Created:** [January 29, 2024, 12:34pm UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090 "2024-01-29T12:34:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjinsu](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bjinsu](https://forum.magicleap.cloud/u/bjinsu)\
**Post date:** [January 29, 2024, 12:34pm UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090/1 "2024-01-29T12:34:35Z")

</div>

hello. I am developing a Magic Leap app using Unreal.

I used the magicleap camera player plugin and created a camera player using the CreatePlayer method of the camera module.

And I executed a method called Open that receives the URL for the Magic Leap main camera as an argument.

When I build and run the app, the camera player's open function is executed, an orange camera icon appears on the screen, and the app closes.

Is this working correctly?  
I'm not sure why the app is closing.

How do I get the image of the main camera while running the Unreal app?

Last time I asked a question, I was told to use the Android API.

However, when I look at the MagicLeap Camera Player code, it seems like I can implement the desired function, but when I run the camera, the app closes, which is frustrating.

I need help.

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [January 29, 2024, 4:19pm UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090/2 "2024-01-29T16:19:23Z")

</div>

@bjinsu Sorry to hear that you are running into this problem. You are correct, you should use the Android Camera API to access the Magic Leap Camera.

Do you mind sharing the the logs from your device. Did you notice any errors in the log cat before your application crashed?

You can capture the logs by running `adb logcat > file.txt `  
Reproduce the issue on the device  
Press **Ctrl+C** in the Terminal Window to stop writing to the log file.

---

<div class="post-metadata">

**Author:** ![bjinsu](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bjinsu](https://forum.magicleap.cloud/u/bjinsu)\
**Post date:** [February 1, 2024, 12:23am UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090/3 "2024-02-01T00:23:48Z")

</div>

By using adb logcat, I was able to find out what the problem was.  
It was a simple nullptr crash.  
I'm embarrassed. thank you!

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [February 1, 2024, 12:45am UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090/4 "2024-02-01T00:45:53Z")

</div>

Happy I could help 😁

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [February 16, 2024, 12:46am UTC](https://forum.magicleap.cloud/t/magicleap-camera-player-in-unreal/3090/5 "2024-02-16T00:46:26Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
