Hello @Samuel Kingslin Kumar A , I really like the idea of integrating Azure IoTHub with Unity 3D apps.
I hope the below information may help with your initial query. Please do comment in the below section if you need further help in this matter.
Approach 1:
You can use Microsoft.Azure.Devices.Client package, and then use DeviceClient to receive Cloud-to-Device message.
Receive messages in the device app
private static async void ReceiveC2dAsync()
{
Console.WriteLine("\nReceiving cloud to device messages from service");
while (true)
{
Message receivedMessage = await s_deviceClient.ReceiveAsync();
if (receivedMessage == null) continue;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Received message: {0}",
Encoding.ASCII.GetString(receivedMessage.GetBytes()));
Console.ResetColor();
await s_deviceClient.CompleteAsync(receivedMessage);
}
}
Approach 2:
Sensors + Raspberry Pi => IoT Hub => Storage => Api => Unity App
Approach 3:
Sensors + Raspberry Pi => IoT Hub => Publish to Service Bus Topic => Unity App(subscribe)
Approach 4:
IoT Hub-> Azure Function-> SignalR -> Unity
Build real-time Apps with Azure Functions and Azure SignalR Service
Reference to visit : Azure Functions demo for Unity
Further readings: SO link 1 SO Ref Link 2
Please do comment in the below section if you need further help in this matter.