8000 GitHub - WillSho1/ar-training · GitHub
[go: up one dir, main page]

Skip to content
  • About

    No description, website, or topics provided.

    Resources

    Stars

    0 stars

    Watchers

    1 watching

    Forks

    Latest commit

     

    History

    99 Commits

    Folders and files

    Repository files navigation

    HoloLens 2 AR Training Application

    Requirements

    • Unity 2022.3.50f1
    • Windows 10/11
    • Visual Studio 2019 or 2022 with the following workloads:
      • Desktop development with C++
      • WinUI application development with the following optional selected:
        • Universal Windows Platform tools
        • C++ (v143) Universal Windows Platform tools or another C++ (v14x) Universal Windows Platform tools
        • Windows 11 SDK (10.0.22621.0) or another recent version
      • Game development with Unity
      • Game development with C++

    Initial Setup

    1. Ensure your environment has the above requirements
    2. Clone the repository
      git clone https://github.com/WillSho1/ar-training.git
    3. Open project in Unity Hub
      • Go to Projects
      • Add -> Add project from disk
      • Select/Open the cloned repository
      • Open with Unity 2022.3.50f1 as the Editor Version
    4. In the Unity Editor, open the main scene
      • In the top left select File -> Open Scene
      • Select ./Scenes/mainScenes.unity
      • Open

    Testing Via Remoting on HoloLens 2

    1. Start HoloLens 2 and ensure it is connected to the internet
    2. Sign in
    3. Navigate to Holographic Remoting
      • Select All Apps
      • Find and select Holographic Remoting
      • Press the play button on the box that has appeared in front of you
    4. A new screen will pop up with an IP adress at the bottom of the panel:
      • 'Waiting for connection on x.x.x.x'
      • Keep track of this IP address
    5. In the Unity Editor go to the remoting tab
      • In the tool bar, select Mixed Reality -> Remoting -> Holographic Remoting for Play Mode
    6. Enter the IP adress from Holographic Remoting into Remote Host Name
      • Keep all other fields the same
    7. Select the play button in the Unity Editor to run your app in Play Mode on HoloLens 2

    Building Project to Deploy on HoloLens 2

    1. Ensure you have Visual Studio 2019 or 2022 with the necessary workloads:
      • Download and install Visual Studio 2022
      • In the Visual Studio Installer, select Modify on your most recent Visual Studio version
      • Select the following workloads:
        • Desktop development with C++
        • WinUI application development with the following optional selected:
          • Universal Windows Platform tools
          • C++ (v143) Universal Windows Platform tools or another C++ (v14x) Universal Windows Platform tools
          • Windows 11 SDK (10.0.22621.0) or another recent version
        • Game development with Unity
        • Game development with C++
      • Select Modify
    2. Verify the Build Settings are correct
      • In the Unity Editor go to File -> Build Settings
      • For Platform select Universal Windows Platform and Switch Platform
        • If it is not downloaded, select Open Download Page and run the installation
        • Restart Unity Editor and return to Build Settings
      • Ensure that the following settings are set:
        • Architecture: ARM64 (for building to run on HoloLens)
        • Build Type: D3D Project
        • Target SDK Version: Latest Installed
        • Minimum Platform Version: 10.0.10240.0
        • Visual Studio Version: Latest installed
        • Build and Run on: Local Machine
        • Build configuration: Release
        • Leave all boxes UNCHECKED, except for Copy PDB
        • Compression Method: Default
    3. Select Build
      • It is recommended you make a ./Builds directory in the project directory and save builds here
    4. Navigate to the /Builds directory or wherever the build is saved
    5. Open the PACKAGE_DISPLAY_NAME.sln Solution file with Visual Studio
    6. Set the Solution Configuration and Platform
      • In the tool bar to the left of the green play button are two drop downs
      • For Solution Configuration select Release
      • For Solution Platform select ARM64
      • For the Target Device (right of play button), select Device for deploying via USB
    7. Build the package
      • Right click on the project PACKAGE_DISPLAY_NAME (Universal Windows)
      • Select Publish -> Create App Packages...
      • Select Sideloading as the distribution method, then select Next
      • Use the code signing certificate provided, then select Next
        • If there is no certificate, create a temporary one
      • Ensure ARM64 is selected in the architecture, and the Solution Configuration is Release (ARM64)
      • Select Create
    8. Wait for build to complete
    9. On HoloLens 2 enable Developer Mode and Device Portal
      • From the main menu, navigate to Settings -> Update & Security -> For developers
      • Enable Use developer features and Device Portal
      • Keep track of the Ethernet or Wi-Fi IP addresses below Device Portal
    10. In a web browser on your PC, navigate to the IP Address
      • Ignore certificate warnings
      • Create an account if not done already, and sign in
    11. Install the certificate
      • In the Device Portal, navigate to Views -> Apps
      • In the Deploy apps section, select Install Certificate
      • Select Choose File and navigate to the certificate. It should be located somewhere similar to ./Builds/AppPackages/PACKAGE_DISPLAY_NAME/PACKAGE_DISPLAY_NAME_1.0.x.0_ARM64_Test/AR Assisted Training_1.0.x.0_ARM64.cer in the project directory
      • Select Install
    12. Install the application
      • Stay on the same Device Portal page
      • In the Deploy apps section, select Local Storage
      • Select Choose File and navigate to the app package. It should be located somewhere similar to ./Builds/AppPackages/PACKAGE_DISPLAY_NAME/PACKAGE_DISPLAY_NAME_1.0.x.0_ARM64_Test/AR Assisted Training_1.0.x.0_ARM64.appx in the project directory
      • Select Install
    13. Once the installation is complete, the app should appear in All Apps on the HoloLens 2

    Isues

    • Deploy apps Installation Failure in the HoloLens 2 Device Portal (Build Step 12 Failure)
      • Failure reason: Another user has already installed an unpackaged version of this app. The current user cannot replace this with a packaged version.
      • Attempt to remove the conflicting app version in the Installed apps section in Device Portal -> Views -> Apps
      • If the current user does not have permissions to remove the app globally, a new package name is needed
      • In Visual Studio in the Solution Explorer (Step 5), open PACKAGE_DISPLAY_NAME (Universal Windows)/Package.appxmanifest
      • In the Packages section, change the Package name to something unique
      • Restart build from Step 7

    About

    No description, website, or topics provided.

    Resources

    Stars

    0 stars

    Watchers

    1 watching

    Forks

    Releases

    Packages

    Contributors

    Languages

    0