Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

ERROR WITH SpatialAnchorConfig #445

Open
Dmitry057 opened this issue Jan 26, 2021 · 12 comments
Open

ERROR WITH SpatialAnchorConfig #445

Dmitry057 opened this issue Jan 26, 2021 · 12 comments

Comments

@Dmitry057
Copy link

Саn you tell me how to create a SpatialAnchorConfig file??
I have 9 errors due to BuildDemo2019 compilation.
image
any information is useful!

@Julian-Th
Copy link

Julian-Th commented Mar 5, 2021

In the Unity Editor select the assembly
Microsoft.MixedRealiy.SpatialAlignment.ASA.asmdef

In the Inspector under "Assembly Definition References" click the "+" sign and drag in the assembly called
AzureSpatialAnchors.SDK.Core.Runtime.asmdef

This assembly is either located in the packages folder if you imported the Azure Spatial Anchors SDK through the Package Manager. Or it's located in your Assets folder if you imported it as old-fashioned '.unitypackage'.

Then hit Apply at the bottom of the Inspector window. Does that fix the problem?

If it doesn't, try to adding three more assembly definition references for the specific ASA SDK platforms right after the Core Runtime assembly:

AzureSpatialAnchors.SDK.iOS.Runtime.asmdef

AzureSpatialAnchors.SDK.Android.Runtime.asmdef

AzureSpatialAnchors.SDK.Windows.Runtime.asmdef

Let me know if it worked :)

@Dmitry057
Copy link
Author

Dmitry057 commented Mar 8, 2021

The errors disappeared when I set the repository path C:\SpectatorView

@Dmitry057
Copy link
Author

Dmitry057 commented Mar 8, 2021

However, during the build, an error occurs with the packages
image

@Dmitry057
Copy link
Author

C:\SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView\Scripts\SpatialAlignment\MarkerVisual\QRCodeMarkerVisualDetectorSpatialLocalizer.cs(20,25): error CS0234: The type or namespace name 'Package' does not exist in the namespace 'Microsoft.Windows.ApplicationModel' (are you missing an assembly reference?)

@Dmitry057
Copy link
Author

C:\SpectatorView\src\SpectatorView.Unity\Assets\SpectatorView\Scripts\SpatialAlignment\MarkerVisual\QRCodeMarkerVisualDetectorSpatialLocalizer.cs(20,85): error CS0234: The type or namespace name 'ProcessorArchitecture' does not exist in the namespace 'Microsoft.Windows.System' (are you missing an assembly reference?)

@Julian-Th
Copy link

Go into all files which trigger the error and search for statements like this:

#if UNITY_WSA && !UNITY_EDITOR
                return (Windows.ApplicationModel.Package.Current.Id.Architecture != Windows.System.ProcessorArchitecture.X86); // HoloLens 1 is not supported.
#elif UNITY_EDITOR

Now prefix the Windows.xxx. statements with the global:: namespace like so:

#if UNITY_WSA && !UNITY_EDITOR
                return (global::Windows.ApplicationModel.Package.Current.Id.Architecture != global::Windows.System.ProcessorArchitecture.X86); // HoloLens 1 is not supported.
#elif UNITY_EDITOR

@Dmitry057
Copy link
Author

Thank you so much))) compilation of the build was successful)

@Dmitry057
Copy link
Author

Tomorrow I will test on hololins, I hope everything will be fine)

@Dmitry057
Copy link
Author

so...

@Dmitry057
Copy link
Author

Dmitry057 commented Mar 8, 2021

I have some errors with build Appx file:

Command failed, errorCode: 1
UnityEngine.Debug:Log(Object)
Microsoft.MixedReality.Toolkit.Build.Editor.d__5:MoveNext() (at Assets/Pcjs/MixedRealityToolkit/Utilities/BuildAndDeploy/UwpAppxBuildTools.cs:144)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(ProcessResult) Microsoft.MixedReality.Toolkit.<StartProcessAsync>d__0:MoveNext() (at Assets/Pcjs/MixedRealityToolkit/Extensions/ProcessExtensions.cs:38) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(ProcessResult)
Microsoft.MixedReality.Toolkit.d__1:MoveNext() (at Assets/Pcjs/MixedRealityToolkit/Extensions/ProcessExtensions.cs:150)
System.Reflection.MethodBase:Invoke(Object, Object[])
Microsoft.MixedReality.Toolkit.Utilities.SyncContextUtility:ExecuteContinuations() (at Assets/Pcjs/MixedRealityToolkit/Utilities/Async/Internal/SyncContextUtility.cs:53)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:303)

@Dmitry057
Copy link
Author

maybe I need to install a different version of MixedReality.Toolkit?

@Dmitry057
Copy link
Author

I don't understand, why not just throw off UnityPackaje, in which everything is already configured? What is the point of spending time on something that can be done in 5 minutes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants