Coder Social home page Coder Social logo

microsoftdocs / mslearn-mr-adt-in-unity Goto Github PK

View Code? Open in Web Editor NEW
65.0 7.0 55.0 36.68 MB

This is a repo that holds the sample code for the Mixed Reality and Azure Digital Twins in Unity Learn Path

License: Creative Commons Attribution 4.0 International

Bicep 2.87% C# 46.49% Shell 0.47% ShaderLab 46.05% HLSL 4.12%

mslearn-mr-adt-in-unity's Introduction

page_type name description languages products
sample
Building mixed reality digital twins with Azure Digital Twins and Unity
This sample repository holds all the Azure Digital Twins and Unity assets for the Microsoft Learn path.
csharp
bicep
windows-mixed-reality
hololens
azure

Building mixed reality digital twins with Azure Digital Twins and Unity

License

Unity version
Unity 2020.3.8

Learn how to create of a mixed reality HoloLens 2 application using Azure Digital Twins and Unity, a real-time 3D platform. You can find the full learning path on Microsoft Learn.

Contents

File/folder Description
ARM-Template Pre-configured ARM template for Azure services.
Device-Simulator Visual Studio solution for running the device simulator.
Unity-Project Unity assets, scenes, prefabs, and scripts.
.gitignore Define what to ignore at commit time.
README.md This README file.
LICENSE The license for the sample.
SECURITY.md Security and issue policies.
CODE_OF_CONDUCT.md Microsoft Code of Conduct.

Prerequisites

  • A HoloLens 2 device
  • Azure service creation and configuration
  • Basic familiarity with Unity, C#, and GitHub
  • Domain User Azure Active Directory (i.e, not Guest)
  • Azure CLI installed
  • Bing Maps developer account
  • A Windows 10 PC configured with the required tools
    • Windows 10 SDK 10.0.18362.0 or later
    • Unity Hub with Unity 2020.3.0f1 (LTS) installed
    • Visual Studio 2019, with Universal Windows Platform (UWP) workload installed
    • USB Device Connectivity
    • Microsoft Mixed Reality Feature Tool

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

mslearn-mr-adt-in-unity's People

Contributors

adamlash avatar hferrone avatar jbrentj avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mslearn-mr-adt-in-unity's Issues

Hololens 2 Emulator

Even though I have tried x86 and x64 compiled versions and deployed to the emulator, nothing ever appears. The app shows up but that is it. No actual visualization or anything.

Azure Digital Twins Simulation Device - deployment to Hololens 2

RE: 'Build a 3D Scene for mixed reality in Unity'.
I am unable to deploy 3D scene to Hololens 2.
DeviceSimulator.sln is running fine and connecting to MS Azure services.
Expecting request for Hololens 2 pin from Visual Studio as it's my first deployment this registration. App title BladeMR therefore not appearing in Hololens 2.

Using the following:

  • Unity 2020.3.8f1, UWP (USB device connect, C++ v142, Windows 10 SDK 10.0.18362.0, Windows 11 SDK 10.0.22000.0), IL2CPP, OpenXR, MRTK
  • Visual Studio 2022
  • Desktop dev C++
  • Game dev with Unity

I have 2 questions:

  1. Does SimulatorDevice.sln only work with USB connection, not wifi?

  2. From Unity is it not possible to Build using UWP x64 and create VS .sln, hence we only use the .sln provided? If so, then wouldn't the 3 options for 'Deploy to Hololens 2, test, uninstall' included in mslearn-adt-in-unity 2nd, 3rd, 4th exercises (https://docs.microsoft.com/en-us/learn/paths/build-mixed-reality-azure-digital-twins-unity/) each run only the provided VS .sln? If not, I guess my set-up for Unity/Build noted above needs fixing. Please advise.

Thank you.

Async void error. ADTDataHandler on ADTConnection has been disabled.

I have tried to complete the MSlearn lesson "Build mixed reality digital Twins with Azure Digital Twins and Unity".
I have tried several times as instructed to make the modules through. Each time the part "Exercise - Visualize and interact with simulated operations data using SignalR" ends with an error when pressing the Play button in the Unity Editor.
Before that point, there have been no errors all along. Everything has gone as per the instructions.
https://docs.microsoft.com/en-gb/learn/modules/connect-iot-hololens-azure-digital-twins-unity/8-visualize-signalr

