With the rapid development of virtual reality technology (VR), application systems based on VR have been demonstrated in wide fields, which therefore make it attractive to many university students. The process of learning VR requires intensive programing and intuitive observation as well as strict understanding of basic concepts, significantly different to that of other courses. The current widely used framework of learning system is not suitable to the VR learning. In this paper, we present a learning platform based on Unity 3D for VR learning. This system combines knowledge learning, real-time interaction between virtual scene control and C# writing/compiling. Compared with other learning systems, this system can greatly promote the learning enthusiasm and efficiency for C# programming in 3D VR applications.
The traditional method in classroom teaching faces many practical problems, such as low teaching efficiency for teachers and low learning enthusiasm for students. With the rapid development of computer and information technology, in order to solve this problem, the computer learning systems have received extensive attention for their convenience, intuitiveness, efficiency and interactive advantages,and have become a promising learning tool in the field of education. Some teams have developed different types of learning systems for courses such as physical chemistry experiments, computer technology, electronic and electrical engineering [
In recent years, 3D virtual reality technology (VR) has gradually become a hot field. However, the basic problems involved in VR are mostly abstract and difficult to understand, such as virtual scenes, physical effects, animation and human-computer interaction, and there is no real-time 3D observation, this is the reasons why students cannot really understand the concepts of 3D simulation, and become an obstacle to programming learning and stimulating students’ learning motivation. In the existing programming learning system, there is no system to compile the code written by the students in real time to control the objects in the virtual scene, so this method has great development potential in the programming learning system.
In order to realize the above method, this paper designs a VR learning platform for Unity 3D, which as a powerful development tool is widely used in VR field. This platform has a Unity 3D programming interface, which sends C# codes to the console for compiling through Socket communication. If the compilation is successful, the console compiles the code into a DLL file. The system then creates class objects in the DLL file by reflection technology, and dynamically applies these objects to game objects in the 3D scene. The interactive interface can be linked to the corresponding website with learning resources. The advantage of this method is that students can learn programming directly and easily, and obtain learning resources on the Internet, which greatly changes the shortcomings of traditional teaching methods.
The learning systems for computer programming employed different learning modes, for example, an C++ object-oriented programming laboratory course with framework-assisted is a highly effective way for students to broadening and deepening their object-oriented programming skills [
The integration of computer games into the learning system has been verified by a number of studies as a student-centered learning platform. Educational computer game will provide an interaction context for the students. Role-playing game enable students to collect necessary knowledge in the course of games to solve the problems in learning object-oriented programming, and students could get back the feedback or response immediately [
From the above related work, it is important for students to acquire important knowledge concepts, to write core code independently, to compile feedback results in real time and visually display the results. Therefore, the VR learning platform designed in this paper allows students to learn VR knowledge points on the website, download the programming plugin through the website, and then carry out intuitive C# programming. Through this learning process, students can understand the core codes, master the overall coding situation, and improve their abilities of problem solving. At the same time, it can reduce students’ learning pressure and tension, and has a positive impact on students’ learning process in a more attractive virtual learning environment.
The system is mainly divided into two modules, namely the website module C# programming module, shown in
home page provides the programming package the learners can directly download. The C# programming package mainly includes a C# console compiler and a 3D scene which can dynamically response to the C# codes.
The programming package interactions with the console program through Socket communication. Students write code in the code edit box, and then send it to the console program for compilation through Socket communication. If a compilation error occurs, the error message is returned to the programming package and shown in the code edit box. If the compilation is successful, the console program compiles the code into a DLL file, and then returns the successful result to the learning platform.
As a learning platform, a clear and concise graphic user interface (GUI) of C# programming module will help improve the learning experience for students. A screen shot of this GUI is shown in
Socket communication realizes the exchange of data between two applications on the network through a two-way communication connection. Here, the C# console module is used as the local server side of socket communication, and run to compile the codes from Unity 3D. Socket technology is used to realize the functionality of receiving and sending data on the server side, and then a class of compiling code and the method of compiling function are redefined. The server side receives the string code from Unity 3D and passes it into the method to compile the code. The compilation results are returned regardless of whether there is a compilation error.
The website provides learners with an entrance to start the process of learning, including “Home”, “Unity 3D”, “C#” and “Download”. “Unity 3D” provides main contents of Unity 3D knowledge. On “Home”, students will see a video of instructions for the steps of programming, and then can click the "Download" button (shown in
The “Unity 3D” button presents the text reading about the learning content, and through which the students can choose one topic to begin with his learning. At this moment, a new page called “Knowledge Points Webpage” (shown in
In this section, we introduce the implementation of the learning system based on the design framework described above. Unity 3D is currently a popular development engine in the field of VR, and it is based on the concept of component. Therefore, it is very important for students to understand and master these various components. Here, the transform of 3D game objects is chosen as the learning content of this system to describe the system implementation. Through learning, students should understand the concepts and master the concerned C# programming to control the transform of 3D game objects in different coordinate systems.
The learning process is shown in
Real-time compiling of source codes to control and watch the game objects in the 3D scene is proposed in this paper for the VR learning. Through combining knowledge points and C# programming practices into the same learning platform, this system can greatly improve the learning efficiency and enthusiasm of the students.
The development of this learning system is at the beginning stage. Our future work will be focused on three aspects: 1) expanding the learning contents to cover all of basic knowledge for VR programming; 2) designing an intelligent tutoring module and further enhancing the interaction between the platform and students; 3) embedding the C# programming module into the webpage to realize the online programming.
This work is supported by “Guangdong Innovation Program for Postgraduate Education (No.2017SFKC-01)”.
The authors declare no conflicts of interest regarding the publication of this paper.
Li, X.R., Liu, D.F. and Zhang, X.Y. (2019) A System Integrated with C# Programing and Real-Time 3D Observation for Learning Virtual Reality Technology. Open Journal of Social Sciences, 7, 127-135. https://doi.org/10.4236/jss.2019.73009