unity gameobject invisible in hololens 2

161 Views Asked by At

I just created a simple unity project and deployed it to HoloLens 2, the splashed mesh appeared and I was asked to confirm the rights, but after that nothing appeared, I only see the pointers, my gameobjects were not displayed at all. I have also tried with just a cube, but it's not working neither. I followed every step in the tutorials. Versions of tools: windows 10; unity: 2022.3.14f1, 2020.3.48f1, 2020.3.11f1, 2020.3.4f1; visual studio community: 2019, 2022; MRTK: 1.0.2209.0; vuforia: 10-18-4, 10-19-3. All of these versions have I tried.

I've tried creating build the project in X64, ARM, ARM64, tried installing the XR plugin manully and then install the other plugins with MRTK but nothing has worked.

2

There are 2 best solutions below

2
On

Instance of a Class: A class is a blueprint or template for creating objects. An instance variable is a variable that belongs to an instance of a class. Each object created from a class can have its own set of instance variables.

Attributes or Properties: Instance variables represent the attributes or properties of an object. For example, if you have a class representing a "Car," instance variables might include attributes like "color," "model," or "year."

Scope: The scope of an instance variable is limited to the instance of the class to which it belongs. It is not shared among instances of the class; each instance has its own set of values for its instance variables.

Initialization: Instance variables are often initialized in the constructor of the class. The constructor is a special method that gets executed when an object is created. It's responsible for setting up the initial state of the object, including the values of its instance variables.

Here's a simple example in a hypothetical

1
On

When you used HoloLens 2 to open the project, a prompt box appeared, asking for rights, this is because you have checked some options in ‘Project Setting -> Player -> Publishing Setting -> Capabilities’, prompt box will not appear by default.

For Unity version and development environment, please refer to Choosing a Unity version and XR plugin - Mixed Reality | Microsoft Learn and Install the tools - Mixed Reality | Microsoft Learn.

To create a project, please refer to Set up a new OpenXR project with MRTK - Mixed Reality | Microsoft Learn.

To build a project, please refer to Build and deploy to the HoloLens - Mixed Reality | Microsoft Learn.

For deploying projects for HoloLens2, we use Release with ARM64 by default, please refer to Using Visual Studio to deploy and debug - Mixed Reality | Microsoft Learn.

You can also test these example scenes Example scenes - MRTK 2 | Microsoft Learn.