403 (Site Disabled) -- Async void error. ADTDataHandler on ADTConnection has been disabled.
UnityEngine.Debug:LogError (object)
Microsoft.Unity.AsyncUtils:LogError (UnityEngine.Behaviour,System.Exception,bool) (at Assets/Scripts/SignalR/AsyncUtils.cs:134)
Microsoft.Unity.AsyncUtils/<>c__DisplayClass3_0:b__0 (UnityEngine.Behaviour,System.Exception) (at Assets/Scripts/SignalR/AsyncUtils.cs:185)
Microsoft.Unity.AsyncUtils/d__2:MoveNext () (at Assets/Scripts/SignalR/AsyncUtils.cs:167)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException (System.Exception)
SignalRService/d__14:MoveNext () (at Assets/Scripts/SignalR/SignalRService.cs:43)
UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

Unity Error: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll

Thank you Adam and Brent for this session at Build, great presentation and really interesting topic!

I managed to follow along with the tutorial up to the point of creating my Unity project from the folder 'Unity-Project' cloned from this repo. I get the following error when loading my Unity project in version 2020.3.11f1:

"Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform."

It seems as though this file is located in 'Library\PackageCache\[email protected]\Runtime' and 'Assets\Plugins'.

Any assistance would be much appreciated!

Cannot run device simulator

Hello,

I am following the tutorial carefully. However, when I tried to run the simulator using dotnet run, I am getting the following error:

System.IO.IOException: Bad message : '/home/dedy/.local/share/NuGet/Migrations'
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at NuGet.Common.Migrations.MigrationRunner.GetMigrationsDirectory()
at NuGet.Common.Migrations.MigrationRunner.Run()
at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)

I have tried to understand what has caused this error. But, I am not able to find the workaround.

Can anyone help to identify what am I missing?

Thanks

Dedy

No DigitalTwin

Hi, none of the turbines data update (though DeviceSimulator.sln shows the data in console), I checked the DigitalTwins object in Azure and there is no turbine twin - snap below.

If I set alertSent bool in AzureIoTHub in DeviceSimulator.sln , method GetTwinData in PopUpdater for twinId 102 shows message

"{\"error\":{\"code\":\"DigitalTwinNotFound\",\"message\":\"There is no digital twin instance that exists with the ID T102. Please verify that the twin id is valid and ensure that the twin is not deleted. See section on querying the twins https://aka.ms/adtv2query.\"}}"

I see RegistryManager.AddDeviceAsync but that doesn't create the digitaltwin and I can't find in the project the creation of twin with a function similar to
await client.CreateOrReplaceDigitalTwinAsync<BasicDigitalTwin>(twinId, initData);

Can someone shed some light whether this example is limited to not creating the twins in Azure and relies on something else for this example? I tried the example twice and I get the same results.

Thank you
image

Project loading with 35 errors on Maps package not getting resolved

Hello,
I am getting 35 errors in the project when trying to load it in Unity all around the maps
image

Unity is not allowing to load this package showing below error -

image

Looks like the package is deprecated as per below link
https://www.nuget.org/packages/Microsoft.Maps.Unity/

But when I try to install that package separately as well as suggested in above link, it is still not allowing me to install it.

Please help me with this error as the project loads with all errors pertaining to this package which is not getting installed.

Thanks in advance.

The simulation graphics looks blurry

Screenshot (9)

Everything runs smoothly~ however, the graphics in the simulation look very blurry. I think it must be to do with some settings when I import the Art, but I cannot figure out where they are. Can you help? Thanks!

unity not receive signalr broadcast data

Hi, the digital twins example works fine for me, thank you for making it available, but when I adapt it to an IoT device (mxchip), the Unity signalr client does not receive broadcast messages. I can see the broadcast messages in the azure funcapp logs but Unity doesn't receive them.

Unity client connection and disconnection subscriptions (rService.OnConnected and rService.OnDisconnected) to signalr fire correctly and get correctly connected/disconnected, but this is not the case for rService.OnTelemetryMessage and rService.OnPropertyMessage in Unity's client ADTDataHandlerr.cs.

