# Access Permissions to Grab a Space's GLB Mesh Directly from a Unity App

**URL:** <https://forum.magicleap.cloud/t/access-permissions-to-grab-a-spaces-glb-mesh-directly-from-a-unity-app/4181>\
**Category:** General\
**Tags:** development, unity, spaces\
**Created:** [September 8, 2024, 2:44pm UTC](https://forum.magicleap.cloud/t/access-permissions-to-grab-a-spaces-glb-mesh-directly-from-a-unity-app/4181 "2024-09-08T14:44:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve.rooney](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@steve.rooney](https://forum.magicleap.cloud/u/steve.rooney)\
**Post date:** [September 8, 2024, 2:44pm UTC](https://forum.magicleap.cloud/t/access-permissions-to-grab-a-spaces-glb-mesh-directly-from-a-unity-app/4181/1 "2024-09-08T14:44:47Z")

</div>

Hello,

I recently made a post that asked about getting a Space's GLB mesh via ADB, and learned that the mesh exists in the file system of the ML2 after the space is created at the path:

/sdcard/Android/data/com.magicleap.mappingtool/files

My current question is about access permissions. My goal is to be able to pull this mesh into my app automatically, if possible. When I attempt to access files in this directory or even the Downloads folder where the .glb is placed when exported from the Spaces app, I get access denied errors. I made sure to enable the android permissions for reading external storage. Is there a way to grab .glb meshes via a Unity application, or will I have to grab the meshes manually or move them around with ADB?

Thanks!

---

<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:** [September 8, 2024, 2:57pm UTC](https://forum.magicleap.cloud/t/access-permissions-to-grab-a-spaces-glb-mesh-directly-from-a-unity-app/4181/2 "2024-09-08T14:57:13Z")

</div>

For android 10 and up, you have to request explicit read access for the file/directory if you use File Stream. Alternatively you can use [Storage Access Framework](https://developer.android.com/guide/topics/providers/document-provider) to access the file. This can be done via an android plugin .

Here is an open source plugin that allows your app to import files through the native file browser:

> **[GitHub - yasirkula/UnityNativeFilePicker: A native Unity plugin to import/export files...](https://github.com/yasirkula/UnityNativeFilePicker)**
>
> A native Unity plugin to import/export files from/to various document providers on Android & iOS

---

<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:** [October 4, 2024, 8:24pm UTC](https://forum.magicleap.cloud/t/access-permissions-to-grab-a-spaces-glb-mesh-directly-from-a-unity-app/4181/3 "2024-10-04T20:24:47Z")

</div>

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