microsoft / MixedReality-SceneUnderstanding-Samples

MIT License
53 stars 20 forks source link

Using SceneUnderstandingManager in Unity 2020.3 Project #20

Closed crystal-butler closed 3 years ago

crystal-butler commented 3 years ago

I'm working on a project built using the following tools: OS: Windows 10 Unity version: 2020.3.2f1 VIsual Studio Community version: 2019[16.10.4]

My work is for an existing project that I'm contributing some Scene Understanding capabilities to, and it is not possible to downgrade to an earlier version of Unity.

I'm relatively new to Unity, MRTK and HoloLens development, and was hoping to use the sample code in this repo as a springboard. Specifically, I've added SceneUnderstandingManager.cs to the project and want to modify it to periodically save Scene Object OBJs to storage on the HoloLens; the OBJs have to be correctly aligned to the coordinate system being used by the project. In Unity, I get the error: The type or namespace name 'WorldAnchor' does not exist in the namespace 'UnityEngine.XR.WSA' (are you missing an assembly reference?) on compiling the project when this script is included. However, if I comment out the reference to WorldAnchor (lines 599-604) it compiles just fine.

These are the questions I have:

  1. Is there a timeline for getting these samples updated to work with Unity 2020?
  2. If not, is there any guidance on how to replace the lines I commented out?
  3. Should I be using DemoSceneUnderstandingController.cs as base code instead? This Scene Understanding observer documentation makes it seem like the MRTK example is more current, but the Scene Understanding SDK Overview brings me here (via the deprecated version).
jorgonz commented 3 years ago

Hi Crystal, we are currently working on a batch of changes to upgrade to Unity 2020 and use the new XR pipeline among other QOL changes. These changes should be ready fairly soon.

Sit tight. I'll update this thread when the changes are ready.

crystal-butler commented 3 years ago

That's great, @jorgonz. Would you be able to give a rough ETA on the changes?

jorgonz commented 3 years ago

The change is in

Here's a list of everything that changed https://github.com/microsoft/MixedReality-SceneUnderstanding-Samples/pull/21