Program Issues Going From Unity To HoloLens - Cannot convert from 'string' to 'System.IO.Stream'

前端 未结 2 1068
暗喜
暗喜 2021-01-22 13:20

I have a program written in Unity using C# that initializes a new StreamReader and proceeds to read the text data from a text file I have stored in Unity\'s resources folder. Ev

2条回答
  •  迷失自我
    2021-01-22 14:02

    The API differs in some cases between Unity Mono and .NET on UWP. It could be the StremReader(string) ctor is missing from the UWP version.

    For instance, I had a case where Delegate.CreateInstance works in Editor but fails on Hololens and requires a different version.

    You can wrap things in macros or use the one UWP requires.

提交回复
热议问题