ARPlaybackManager
Provides access to session playback functionality.
Summary
Inheritance
Inherits from:UnityEngine::MonoBehaviour
Properties |
|
---|---|
PlaybackStatus
|
Gets the current state of the playback.
|
Public functions |
|
---|---|
GetUpdatedTrackData(Guid trackId)
|
List< TrackData >
Gets the set of data recorded to the given track available during playback on this frame.
|
SetPlaybackDataset(string datasetFilepath)
|
Deprecated.
Please use SetPlaybackDatasetUri(Uri) instead. Sets an MP4 dataset file to playback instead of using the live camera feed and IMU sensor data. |
SetPlaybackDatasetUri(Uri datasetUri)
|
Sets the uri for a dataset to be played back.
|
Properties
PlaybackStatus
PlaybackStatus PlaybackStatus
Public functions
GetUpdatedTrackData
List< TrackData > GetUpdatedTrackData( Guid trackId )
Gets the set of data recorded to the given track available during playback on this frame.
Note, currently playback continues internally while the session is paused. Therefore, on pause/resume, track data discovered internally will be discarded to prevent stale track data from flowing through when the session resumed. Note, if the app's frame rate is higher than ARCore's frame rate, subsequent
objects may reference the same underlying ARCore Frame, which would mean the list of TrackData
returned could be the same. One can differentiate by examining TrackData.FrameTimestamp
.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns a list of
TrackData . Will be empty if none are available. |
SetPlaybackDataset
PlaybackResult SetPlaybackDataset( string datasetFilepath )
Sets an MP4 dataset file to playback instead of using the live camera feed and IMU sensor data.
Restrictions:
- Can only be called while the session is paused. Playback of the MP4 dataset file will start once the session is resumed.
- The MP4 dataset file must use the same camera facing direction as is configured in the session.
- Due to the way session data is processed, ARCore APIs may sometimes produce different results during playback than during recording and produce different results during subsequent playback sessions. For example, the number of detected planes and other trackables, the precise timing of their detection and their pose over time may be different in subsequent playback sessions.
- Once playback has started pausing the session (by disabling the
ARSession
) will suspend processing of all camera image frames and any other recorded sensor data in the dataset. Camera image frames and sensor frame data that is discarded in this way will not be reprocessed when the session is again resumed (by re-enabling theARSession
). AR tracking for the session will generally suffer due to the gap in processed data.
Deprecated. Please use SetPlaybackDatasetUri(Uri) instead.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
PlaybackResult.Success if playback filepath was set without issue. Otherwise, the PlaybackResult will indicate the error. |
SetPlaybackDatasetUri
PlaybackResult SetPlaybackDatasetUri( Uri datasetUri )
Sets the uri for a dataset to be played back.
The ARCore Session must be paused when using this method. Resume the Session for the change to take effect. The AbsoluteUri property of the Uri will be passed to ARCore to create an android.net.Uri.
The uri must point to a seekable resource.
See SetPlaybackDataset(string)
for more restrictions.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
PlaybackResult.Success if playback uri was set without issue. Otherwise, the PlaybackResult will indicate the error. |