I note I have triple checked the Target for signalr is indeed the same in Unity's client at receipt of the message (PropertyMessage and TelemetryMessage).

There are no errors and I can't get Microsoft.Extensions.Logging to work in Unity to get signalr client logs.

Can you please give me a hint what I may be missing as I've posted in stackoverflow and trying for the past couple of days with no avail.

Thank you for your help

broadcast functionapp logs sent but not received by unity:

`2022-09-07T13:47:07.878 [Information] Executing 'broadcast' (Reason='EventGrid trigger fired at 2022-09-07T13:47:07.8784905+00:00', Id=xxx)

2022-09-07T13:47:07.879 [Information] broadcast data :{"data": {"ID": "MachinePart1","TimeInterval": null,"Temperature": null,"Humidity": null,"Pressure": null,"MagnetometerX": null,"MagnetometerY": null,"MagnetometerZ": null,"AccelerometerX": null,"AccelerometerY": null,"AccelerometerZ": null,"GyroscopeX": 0,"GyroscopeY": -70,"GyroscopeZ": 0},"dataschema": "dtmi:digitaltwins:Basic:MachinePart;1","contenttype": "application/json","traceparent": "xxx"}

2022-09-07T13:47:07.879 [Information] broadcast methodMicrosoft.Azure.WebJobs.Extensions.SignalRService.SignalRAsyncCollector`1[Microsoft.Azure.WebJobs.Extensions.SignalRService.SignalRMessage]

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:ID - MachinePart1

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:TimeInterval -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:Temperature -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:Humidity -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:Pressure -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:MagnetometerX -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:MagnetometerY -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:MagnetometerZ -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:AccelerometerX -

2022-09-07T13:47:07.879 [Information] broadcast log at telemetry type:AccelerometerY -

2022-09-07T13:47:07.880 [Information] broadcast log at telemetry type:AccelerometerZ -

2022-09-07T13:47:07.880 [Information] broadcast log at telemetry type:GyroscopeX - 0

2022-09-07T13:47:07.880 [Information] broadcast log at telemetry type:GyroscopeY - -70

