MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

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

Open tezelia opened this issue 9 years ago • 19 comments

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,

tezelia avatar Nov 10 '17 11:11 tezelia

Have you got the Metro support installed for Unity?

samharper94 avatar Nov 10 '17 11:11 samharper94

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 :(

tezelia avatar Nov 10 '17 11:11 tezelia

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.

samharper94 avatar Nov 10 '17 11:11 samharper94

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.

eirikhollis avatar Nov 10 '17 12:11 eirikhollis

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)

tezelia avatar Nov 10 '17 13:11 tezelia

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.

eirikhollis avatar Nov 10 '17 13:11 eirikhollis

Ah the Haptics error, are you using a HoloLens?

samharper94 avatar Nov 10 '17 13:11 samharper94

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

tezelia avatar Nov 10 '17 14:11 tezelia

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

samharper94 avatar Nov 10 '17 14:11 samharper94

Also be sure to look at the Upgrade Guide

StephenHodgson avatar Nov 10 '17 17:11 StephenHodgson

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

XavierCrespin avatar Nov 12 '17 23:11 XavierCrespin

Failed to locate internal switch adapter

This error message has no impact on your ability to build

StephenHodgson avatar Nov 12 '17 23:11 StephenHodgson

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 ?

XavierCrespin avatar Nov 12 '17 23:11 XavierCrespin

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

image

StephenHodgson avatar Nov 13 '17 00:11 StephenHodgson

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.

XavierCrespin avatar Nov 13 '17 10:11 XavierCrespin

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

asanint avatar Nov 16 '17 21:11 asanint

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

StephenHodgson avatar Nov 17 '17 02:11 StephenHodgson

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

  • HoloToolKit
  • HoloToolKit.meta
  • mcs.rsp
  • mcs.rsp.meta

Works fine now :)

tezelia avatar Nov 20 '17 16:11 tezelia

Please reopen if you still have issues.

NeerajW avatar Feb 15 '18 18:02 NeerajW