Multi-user collaborative robotic simulation has great potential for applications in industry and education. Unity is a powerful software for simulation and online multi-user experience, which can be enhanced with third-party mathematical analysis and multiplayer servers. Unity can become a much more capable and user-friendly robotic simulation package through integration with other software. These include MATLAB for computations and the Photon Unity Engine (PUN) for online multi-user capabilities. This study developed a flexible robotic simulation framework that can be adapted to different scenarios for industrial and educational applications. Several simulation scenarios were developed to identify the most efficient data communication methods between MATLAB and Unity. TCP/IP, Shared Memory, Firebase, and MQTT, were selected to assess their performance and interaction with data in Unity and MATLAB. Next, an independent PUN application was created. Both components were integrated into the simulator for evaluation and performance optimization. The performance of this simulation framework was assessed through two case studies. The results demonstrated that the integrated framework is viable, efficient, and flexible for robotic simulation and digital twins. Future research will expand the framework by adding diverse functionalities to provide users with a better interface, enhancing its performance, and integrating additional software packages.