A System Integrated with C# Programing and Real-Time 3D Observation for Learning Virtual Reality Technology

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.


Introduction
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 [1] [2] [3].Learning systems for learning computer program-ming has been greatly developed [4] [5].
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.

Related Work
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 [6].Scratch, one of the most widely used programming environments using functional programming approach, is a learning tool with a drag-and-drop interactive environments [7].But a simple interface of drag-and-drop interaction is not enough, and it may lead students to build without considering reusability, so in the programming learning system, computational thinking as an important part is introduced, students can design their own solutions [8].The C language e-learning platform developed by the team of Munich University of Technology embeds a parameter input window and an output window right after the editor, the programmed code may be saved, executed and verified during the execution, and writes the compiler results back to the user's screen in the browser [9].The results show that students can solve practical tasks actively.By changing the initial conditions and comparing the results of practice with the expected results, free experimentation and reflection could be achieved [10].
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 to improving students' knowledge acquisition through the learning process [13].
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.

System Framework
The system is mainly divided into two modules, namely the website module C# programming module, shown in Figure 1.The website module includes the home page and the page presenting knowledge points of VR programing.The

C# Programming Module
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 Figure 2, which includes a 3D virtual scene built by using UGUI technology of Unity 3D according to the corresponding learning contents, a code editing box, buttons for help linking.

Website Home Page
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 Figure 3) to download the C# programming package.

Knowledge Points Webpage
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 Figure 4), and the students can read the corresponding knowledge.The virtual 3D scene in C# programming module (shown in Figure 2) corresponds to a knowledge point.Each knowledge point webpage generally introduces the principle, and then shows the relevant example code and the 3D dynamic effect diagram.
Finally, there are links to blog posts related to this knowledge point.

The Implementation and Results
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.
Figure 3. Website homepage of the learning system.
The learning process is shown in Figure 5.The first step of a usual learning process is to download and run the C# programming module, making it ready for code writing.As the second step, the students then open the reading materials to learn the knowledge points.The third step, which is also the most significant step, is to practice the C# programming according to the basic principle, for example, the transform method of game objects in 3D scenes.At this step, the students can correct their codes step by step under the tutoring provided by the system until the compilation success is achieved (shown in Figure 6).Then, the students can modify the codes and watch the 3D scene to understand how it works, as shown in Figure 7.

Conclusions
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.

Figure 1 .
Figure 1.Framework of the system.
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.

Figure 2 .
Figure 2. A screen shot of the GUI for C# programming module.

Figure 4 .
Figure 4. Webpage for knowledge points corresponded with the learning contents.

Figure 6 .
Figure 6.(a) Error information when the code is compiled error; (b) Feedback information when the code is compiled successfully.

Figure 7 .
Figure 7. 3D presentation for the results of C# programming.
[12]ollect 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[11].Students can easily understand concepts through participation and interaction.Studies have shown that by analyzing the design of tutorial components and entertainment components, in contrast to games, the learning environment is characterized by extensive learning support and an obvious programming focus[12].At the same time, timely feedback can improve students' enthusiasm for learning.In the research of Intelligent Tutoring System Based on flow chart, a Tic-tac-toe online game is designed, which applies the decision process of Bayesian network.Students interested interact with the game and get back the feedback or response immediately.The results show that providing feedback information is more conducive X. R. Li et al.DOI: 10.4236/jss.2019.73009129 Open Journal of Social Sciences game enable students