he present study investigates methods for integrating external APIs into the Unity development environment, with a particular focus on private API communication for real-time data visualisation from industrial IoT sensors. The research evaluates four approaches—UnityWebRequest, HttpWebRequest, HttpClient, and native JSON parsing—assessing their viability in secure, session-based enterprise scenarios. A detailed case study involving the development of an interactive Unity-based platform serves as the experimental basis for evaluating each method. The results of the study indicate significant limitations with UnityWebRequest, which consistently fails when used with private APIs, returning HTTP 403 errors due to inadequate session and cookie management. Despite the fact that HttpWebRequest offers greater flexibility and manual configuration options, it also exhibited a similar degree of unreliability, repeatedly resulting in HTTP 401 Unauthorized responses, even in instances where session cookies were explicitly configured. The HttpClient approach was the only one to demonstrate consistent success across all of the tested scenarios. The system exhibited consistent reliability in authentication processes, ensuring session persistence through effective cookie management. Furthermore, it integrated seamlessly into Unity's asynchronous architecture, thereby further enhancing its functionality. Its compact syntax and modern design further enhance its suitability for use in complex, data-driven Unity applications. The findings provide practical insights for the design of immersive, XR-enabled systems and digital twins developed in Unity within the framework of Industry 5.0. Future research directions should include the following: firstly, the identification and resolution of interoperability challenges; secondly, the enhancement of security through the adoption of decentralised architectural models.
Giuliani, F., Frizziero, L., Detratti, A. (2025). Integrating External APIs Into Unity: Methods and Applications. Southfield, Michigan : IEOM Society International, [10.46254/eu08.20250378].
Integrating External APIs Into Unity: Methods and Applications
Giuliani, Francesca
Primo
;Frizziero, LeonardoFunding Acquisition
;
2025
Abstract
he present study investigates methods for integrating external APIs into the Unity development environment, with a particular focus on private API communication for real-time data visualisation from industrial IoT sensors. The research evaluates four approaches—UnityWebRequest, HttpWebRequest, HttpClient, and native JSON parsing—assessing their viability in secure, session-based enterprise scenarios. A detailed case study involving the development of an interactive Unity-based platform serves as the experimental basis for evaluating each method. The results of the study indicate significant limitations with UnityWebRequest, which consistently fails when used with private APIs, returning HTTP 403 errors due to inadequate session and cookie management. Despite the fact that HttpWebRequest offers greater flexibility and manual configuration options, it also exhibited a similar degree of unreliability, repeatedly resulting in HTTP 401 Unauthorized responses, even in instances where session cookies were explicitly configured. The HttpClient approach was the only one to demonstrate consistent success across all of the tested scenarios. The system exhibited consistent reliability in authentication processes, ensuring session persistence through effective cookie management. Furthermore, it integrated seamlessly into Unity's asynchronous architecture, thereby further enhancing its functionality. Its compact syntax and modern design further enhance its suitability for use in complex, data-driven Unity applications. The findings provide practical insights for the design of immersive, XR-enabled systems and digital twins developed in Unity within the framework of Industry 5.0. Future research directions should include the following: firstly, the identification and resolution of interoperability challenges; secondly, the enhancement of security through the adoption of decentralised architectural models.| File | Dimensione | Formato | |
|---|---|---|---|
|
378.pdf
accesso aperto
Descrizione: conference paper
Tipo:
Versione (PDF) editoriale / Version Of Record
Licenza:
Licenza per accesso libero gratuito
Dimensione
817.75 kB
Formato
Adobe PDF
|
817.75 kB | Adobe PDF | Visualizza/Apri |
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


