A very simple first step

The HoloLens networking system that we will be working on has been designed for the HoloToolkit--Unity by Microsoft and a few community members. If the goal was to do a good deal of heavy lifting, then our mission is accomplished. A single Prefab does all the initial setup we will need.

So, let's put the sharing Prefab in the project and then learn about what it does:

  1. Go to your HoloToolKit Sharing | Prefabs directory in the Project window.
  2. Now, drag and drop the Sharing Prefab into your Hierarchy view, anywhere under the skee object.

Great! Pretty simple as first steps go. Now that we have it in our project, let's take a look and see what it does.

So, like all GameObjects it of course has a Transform. Other than that, it has two other components, Sharing Stage and Auto Join Session. For the most part, we will not change these options, but we should go over them so that you have some understanding of their purpose:

The following list explains all of the options from the preceding screenshot:

  • SharingStage:  A component designed to manage the core networking for our application. It handles the auto discovery, error logging, and session and session user management, among other things.
  • Client Role: This has two options, Primary and Secondary. The Primary option connects directly to a session server which is an executable that comes with the HoloToolkit. The Secondary option connects to a Primary. It is a far simpler implementation that cannot manage the session. We will leave our set as Primary.
  • Server Address: This is the IP address of the server. Internet-savvy people will understand what this means. This will be the IP address of the computer running the server software.
  • Server Port: This is the port that goes along with that IP address. Generally speaking, most programs that use Internet connections tend to find a port range and stay there.
  • Connect On Awake: Should this component attempt to connect to the server the moment it starts or should it wait till you say go?
  • Auto Discover Server: This is switched off by default. This option implements a system of listeners actively looking for a server to appear on your local network.
  • Ping Interval Sec: This tells the Auto Discover feature how often to ping in its search efforts.
  • Is Audio Endpoint: This determines whether the app will be providing audio input or output.
  • Show Detailed Logs: This is a very useful tool when you are trying to track down an issue; I keep it on all the time.
  • AutoJoinSession: Normally, when joining games or other applications on a network, there is a login process, rooms, and user rights. This class handles that work on its own.
  • Session Name: This is the name the software will be looking to match during the process of trying to connect. In our case, change the name from Default to HBG.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.36.30