page_type: sample name: Scene Understanding samples for Unity description: A Unity-based sample application that showcases Scene Understanding on HoloLens 2. languages:
Supported Unity versions | Built with XR configuration |
---|---|
Unity 2020.3.12f1 | Windows XR |
A Unity-based sample application that showcases Scene Understanding on HoloLens 2. When this sample is deployed on a HoloLens, it will show the virtual representation of your real environment. For PC deployment, the sample will load a serialized scene (included under Assets\SceneUnderstanding\StandardAssets\SUScenes) and display it. A help menu is presented on launch, which provides information about all the input commands available in the application.
To learn more about Scene Understanding, visit our Scene Understanding and Scene Understanding SDK documentation.
File/folder | Description |
---|---|
Assets |
Unity assets, scenes, prefabs, and scripts. |
Packages |
Project manifest and packages list. |
ProjectSettings |
Unity asset setting files. |
UIElementsSchema |
UIElements schema files from the Unity editor. |
.gitignore |
Define what to ignore at commit time. |
LICENSE |
The license for the sample. |
README.md |
This README file. |
Before trying to build the project, go to File > Build Settings and make sure all samples scenes in the SceneUnderstanding/Examples folder appear in the list.
[!IMPORTANT] The Home-Examples scene is not a SceneUnderstanding Scene per se, but rather a Menu Scene from which you can load the other example scenes. You can load any of the other example scenes using voice commands.
To run this sample on a HoloLens 2:
To run this sample on a PC:
Problem:
Multiple errors occur in SceneUnderstandingManager.cs
Line 571.
System.Numerics.Matrix4x4 converted4x4LocationMatrix = ConvertRightHandedMatrix4x4ToLeftHanded(suObject.GetLocationAsMatrix());
error CS7069: Reference to type 'Matrix4x4' claims it is defined in 'System.Numerics', but it could not be found
Solution:
[!NOTE] When running on your Hololens, all the interactive commands are voice commands. You're require to speak to interact with the scene when running on Hololens. Say Scene Objects Wireframe, Load NavMesh, Toggle Auto Refresh and so on.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.