microsoft / MixedRealityCompanionKit

This is a MixedRealityToolkit style repository for code bits and components that may not run directly on Microsoft HoloLens or immersive headsets but instead pair with them to build experiences.
MIT License
595 stars 288 forks source link

error CS0246: The type or namespace name `SingleInstance' could not be found. #179

Closed tiepu closed 6 years ago

tiepu commented 7 years ago

I Copyed Assets\Addons\HolographicCameraRig to Assets\Addons in my project,but The following error

"Assets/Addons/HolographicCameraRig/SV_UNET/Prefabs/Support/Scripts/UI/PositionDebugButton.cs(10,40): error CS0246: The type or namespace name `SingleInstance' could not be found. Are you missing an assembly reference?"

fieldsJacksonG commented 7 years ago

Some of the spectator view code has dependencies on the HoloToolkit. Did you import the minimum subset of the toolkit from the UnityPackages.zip file in the release here?

Chefty commented 7 years ago

@fieldsJacksonG As soon as I import all from UnityPackages.zip file the error is changing to:

Assets/HoloToolkit/Input/Scripts/InputSources/SupportedInputInfo.cs(12,17): error CS0101: The namespace HoloToolkit.Unity.InputModule' already contains a definition forSupportedInputInfo'

Any idea please ? it's been some hours i'm trying to get SpectatorView working on Unity.

fieldsJacksonG commented 7 years ago

Did you already have a version of the HoloToolkit in your project? Unity would have a namespace collision if you do.

SupportedInputInfo is defined in IInputSource.cs. My copy is here

Check to see if you have another copy.

ghost commented 7 years ago

Seems like HoloToolkit doesnt always have these scripts... but they can be found here: SpectatorView\Samples\SharedHolograms\Assets\HoloToolkit\Utilities\Scripts

Try copying these to your project.

chris-han commented 7 years ago

With the MixedRealityToolkit-Unity for Unity 2017.2.0, the SingleInstance class in Assets\HoloToolkit\Utilities\Scripts\SingleInstance.cs has changed into Singleton.