Skip to main content

Auki::Integration::ARFoundation::CameraFrameProvider

Inherits from Auki.Integration.ARFoundation.CameraTextureProvider, MonoBehaviour

Inherited by Auki.Integration.ARFoundation.CameraFrameProviderGPU

Public Events

Name
Action< CameraFrame >OnNewFrameReady()
This event is triggered whenever there is a new Frame ready for consumption. A frame contains a set of information (including the image) captured from a camera. For further information: CameraFrame Usage: OnNewFrameReady += (frame) => { ... };.

Public Functions

Name
new CameraFrameProviderGetOrCreateComponent()
This is a static method, which does the following things for you:

Protected Functions

Name
override voidAwake()
override voidOnCameraFrameReceived(ARCameraFrameEventArgs args)

Public Attributes

Name
TransformSessionOriginTransform
The session origin transform can be set to the ARSessionOrigin or XROrigin transform. It is automatically used to convert the camera pose from ARFoundation to Unity's world space. Setting to null is allowed to skip the extra conversion. If the ARCameraManager has a parent ARSessionOrigin or XROrigin, it will be automatically set during Awake.

Additional inherited members

Public Events inherited from Auki.Integration.ARFoundation.CameraTextureProvider

Name
Action< Texture >OnNewTextureReady()
This event is triggered whenever there is a new Texture ready for consumption.

Public Functions inherited from Auki.Integration.ARFoundation.CameraTextureProvider

Name
TextureGetLastFrameTexture()
Call this method to return the latest available Texture.

Protected Functions inherited from Auki.Integration.ARFoundation.CameraTextureProvider

Name
virtual voidOnEnable()
Subscribes to the ARCameraManager's frameReceived event when the component is enabled.
virtual voidOnDisable()
Unsubscribes from the ARCameraManager's frameReceived event when the component is disabled.
voidProcessFrame(ARCameraFrameEventArgs frameInfo)
Processes the ARCameraFrameEventArgs to generate a new frame texture.
TGetOrCreateComponent< T >()
This is a helper extension method, which does the following things for you:

Public Attributes inherited from Auki.Integration.ARFoundation.CameraTextureProvider

Name
ARCameraManagerArCameraManager
AR Camera Manager necessary to supply camera frames.
longTimerMs
The minimum amount of time that should pass between each provided texture (in Milliseconds). This effectively throttles the frame gathering from ARFoundation, dropping the frames in between. Default value is 0 = provide a new texture as soon as it is available.
CameraArCamera
Camera being used by ARCameraManager.

Public Events Documentation

event OnNewFrameReady

Action< CameraFrame > OnNewFrameReady()

This event is triggered whenever there is a new Frame ready for consumption. A frame contains a set of information (including the image) captured from a camera. For further information: CameraFrame Usage: OnNewFrameReady += (frame) => { ... };.

Public Functions Documentation

function GetOrCreateComponent

static new CameraFrameProvider GetOrCreateComponent()

This is a static method, which does the following things for you:

Exceptions:

  • InvalidOperationException Throws in case there is 0 or more than 1 ARCameraManager in the scene.

Return: The CameraTextureProvider component added (or already present) on the ARCameraManager GameObject

  • finds the ARCameraManager in the scene and checks that at least one and only one is active
  • gets or creates the suggested CameraTextureProvider component on the ARCameraManager object
  • returns the created CameraTextureProvider You can then attach to CameraTextureProvider your instance of Manna, so frames will be automatically fed.

Protected Functions Documentation

function Awake

override void Awake()

function OnCameraFrameReceived

override void OnCameraFrameReceived(
ARCameraFrameEventArgs args
)

Public Attributes Documentation

variable SessionOriginTransform

Transform SessionOriginTransform;

The session origin transform can be set to the ARSessionOrigin or XROrigin transform. It is automatically used to convert the camera pose from ARFoundation to Unity's world space. Setting to null is allowed to skip the extra conversion. If the ARCameraManager has a parent ARSessionOrigin or XROrigin, it will be automatically set during Awake.