Unity-Technologies / uaal-example

Other
733 stars 233 forks source link

Can we access files in the native app storage from Unity? #79

Closed ROBYER1 closed 1 year ago

ROBYER1 commented 1 year ago

For example if we saved a JSON file to the app storage in the Native app and pass the direct path to that file to Unity to be loaded there, can we access that file? How would one do this? Any code example would be extremely useful for developers.

For example, in Unity if I access application.streamingAssetsPath, I get this: jar:file:///data/app/~~joImNqRluKYpvqt1SIG1GA==/com.unity.mynativeapp-0Djadf-ZKYy9f6vxZAJTqA==/base.apk!/assets/Model/Equipment_Box.gltf

ROBYER1 commented 1 year ago

Just writing to confirm we got it working in the end, nothing was stopping it from working, it was actually a typo that the native developer made in the file path they were using in the end :)