2022-09-07T13:47:07.880 [Information] broadcast log at telemetry type:GyroscopeZ - 0
`

Not able to build the application

I have followed the entire tutorial and able to experience live data when i put in game mode ,now trying to build the app its giving the below error ,please help me with this
UnityException: Failed to run reference rewriter with command "--target=Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.OpenXR.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.OpenXR.Features.ConformanceAutomation.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.OpenXR.Features.MockRuntime.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.OpenXR.Features.OculusQuestSupport.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.OpenXR.Features.RuntimeDebugger.dll" "--target=Temp\StagingArea\Data\Managed\UnityEngine.SpatialTracking.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.Management.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.ARSubsystems.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.ARFoundation.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Timeline.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Maps.Unity.SupportingScripts.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.OpenXR.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Async.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.SceneTransitionService.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.Tracking.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Gltf.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.GpuStats.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.PlaneFinding.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.OpenXR.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Extensions.HandPhysics.dll" "--target=Temp\StagingArea\Data\Managed\BladeMR.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.Shared.dll" "--target=Temp\StagingArea\Data\Managed\UnityEngine.XR.LegacyInputHelpers.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.WindowsSceneUnderstanding.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.XRSDK.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Addressables.dll" "--target=Temp\StagingArea\Data\Managed\Unity.InputSystem.dll" "--target=Temp\StagingArea\Data\Managed\Unity.ResourceManager.dll" "--target=Temp\StagingArea\Data\Managed\Unity.ScriptableBuildPipeline.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Subsystem.Registration.dll" "--target=Temp\StagingArea\Data\Managed\Unity.TextMeshPro.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.XRSDK.WindowsMixedReality.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.SDK.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.SDK.Experimental.Interactive.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.CameraSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.DiagnosticsSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.InputAnimation.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.InputSimulation.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.InputSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.SceneSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Services.TeleportSystem.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Tests.Utilities.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.SpatialAudio.Spatializer.dll" "--target=Temp\StagingArea\Data\Managed\netstandard.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Providers.WindowsVoiceInput.dll" "--target=Temp\StagingArea\Data\Managed\MessagePack.dll" "--target=Temp\StagingArea\Data\Managed\System.Buffers.dll" "--target=Temp\StagingArea\Data\Managed\System.IO.Pipelines.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.Logging.dll" "--target=Temp\StagingArea\Data\Managed\System.Net.Http.Json.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Protocols.Json.dll" "--target=Temp\StagingArea\Data\Managed\System.Diagnostics.DiagnosticSource.dll" "--target=Temp\StagingArea\Data\Managed\System.Memory.dll" "--target=Temp\StagingArea\Data\Managed\System.Text.Encodings.Web.dll" "--target=Temp\StagingArea\Data\Managed\nunit.framework.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.Logging.Abstractions.dll" "--target=Temp\StagingArea\Data\Managed\Newtonsoft_1.Json.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Maps.Unity.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Client.Core.dll" "--target=Temp\StagingArea\Data\Managed\System.Threading.Tasks.Extensions.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Bcl.AsyncInterfaces.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.Options.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Client.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.DependencyInjection.Abstractions.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.Http.Connections.Client.dll" "--target=Temp\StagingArea\Data\Managed\Newtonsoft.Json.dll" "--target=Temp\StagingArea\Data\Managed\TestLibrary.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.Http.Connections.Common.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Input.DotNet.dll" "--target=Temp\StagingArea\Data\Managed\System.Runtime.CompilerServices.Unsafe.dll" "--target=Temp\StagingArea\Data\Managed\System.Text.Json.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.DependencyInjection.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.Connections.Abstractions.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.Extensions.Primitives.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.SignalR.Common.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.AspNetCore.Http.Features.dll" "--target=Temp\StagingArea\Data\Managed\MessagePack.Annotations.dll" "--target=Temp\StagingArea\Data\Managed\System.Threading.Channels.dll" "--additionalreferences=Temp\StagingArea\Data\Managed,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X86,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\ARM,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM64,Temp\StagingArea\Data\Managed\Plugins\X64,Temp\StagingArea\Data\Managed\Plugins\ARM64" "--platform=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0\Facade\Windows.winmd" "--dbg=pdb" "--framework=Temp\StagingArea\Data\Managed" "--alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.ComponentModel.Composition;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Concurrent,mscorlib;System.Collections.Concurrent,System;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,System;System.Collections.Specialized,System;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.ComponentModel.DataAnnotations.Schema,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Diagnostics.Contracts,mscorlib;System.Diagnostics.Tracing,mscorlib;System.Dynamic,System.Core;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO,System.Runtime.WindowsRuntime.UI.Xaml;System.IO.Compression,System;System.IO.Compression,System.IO.Compression.FileSystem;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Numerics,System.Numerics;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.ExceptionServices,mscorlib;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices,System.Core;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.InteropServices.WindowsRuntime,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.Runtime.Serialization;System.Runtime.Versioning,mscorlib;System.Runtime.Versioning,System;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Authentication.ExtendedProtection,System;System.Security.Claims,mscorlib;System.Security.Principal,mscorlib;System.ServiceModel,System.ServiceModel;System.ServiceModel.Channels,System.ServiceModel;System.ServiceModel.Description,System.ServiceModel;System.ServiceModel.Dispatcher,System.ServiceModel;System.ServiceModel.Security,System.ServiceModel;System.ServiceModel.Security.Tokens,System.ServiceModel;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Threading.Tasks,mscorlib;System.Threading.Tasks,System.Core;System.Windows.Input,System;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml;,Windows.winmd;,Windows.AI.MachineLearning.MachineLearningContract.winmd;,Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract.winmd;,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;,Windows.ApplicationModel.Calls.CallsPhoneContract.winmd;,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;,Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd;,Windows.ApplicationModel.StartupTaskContract.winmd;,Windows.Devices.Custom.CustomDeviceContract.winmd;,Windows.Devices.DevicesLowLevelContract.winmd;,Windows.Devices.Printers.PrintersContract.winmd;,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;,Windows.Foundation.FoundationContract.winmd;,Windows.Foundation.UniversalApiContract.winmd;,Windows.Gaming.XboxLive.StorageApiContract.winmd;,Windows.Graphics.Printing3D.Printing3DContract.winmd;,Windows.Networking.Connectivity.WwanContract.winmd;,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;,Windows.Security.Isolation.IsolatedWindowsEnvironmentContract.winmd;,Windows.Services.Maps.GuidanceContract.winmd;,Windows.Services.Maps.LocalSearchContract.winmd;,Windows.Services.Store.StoreContract.winmd;,Windows.Services.TargetedContent.TargetedContentContract.winmd;,Windows.Storage.Provider.CloudFilesContract.winmd;,Windows.System.Profile.ProfileHardwareTokenContract.winmd;,Windows.System.Profile.ProfileSharedModeContract.winmd;,Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd;,Windows.System.SystemManagementContract.winmd;,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;,Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd;,Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd;,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;,Windows.ApplicationModel.FullTrustAppContract.winmd;,Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract.winmd;,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;,Windows.ApplicationModel.Search.SearchContract.winmd;,Windows.ApplicationModel.Wallet.WalletContract.winmd;,Windows.Devices.Portable.PortableDeviceContract.winmd;,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;,Windows.Devices.Scanners.ScannerDeviceContract.winmd;,Windows.Devices.Sms.LegacySmsApiContract.winmd;,Windows.Gaming.Input.GamingInputPreviewContract.winmd;,Windows.Gaming.Preview.GamesEnumerationContract.winmd;,Windows.Gaming.UI.GameChatOverlayContract.winmd;,Windows.Gaming.UI.GamingUIProviderContract.winmd;,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;,Windows.Management.Deployment.Preview.DeploymentPreviewContract.winmd;,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;,Windows.Media.AppBroadcasting.AppBroadcastingContract.winmd;,Windows.Media.AppRecording.AppRecordingContract.winmd;,Windows.Media.Capture.AppBroadcastContract.winmd;,Windows.Media.Capture.AppCaptureContract.winmd;,Windows.Media.Capture.AppCaptureMetadataContract.winmd;,Windows.Media.Capture.CameraCaptureUIContract.winmd;,Windows.Media.Capture.GameBarContract.winmd;,Windows.Media.Devices.CallControlContract.winmd;,Windows.Media.MediaControlContract.winmd;,Windows.Media.Playlists.PlaylistsContract.winmd;,Windows.Media.Protection.ProtectionRenewalContract.winmd;,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;,Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd;,Windows.Perception.Automation.Core.PerceptionAutomationCoreContract.winmd;,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;,Windows.System.Profile.ProfileRetailInfoContract.winmd;,Windows.System.UserProfile.UserProfileContract.winmd;,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;,Windows.UI.Core.CoreWin

SignalR Not Messaging Telemetry to Unity: broadcast azure function not firing when telemetry comes through ADT from device sim

I've gone through every step twice and have not been able to see any data come through to Unity in editor mode. It seems the event grid topic that ADT has an endpoint to is not receiving any events when telemetry gets sent from the device simulator to IoT Hub.

Attached are some screenshots of the different resources that I think might be involved.

If anyone has any idea why this step in the stack is not working I'd love to know!

Screenshot 2021-07-13 202030
Screenshot 2021-07-13 202201
Screenshot 2021-07-13 202304
Screenshot 2021-07-13 200929
Screenshot 2021-07-13 201008

There are no package files to open unity project.

Hi,

Thank you for providing the great project!
I've joined the build session!, and I really had a good time.

I try this project, but I guess that Not enough package files in this project.
Maybe I Guess that you set the required package using MR Feature Tool.
MR feature tool is update the manifest.json, and download package files(*.tgz). This project don't find these download files.
(usually, this files is in Packages\MixedReality folder)

manifest.json is written the below:

{
  "scopedRegistries": [
    {
      "name": "Maps SDK for Unity",
      "scopes": [
        "com.microsoft.maps"
      ],
      "url": "https://unity.virtualearth.net/npm/registry/"
    }
  ],
  "dependencies": {
    "com.microsoft.maps.unity": "0.10.1",
    "com.microsoft.mixedreality.input": "file:MixedReality/com.microsoft.mixedreality.input-0.9.2006.tgz",
    "com.microsoft.mixedreality.openxr": "file:MixedReality/com.microsoft.mixedreality.openxr-0.9.5.tgz",
    "com.microsoft.mixedreality.toolkit.extensions": "file:MixedReality/com.microsoft.mixedreality.toolkit.extensions-2.6.1.tgz",
    "com.microsoft.mixedreality.toolkit.foundation": "file:MixedReality/com.microsoft.mixedreality.toolkit.foundation-2.6.1.tgz",
    "com.microsoft.mixedreality.toolkit.gpustats": "file:MixedReality/com.microsoft.mixedreality.toolkit.gpustats-1.0.3.tgz",
    "com.microsoft.mixedreality.toolkit.planefinding": "file:MixedReality/com.microsoft.mixedreality.toolkit.planefinding-1.0.0.tgz",
    "com.microsoft.mixedreality.toolkit.standardassets": "file:MixedReality/com.microsoft.mixedreality.toolkit.standardassets-2.6.1.tgz",
    "com.microsoft.spatialaudio.spatializer.unity": "file:MixedReality/com.microsoft.spatialaudio.spatializer.unity-1.0.196.tgz",
...

I guess that you may want to upload MixedReality folder, or change the step to use MR feature tool in Microsoft Learn.

image

Best regards

mxchip press button send signal to Azure IoT

Can someone share an example or guidance how I can add that when a button in the mxchip IoT device is pressed the signal is sent to Azure IoT? I'm using this example to send devkit data to IoT hub.

I see the function in board_init.c that lights up the led:

`weak void button_a_callback()
{

WIFI_LED_ON();
AZURE_LED_ON();
USER_LED_ON();
if (BUTTON_A_IS_PRESSED)
{
val += 32;
if (val > 2047)
val = 2047;
RGB_LED_SET_R(val);
RGB_LED_SET_G(val);
RGB_LED_SET_B(val);
}
//set_led_state(true); I'd like to add something like this`
}

