Skip to content

Commit

Permalink
Merge pull request #1801 from WEKIT-ECS/ashubin/test_fixes
Browse files Browse the repository at this point in the history
calibration test fix
  • Loading branch information
cawke authored Mar 8, 2024
2 parents e7a5774 + bc849d8 commit 9d2d9e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 39 deletions.
2 changes: 2 additions & 0 deletions Assets/MirageXR/Managers/PointCloudManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public async Task<bool> InitializationAsync()

public void Unsubscribe()
{
#if UNITY_ANDROID || UNITY_IOS
EventManager.OnEditModeChanged -= SetAllPointCloudsActive;
#endif
}

public async Task<bool> ResetAsync()
Expand Down
33 changes: 5 additions & 28 deletions Assets/MirageXR/Managers/UiManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ private void OnDisable()

private void PlayerReset()
{
ClearDebug();
HideDebug();
HideMenu();
WelcomeMessage = string.Empty;
RootObject.Instance.calibrationManager.DisableCalibration();
Expand Down Expand Up @@ -149,30 +147,6 @@ private void Start()
ActionList.gameObject.SetActive(false);
}

/// <summary>
/// Clear debug console. Called from Hololens keyword manager.
/// </summary>
public void ClearDebug()
{
DebugConsole.transform.parent.SendMessage("ClearDebug", SendMessageOptions.DontRequireReceiver);
}

/// <summary>
/// Show debug console. Called from Hololens keyword manager.
/// </summary>
public void ShowDebug()
{
DebugConsole.SetActive(true);
}

/// <summary>
/// Hide debug console. Called from Hololens keyword manager.
/// </summary>
public void HideDebug()
{
DebugConsole.SetActive(false);
}

/// <summary>
/// Show selection panel.
/// </summary>
Expand Down Expand Up @@ -398,8 +372,11 @@ private void UploadActivityVoice()
/// </summary>
public void HideMenu()
{
ActionList.gameObject.SetActive(false);
IsMenuVisible = false;
if (ActionList != null)
{
ActionList.gameObject.SetActive(false);
IsMenuVisible = false;
}
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions Assets/MirageXR/Player/Scripts/RootObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private void OnDestroy()
_pointCloudManager.Unsubscribe();
_activityManager.OnDestroy();
_planeManager.Dispose();
Instance = null;
}
}
}
11 changes: 0 additions & 11 deletions Assets/UnitTests/PlayModeTests/CalibrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,9 @@ private void OnWorkplaceLoaded()

private async Task PerformCalibration(bool isEditMode)
{
// set event for completed calibration
EventManager.OnWorkplaceCalibrated += CalibrationComplete;

// put in to play mode
rootObject.activityManager.EditModeActive = isEditMode;

// then run the player calibration routine to move objects (as though the camera is the marker)
await rootObject.workplaceManager.CalibrateWorkplace();
}

private void CalibrationComplete()
{
isCalibrated = true;
EventManager.OnWorkplaceCalibrated -= CalibrationComplete;
}

/// <summary>
Expand Down

0 comments on commit 9d2d9e4

Please sign in to comment.