private void Start() { current = this; // Read in all neccessary data ReadDisplayTrackerConfigs(); ReadHoloLensConfigs(); // Get the Holoport if it exists if (PlatformConfig.current.globals.ContainsKey("holoPort")) { holoPort = (int)PlatformConfig.current.globals["holoPort"]; } // Set up the tracking to displays if available if (displayTrackerConfigs != null) { SetUpDisplayTrackers(); } if (holoLensConfigs != null) { // Only create singleton if it will be used HoloLens.current = new HoloLens(); #if UNITY_WSA // Get the device it exists on this node if (HoloLens.current.display != null) { var remote = HoloLens.current.display.HoloLensData().remote; // Set up the holoLens now or wait for remoting if (remote == null) { HoloLens.current.Enable(); } else { HolographicRemoting.Connect(remote.address, remote.maxBitRate); } } #endif } }
private void Awake() { current = this; // Get the configuration platformJSON = GetPlatformJSON(); if (platformJSON != null) { // Get the holo port if available or use 6668 JSONNode json = platformJSON["cluster"]; if (json != null) { json = json["holo_port"]; if (json != null) { holoPort = json.AsInt; } } } }