Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Show device tracking status to the user on mobile devices and cleanup UI #223

Merged
merged 16 commits into from
Oct 2, 2019

Conversation

chrisfromwork
Copy link
Contributor

@chrisfromwork chrisfromwork commented Sep 23, 2019

There has been some confusion around tracking/not tracking and marker detection logic. This review is a first attempt to try and mitigate these issues. It contains the following:

Tracking:

  1. ITrackingObserver and TrackingObserver now exist. These interfaces/classes allow declaring MonoBehaviours that monitor device tracking state for HoloLens, iOS and Android
  2. HoloLensTrackingObserver, ARKitTrackingObserver and ARCoreTrackingObserver have been created to monitor tracking.
  3. SpatialCoordinateSystemManager now contains a TrackingState parameter that can used to locate TrackingObservers in the scene and report the device's tracking state. This allows UI to display to end users whether or not their device has lost tracking.
  4. SpatialCoordinateSystemParticipants now report their tracking state based on TrackingObservers. This allows Android and iOS devices to relay true tracking information to peer devices.

UI Improvements:

  1. We now show device tracking information to users on mobile devices.
  2. UI can now be viewed and interacted with in the editor
  3. Mobile Network Configuration Visual and Mobile Recording Service Visual have been replaced with Default Mobile Network Configuration Visual and Default Mobile UI.
  4. UI has been modified to align with design guidance provided by MRTK designers.
  5. Mobile recording can now be stopped during the countdown.
  6. Marker visual prefabs now listen to device tracking state. When devices lose tracking, these visuals now display error overlays to inform the user to try and fix device tracking issues.

Breaking Change Details:

Notes:

This change has two primary breaking changes.

  1. Mobile UI prefabs have been replaced, this was done to get a cleaner UI experience that works and better across different device scaling.

Migration Instructions:

  1. Any references to Mobile Recording Service Visual and Mobile Network Configuration Visual will need to be updated to Default Mobile UI and Default Mobile Network Configuration Visual. Code changes may be required if any of the SpectatorView\Scripts\UI scripts were referenced/used outside of these prefabs.

  2. HolographicCamera.Unity will need to be recompiled/deployed for tracking/spatial coordinate information to be correctly reported to the spectator view compositor. This now uses the ITrackingObserver MonoBehaviour.

@chrisfromwork chrisfromwork added the breaking change Pull request contains a breaking change and requires additional information. label Sep 23, 2019
@matthejo
Copy link
Contributor

        return false;

If UNITY_EDITOR is true, will this produce a warning about unreachable code? might be worth putting all of this in an #else block


Refers to: src/SpectatorView.Unity/Assets/SpectatorView/Scripts/ScreenRecording/AndroidRecordingService.cs:157 in 45c53e8. [](commit_id = 45c53e8, deletion_comment = False)

Copy link
Contributor

@andreiborodin andreiborodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Pull request contains a breaking change and requires additional information.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants