
The IoT Sample Project demonstrates integration of IoT devices within Unity, enabling real-time, contextualized visualization of device data.The IoT Sample Project showcases how to seamlessly integrate IoT devices within Unity, enabling contextualized, real-time visualization of device data.This project features an interactive Unity office model equipped with a variety of example sensors embedded throughout the building. It demonstrates how to extract sensor definitions from a dataset and map them to their real-world counterparts using IoT backend systems.The project demonstrates setting up IoT connections, customizing visualizations, and automating metadata mapping. It’s designed for professionals aiming to build scalable, IoT-connected Unity applications without starting from scratch. Discover how to turn abstract IoT data into insightful, contextual 3D visualizations for industries such as manufacturing, smart buildings, and beyond.You can run the project in simulated mode or connect it to an external IoT system, generating telemetry data using the provided Python example scripts.WebGL demo: https://play.unity.com/en/games/5124f0e2-a492-4904-b5d5-24e9c269ee59/iot-sample-projectAsset uses NuGet Package Manager under the MIT License; see Third-Party Notices.txt file in package for details.Asset uses M2MQTT library under the Eclipse Public License 1.0; see Third-Party Notices.txt file in package for details.Asset uses Azure Messaging EventHubs, including the following components under the MIT License; see Third-Party Notices.txt file in package for details:Azure.Messaging.EventHubsAzure.Core 1.41.0Azure.Core.Amqp 1.3.1Microsoft.Azure.Amqp 2.6.7Microsoft.Bcl.AsyncInterfaces 1.1.1System.Diagnostics.DiagnosticSource 6.0.1System.Memory.Data 1.0.2System.Reflection.TypeExtensions 4.7.0System.Threading.Channels 4.7.1System.Threading.Tasks.Extensions 4.5.4This modular framework streamlines the integration of IoT devices in Unity by connecting GameObjects to external data sources, such as real-time IoT telemetry. The project abstracts the complexities of receiving, processing, and visualizing data from multiple external systems, allowing developers to focus on core logic and user experience rather than low-level connectivity.At its core, the project provides components that map Unity GameObjects to IoT devices, enabling real-time message reception and processing from external sources. An asynchronous messaging system efficiently manages incoming telemetry data on background threads, distributing messages to the appropriate device components within Unity.The package supports MQTT communication through integration with the open-source M2MQTT library, enabling bi-directional communication with MQTT brokers. It also provides native support for Azure IoT Hub using Microsoft Azure SDKs. The architecture is extensible, making it easy for developers to add support for additional IoT protocols or custom REST APIs through a simple plugin interface.For more details about the IoT Sample, please refer to the README.Co Pilot for scripting