Streaming Assets folder files couldn't be accessed in APK

I need to read .txt file from assets and I use "Streaming Assets" and this line

var lines = File.ReadAllLines($"{Application.streamingAssetsPath}/{fileName}")

It works fine in editor, but in APK build for Oculus it fails to find the path.

Any ideas for solution?

2 Answers

2

A bit random, but is your folder correctly named? It should be StreamingAssets. And second - do you specify extension next to the filename?

Yes, it named correctly. In Editor it works great, but issue only happens in build