and in nx_client.c to set the led state (true or false) when the command is received from Azure IoT:

static void set_led_state(bool level) { if (level) { printf("\tLED is turned ON\r\n"); HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET); } else { printf("\tLED is turned OFF\r\n"); HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); } }

How can I link these two functions, meaning from button_a_callback to call nx_client.c set_led_state function?

Thanks a bunch

azuredeploy.bicep issue

I'm having a issue with the azure deploy.bicep, deployment have done as instructed and exactly as the tutorial but have consistently received the same error. Thanks for any help

Here is out put from running the azure deploy.bicep

C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(6,16) : Warning no-loc-expr-outside-params: Use a parameter here instead of 'resourceGroup().location'. 'resourceGroup().location' and 'deployment().location' should only be used as a default value for parameters. [https://aka.ms/bicep/linter/no-loc-expr-outside-params]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(16,5) : Warning no-unused-vars: Variable "eventGridName" is declared but never used. [https://aka.ms/bicep/linter/no-unused-vars]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(75,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'storage'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(154,105) : Warning BCP241: The "providers" function is deprecated and will be removed in a future release of Bicep. Please add a comment to Azure/bicep#2017 if you believe this will impact your workflow.
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(158,105) : Warning BCP241: The "providers" function is deprecated and will be removed in a future release of Bicep. Please add a comment to Azure/bicep#2017 if you believe this will impact your workflow.
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(176,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'adt'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(178,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'appInsights'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(192,25) : Warning BCP081: Resource type "Microsoft.Web/sites/extensions@2015-08-01" does not have types available.
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(200,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'funcApp'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(212,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'iot'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(253,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'eventGridIngestTopic'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(256,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'funcApp'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(306,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'funcApp'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(333,13) : Warning no-loc-expr-outside-params: Use a parameter here instead of 'resourceGroup().location'. 'resourceGroup().location' and 'deployment().location' should only be used as a default value for parameters. [https://aka.ms/bicep/linter/no-loc-expr-outside-params]
C:\Users\blank\Desktop\mslearn-mr-adt-in-unity\ARM-Template\azuredeploy.bicep(353,5) : Warning no-unnecessary-dependson: Remove unnecessary dependsOn entry 'iot'. [https://aka.ms/bicep/linter/no-unnecessary-dependson]

{"code": "InvalidTemplate", "message": "Deployment template validation failed: 'The template resource '' of type 'Microsoft.Authorization/roleAssignments' at line '344' and column '5' is not valid. The name property cannot be null or empty. Please see https://aka.ms/arm-template/#resources for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 344, "linePosition": 5, "path": "properties.template.resources[17]"}}]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.