How to build Spectator View Plugin

These steps describe what to do to generate the DLLs needed to use the Spectator View Plugin in Unity.

0. Ensure you have the Universal Windows Platform development tools installed and configured in Visual Studio 2017 1. Download and install git https://git-scm.com/download/win (make sure to leave the default installation parameters) 2. Download and install cmake from here (make sure you select ADD TO PATH for all users) https://cmake.org/files/v3.11/cmake-3.11.4-win64-x64.msi 3. Clone the following repository using GitHub https://github.com/Microsoft/vcpkg.git 4. In GitHub, and with the vcpkg repository open, select Repository > Open in command prompt 5. Enter the following: a. git checkout 068032bc548817a04709970f76268a6d7b1767c7 + ENTER b. .\bootstrap-vcpkg.bat + ENTER . .\vcpkg integrate install + ENTER d. .\vcpkg install opencv[contrib]:x86-uwp –-recurse + ENTER 6. Clone the following repository using GitHub https://github.com/Microsoft/MixedRealityToolkit.git 7. Open the .sln file located in MixedRealityToolkit\SpectatorViewPlugin\SpectatorViewPlugin\SpectatorViewPlugin.sln 8. Set the build options to Release and x86, then build the solution 9. If you see an error regarding an opencv lib file version 341, go to the Project’s settings by right clicking on the child project “SpectatorViewPlugin (Universal Windows) > Properties. Then on the left, navigate to Configuration Properties / Linker / Input, and change the line in Additional Dependencies for the following one (see image below) a. opencv_aruco343.lib;opencv_core343.lib;opencv_calib3d343.lib;opencv_features2 d343.lib;opencv_flann343.lib;opencv_highgui343.lib;opencv_imgcodecs343.lib;ope ncv_ml343.lib;opencv_videoio343.lib;%(AdditionalDependencies) 10. DLLs will be created in the child folder MixedRealityToolkit\SpectatorViewPlugin\SpectatorViewPlugin\Release\SpectatorViewPlugi n 11. Copy the DLLs to the Unity project (after importing the HoloToolkit plugin) to the folder HoloToolkit-Preview\SpectatorView\Plugins\WSA\x86