Exemple #1
0
        /// <summary>
        /// Updates examples status text.
        /// </summary>
        private void UpdateStatusText()
        {
            _statusLabel.text = string.Format("<color=#dbfb76><b>{0} {1}</b></color>\n{2}: {3}\n",
                                              LocalizeManager.GetString("Controller"),
                                              LocalizeManager.GetString("Data"),
                                              LocalizeManager.GetString("Status"),
                                              LocalizeManager.GetString(ControllerStatus.Text));

            _statusLabel.text += string.Format(
                "\n<color=#dbfb76><b>{0} {1}</b></color>\n{2} {3}: {4}\n{5} {6}: {7}\n{8}: {9}",
                LocalizeManager.GetString("Meshing"),
                LocalizeManager.GetString("Data"),
                LocalizeManager.GetString("Render"),
                LocalizeManager.GetString("Mode"),
                LocalizeManager.GetString(_renderMode.ToString()),
                LocalizeManager.GetString("Bounded"),
                LocalizeManager.GetString("Extents"),
                LocalizeManager.GetString(_bounded.ToString()),
                LocalizeManager.GetString("LOD"),
                #if UNITY_2019_3_OR_NEWER
                LocalizeManager.GetString(MLSpatialMapper.DensityToLevelOfDetail(_mlSpatialMapper.density).ToString())
                #else
                LocalizeManager.GetString(_mlSpatialMapper.levelOfDetail.ToString())
                #endif
                );
        }
Exemple #2
0
 /// <summary>
 /// Handles the event for touchpad gesture start. Changes level of detail
 /// if gesture is swipe up.
 /// </summary>
 /// <param name="controllerId">The id of the controller.</param>
 /// <param name="gesture">The gesture getting started.</param>
 private void OnTouchpadGestureStart(byte controllerId, MLInput.Controller.TouchpadGesture gesture)
 {
     #if PLATFORM_LUMIN
     if (_controllerConnectionHandler.IsControllerValid(controllerId) &&
         gesture.Type == MLInput.Controller.TouchpadGesture.GestureType.Swipe && gesture.Direction == MLInput.Controller.TouchpadGesture.GestureDirection.Up)
     {
         #if UNITY_2019_3_OR_NEWER
         _mlSpatialMapper.density = MLSpatialMapper.LevelOfDetailToDensity((MLSpatialMapper.DensityToLevelOfDetail(_mlSpatialMapper.density) == MLSpatialMapper.LevelOfDetail.Maximum) ? MLSpatialMapper.LevelOfDetail.Minimum : (MLSpatialMapper.DensityToLevelOfDetail(_mlSpatialMapper.density) + 1));
         #else
         _mlSpatialMapper.levelOfDetail = ((_mlSpatialMapper.levelOfDetail == MLSpatialMapper.LevelOfDetail.Maximum) ? MLSpatialMapper.LevelOfDetail.Minimum : (_mlSpatialMapper.levelOfDetail + 1));
         #endif
     }
     #endif
 }