从github上面下载MixedRealityToolkit-Unity-main案例库,然后试着通过unity打开,报错:
Assets\Data Binding Example\Scripts\DataSourceReflectionListTest.cs(63,17): error CS0246: The type or namespace name ‘DataSourceReflection’ could not be found (are you missing a using directive or an assembly reference?)
Assets\Data Binding Example\Scripts\ThemeSetter.cs(16,19): error CS0246: The type or namespace name ‘DataSourceGOBase’ could not be found (are you missing a using directive or an assembly reference?)
研究了半天发现问题所在:下载整个库之后,我仅仅拷贝了MRTKDevTemplate文件夹,然后通过unity打开,其实是需要带着整个仓库一起打开的,否则就会出现package缺失。如果是整个库文件夹打开,不仅不会出现问题,还会正常安装所有的package,如下图所示:

尤其是一直缺失导致报错的这个MRTK3 Data Binding and Theming (Experimental),无法通过MixedRealityFeatureTool.exe下载,所以一直报错。