0

i using hololens 2 unity version is 2020.3.25f1
my project is download obj from the web and load in runtime.

Application.persistentDataPath 

I succeeded in downloading this path.
but i cant load in runtime.
i tried this asset
https://assetstore.unity.com/packages/tools/modeling/runtime-obj-importer-49547
This asset doesn't work From HoloLens

Is there any other way?

1 Answers1

0

The downloading the file is working if I am reading this correctly. Since this is a coding forum, can you include the code you are using and edit to be in the post?

Here is an example post here on stackoverflow that shows how to load files from storage with HoloLens:

Working with Files on Hololens 2 (UWP to .NET)

#if !UNITY_EDITOR && UNITY_WSA_10_0
    public async Task<StreamReader> getStreamReader(string path)
    {
        StorageFile file = await StorageFile.GetFileFromPathAsync(path);
        var randomAccessStream = await file.OpenReadAsync();
        Stream stream = randomAccessStream.AsStreamForRead();
        StreamReader str = new StreamReader(stream);

        return str;
    }
#endif
Nathan - MSFT
  • 331
  • 1
  • 7