FramePlayer Class

Description

MonoBehaviour which controls InputFramePlayer in the scene, providing a few extensions in the Unity environment. There is no need to use InputFramePlayer directly.


MonoBehaviour Messages

protected override void Awake()

protected override void OnEnable()

protected override void OnDisable()

private void OnApplicationPause(bool pause)

protected virtual void OnDestroy()


Fields

FilePathType

C#

public WritablePathType FilePathType

File path type. Set before OnEnable or ARSession.Start .

FilePath

C#

public string FilePath

File path. Set before OnEnable or ARSession.Start .


Properties

Type

C#

public override Optional< InputFrameSourceType > Type { get; }

Frame source type. Usually can be used only after device created.

IsAvailable

C#

public override Optional<bool> IsAvailable { get; }

If the frame source is available.

If the value equals null, FrameSource.CheckAvailability must be called and the value can be accessed after Coroutine finish. This property is used by ARComponentPicker when picking frame source.

AvailableCenterMode

C#

public override IReadOnlyList< ARSession.ARCenterMode > AvailableCenterMode { get; }

Available center mode of the frame source.

IsCompleted

C#

public bool IsCompleted { get; }

Whether the playback is completed.

Length

C#

public float Length { get; }

Total expected playback time. The unit is second.

Time

C#

public float Time { get; }

Current time played.

WorldRoot

C#

public WorldRootController WorldRoot { get; set; }

The object Camera move against, will be automatically get from the scene or generate if not set.

Origin

C#

public override GameObject Origin { get; }

Origin of ARSession if the frame source can output motion tracking data.

Each type of motion tracking frame source has its own method to set the origin object containing some specific component. Some frame source will automatic pick a usable object from active objects in the scene or generate an object if the value is not set.

Camera

C#

public virtual Camera Camera { get; set; }

Camera used by the frame source in an ARSession .

Each type of frame source has its own method to check if the camera is usable, and will reject value set if the camera is not usable by the frame source. This property is used by ARComponentPicker when picking frame source to determine if the frame source is available, and some frame source will automatic pick a usable Camera from active objects in the scene in the process if the value is not set. You can set this value to a usable Camera before session start. The value cannot be changed after ARSession is ready if the frame source is selected in the session.


Methods

Play

C#

public bool Play()

Start eif file playback.

Stop

C#

public void Stop()

Stop eif file playback.

Pause

C#

public void Pause()

Pause eif file playback.

CheckAvailability

C#

public virtual System.Collections.IEnumerator CheckAvailability()

Coroutine to check frame source availability when FrameSource.IsAvailable equals null.