- Microsoft HoloLens Developer's Guide
- Dennis Vroegop
- 330字
- 2021-07-02 19:08:10
The role of Visual Studio in developing for the HoloLens
You might have noticed another RockOn.sln file in the top-level folder. If you open that solution, you will see that it is empty. It contains no projects at all. The reason for this is that this solution will be a place for Unity to store all C# scripts that we will write. However, these scripts are not to be compiled in Visual Studio--it will not know how to deal with them. When we build our project in Unity, it creates a new RockOn.sln file in the VS folder. That is the one we need to open.
Later, when we add scripts to our app, you will see that the scripts are copied to the new VS folder as well. That's where we will edit them, debug them, and build them. So, this is the workflow:
- Add objects and scripts to the Unity project.
- Build the Unity project for the first time, giving it a unique folder.
- Open the newly created .sln file in that new folder in Visual Studio.
- Now, when you add scripts in Unity, rebuild the Unity project, leaving Visual Studio open in the background.
- Go to Visual Studio and you will get the familiar Files have changed; do you want to reload dialog. Click Yes.
- Edit the files in Visual Studio and verify in Unity that they are changed as well.
If you double-click a script file in Unity, it will open another instance of Visual Studio to edit it. That is a waste of resources--the procedure I described earlier works more quickly and is more memory-efficient.
Now, open the RockOn.sln file in the VS folder. Note the folder structure we already described before; it should look like this:

We can build and deploy it now, but that will result in an empty scene, which I think is pretty boring, so it's time to add some items here.
- VMware View Security Essentials
- Xcode 7 Essentials(Second Edition)
- NLTK基礎(chǔ)教程:用NLTK和Python庫構(gòu)建機(jī)器學(xué)習(xí)應(yīng)用
- YARN Essentials
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- FLL+WRO樂高機(jī)器人競賽教程:機(jī)械、巡線與PID
- Learning Salesforce Einstein
- Mastering Git
- QPanda量子計(jì)算編程
- Practical Microservices
- 人人都能開發(fā)RPA機(jī)器人:UiPath從入門到實(shí)戰(zhàn)
- OpenCV 3.0 Computer Vision with Java
- PHP項(xiàng)目開發(fā)全程實(shí)錄(第4版)
- OpenStack Sahara Essentials
- Alfresco for Administrators