Struct ARCameraFrameEventArgs
A structure for camera-related information pertaining to a particular frame. This is used to communicate information in the frameReceived event.
Implements
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
public struct ARCameraFrameEventArgs : IEquatable<ARCameraFrameEventArgs>
Properties
cameraGrainTexture
The camera grain texture effect.
Declaration
public readonly Texture cameraGrainTexture { get; }
Property Value
Type | Description |
---|---|
Texture |
disabledMaterialKeywords
The list of keywords to be disabled for the material.
Declaration
[Obsolete("disabledMaterialKeywords has been deprecated in AR Foundation version 6.0. Use disabledShaderKeywords instead.")]
public readonly List<string> disabledMaterialKeywords { get; }
Property Value
Type | Description |
---|---|
List<string> |
disabledShaderKeywords
The disabled shader keywords.
Declaration
public readonly ReadOnlyCollection<string> disabledShaderKeywords { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<string> |
displayMatrix
Gets or sets the display matrix for use in the shader used
by the ARCameraBackground.
Use displayMatrix.HasValue
to determine if this data is available.
Declaration
public Matrix4x4? displayMatrix { readonly get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4? |
enabledMaterialKeywords
The list of keywords to be enabled for the material.
Declaration
[Obsolete("enabledMaterialKeywords has been deprecated in AR Foundation version 6.0. Use enabledShaderKeywords instead.")]
public readonly List<string> enabledMaterialKeywords { get; }
Property Value
Type | Description |
---|---|
List<string> |
enabledShaderKeywords
The enabled shader keywords.
Declaration
public readonly ReadOnlyCollection<string> enabledShaderKeywords { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<string> |
exposureDuration
The exposure duration in seconds with sub-millisecond precision. Used in calculating motion blur.
Declaration
public double? exposureDuration { readonly get; set; }
Property Value
Type | Description |
---|---|
double? |
Remarks
exposureDuration can be null if platform does not support exposure duration.
exposureOffset
The offset of camera exposure. Used to scale scene lighting in post-processed lighting stage.
Declaration
public float? exposureOffset { readonly get; set; }
Property Value
Type | Description |
---|---|
float? |
Remarks
exposureOffset can be null if platform does not support exposure offset.
lightEstimation
The ARLightEstimationData associated with this frame.
Declaration
public ARLightEstimationData lightEstimation { readonly get; set; }
Property Value
Type | Description |
---|---|
ARLightEstimationData |
noiseIntensity
The camera grain noise intensity.
Declaration
public readonly float noiseIntensity { get; }
Property Value
Type | Description |
---|---|
float |
projectionMatrix
Gets or sets the projection matrix for the AR Camera. Use
projectionMatrix.HasValue
to determine if this data is available.
Declaration
public Matrix4x4? projectionMatrix { readonly get; set; }
Property Value
Type | Description |
---|---|
Matrix4x4? |
propertyNameIds
Ids of the property name associated with each texture. This is a
parallel List
to the textures list.
Declaration
public List<int> propertyNameIds { readonly get; set; }
Property Value
Type | Description |
---|---|
List<int> |
textures
The textures associated with this camera frame. These are generally external textures, which exist only on the GPU. To use them on the CPU, e.g., for computer vision processing, you will need to read them back from the GPU.
Declaration
public List<Texture2D> textures { readonly get; set; }
Property Value
Type | Description |
---|---|
List<Texture2D> |
timestampNs
The time, in nanoseconds, associated with this frame.
Use timestampNs.HasValue
to determine if this data is available.
Declaration
public long? timestampNs { readonly get; set; }
Property Value
Type | Description |
---|---|
long? |
Methods
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(ARCameraFrameEventArgs)
Tests for equality.
Declaration
public bool Equals(ARCameraFrameEventArgs other)
Parameters
Type | Name | Description |
---|---|---|
ARCameraFrameEventArgs | other | The other ARCameraFrameEventArgs to compare against. |
Returns
Type | Description |
---|---|
bool |
|
GetHashCode()
Generates a hash suitable for use with containers like HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code generated from this object's fields. |
Overrides
ToString()
Generates a string representation of this struct suitable for debug logging.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of this struct suitable for debug logging. |
Overrides
TryGetExifData(out XRCameraFrameExifData)
Get the EXIF data of the frame if possible.
Declaration
public bool TryGetExifData(out XRCameraFrameExifData exifData)
Parameters
Type | Name | Description |
---|---|---|
XRCameraFrameExifData | exifData | The EXIF data of the camera frame. |
Returns
Type | Description |
---|---|
bool |
Operators
operator ==(ARCameraFrameEventArgs, ARCameraFrameEventArgs)
Tests for equality. Same as Equals(ARCameraFrameEventArgs).
Declaration
public static bool operator ==(ARCameraFrameEventArgs lhs, ARCameraFrameEventArgs rhs)
Parameters
Type | Name | Description |
---|---|---|
ARCameraFrameEventArgs | lhs | The left-hand side of the comparison. |
ARCameraFrameEventArgs | rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(ARCameraFrameEventArgs, ARCameraFrameEventArgs)
Tests for inequality. Same as !
Equals(ARCameraFrameEventArgs).
Declaration
public static bool operator !=(ARCameraFrameEventArgs lhs, ARCameraFrameEventArgs rhs)
Parameters
Type | Name | Description |
---|---|---|
ARCameraFrameEventArgs | lhs | The left-hand side of the comparison. |
ARCameraFrameEventArgs | rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|