microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

Can't import HoloToolKit into the latest version of Unity 2017.2.0f3? How to import properly? #1330

Closed tezelia closed 6 years ago

tezelia commented 7 years ago

Hey guys,

Just recently began developing mixed reality applications with Unity for the HoloLens.

Initially, I began developing the application in Unity 5.4.0f1 HTP version which successfuly built a Visual Studio file, but then realized for more fuctionalities and interaction such as voice recognition, I would need the HoolToolKit for Unity.

Tutorials on how to successfuly import the holotoolkit aren't that common but still I have honestly followed every tutorial but still get errors.

Regarding the latest version of Unity, or at least 2017.2.1, how do I successfuly import the holotoolkit? For now I keep getting errors

#Unsupported DDS file.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()

#Removing Assets/HoloToolkit/UX/Resources/Models/Cursor/Cursor_move/CursorRing.fbm/templates because the asset does not exist
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()

Note: These errors can be removed after clearing the console. Should I ignore these?

Once I download the mixedrealitytoolkit-unity folder from github. Which folders and files do I drag and drop into the assets folder? Do I drag and drop the entire folder? Do I then rebuild, repackage, etc what shall I do, please help :(

Kind Regards,

samharper94 commented 7 years ago

Have you got the Metro support installed for Unity?

tezelia commented 7 years ago

Hey, please ignore the comment above (I'll delete it now). Just realized on one version of Unity it wasn't installed but now I'm on the version or the latest version which has it installed, but still no luck :(

samharper94 commented 7 years ago

Once you get the git repository, only copy the folders over you actually want. I only take Assets\HoloToolKit, HoloToolKit.Meta and the mcs files. I think there's some conflicts if you copy everything wholesale but I can't remember.

eirikhollis commented 7 years ago

I take a different approach, but still commonly used (I think?). Download the masterbranch/latest release and unzip it to a new folder. Start a new unity project and import everything inside the "Assets" folder of the unzipped folder to your project. Then click on one of the folders and choose "Export Package...".

You are now creating a .unitypackage file. Save it somewhere and import it into your existing project using "Assets -> Import Package -> Custom Package". Should work after that.

tezelia commented 7 years ago

I tried both but still not wroking

when I go into build window I get this error :(

Failed to locate internal switch adapter
UnityEngine.Debug:LogError(Object)
HoloToolkit.Unity.XdeGuestLocator:<FindGuestAddressAsync>m__0(Object) (at Assets/HoloToolkit/BuildAndDeploy/Editor/XdeGuestLocator.cs:64)

when I try to build from build settings I get these errors as well.... :(

#Assets\HoloToolkit\Input\Scripts\Utilities\Extensions\InteractionSourceExtensions.cs(12,23): error CS0234: The type or namespace name 'Haptics' does not exist in the namespace 'Windows.Devices' (are you missing an assembly reference?)

#Failed to locate internal switch adapter
UnityEngine.Debug:LogError(Object)
HoloToolkit.Unity.XdeGuestLocator:<FindGuestAddressAsync>m__0(Object) (at Assets/HoloToolkit/BuildAndDeploy/Editor/XdeGuestLocator.cs:64)
eirikhollis commented 7 years ago

Try closing Unity and Visual Studio and deleting (create a backup first) the two "Visual C# Project file" in the root directory of your project.

Also, look into "GettingStarted" to see if you missed something.

samharper94 commented 7 years ago

Ah the Haptics error, are you using a HoloLens?

tezelia commented 7 years ago

My windows 10 version is 1703 (OS Build 15063.674)

I am guessing this is why I am getting the errors?

Am I supposed to update to version 1709 (OS Build 16299)

But my laptop is not informing me that I need any updates, etc which link do I need for this update, jsut searching on Google now

samharper94 commented 7 years ago

If you're using a HoloLens you need to use Unity 2017.1.2, #1184 explains why.

StephenHodgson commented 7 years ago

Also be sure to look at the Upgrade Guide

XavierCrespin commented 7 years ago

I have the exact same problem, i can't use the build window, and the same errors :

Failed to locate internal switch adapter

Is it because at some point i have installed unity 2017.2? Even after uninstalling 2017.2 and installing 2017.1.2f1 , i can't get MRTK to import successfully without errors, even on a new, empty project

StephenHodgson commented 7 years ago

Failed to locate internal switch adapter

This error message has no impact on your ability to build

XavierCrespin commented 7 years ago

I'm completely lost here, i uninstalled everything from unity to VS, reinstalled, even the simplest app with just a simple 3D object won't even work on the device now, can you please clarify one thing : Are we supposed to use the MRTK 2017.2.0 with unity 2017.1.2f1 ? Or the MRTK 2017.1.2 with unity 2017.1.2f1 ?

StephenHodgson commented 7 years ago

The latest release can be used with with either Unity Editor. Depending on your platform target:

image

XavierCrespin commented 7 years ago

For the import problem and errors in the console, i found a fix by NOT creating the package from source, but downloading directly the .unitypackage available on the release page , and importing the custom package directly in my project. Works like a charm. Since the source was last opened using unity 2017.2 MRTP, opening it to create the package with unity 2017.1 vanilla probably breaks something.

asanint commented 7 years ago

@StephenHodgson, do you know where the "Failed to locate internal switch adapter" error means? it seems to be triggered by the build window.

StephenHodgson commented 7 years ago

It's the build window trying to access the wifi adapter and failing. It's just not implemented.

tezelia commented 6 years ago

It works now guys, thanks, I downloaded the 1.2 version as instructed then copy pasted these files directly into the assets of my project

Works fine now :)

NeerajW commented 6 years ago

Please reopen if you still have issues.