Hi Mariam,
You can use TCP/IP sockets to send data between MATLAB and Unity3D. In MATLAB, you can use functions like “tcpclient” and “tcpserver” to establish TCP/IP communication, enabling the transmission of numerical data or simulation outputs. In Unity3D you can utilize the “System.Net.Sockets” namespace to manage TCP connections. You can use the following file from file exchange which provides this functionality - https://www.mathworks.com/matlabcentral/fileexchange/75728-tcp-ip-connection-between-matlab-and-unity3d?s_tid=answers_rc2-2_p5_MLT