Struct XRReferenceImage
Represents an entry in an XRReferenceImageLibrary.
Implements
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
[Serializable]
public struct XRReferenceImage : IEquatable<XRReferenceImage>
Remarks
A reference image is an image to look for in the physical environment.
The XRReferenceImage does not directly reference a Texture2D
or other image data; it only stores the GUID of the Texture2D
as it
appears in the AssetDatabase
. At build time, platform-specific build steps
can use the GUIDs to look up the source textures and generate an appropriate
image database. At runtime, detected images can be matched up with the source
XRReferenceImage.
Constructors
Name | Description |
---|---|
XRReferenceImage(SerializableGuid, SerializableGuid, Vector2?, string, Texture2D) | Constructs a XRReferenceImage. |
Properties
Name | Description |
---|---|
guid | The Guid associated with this image. |
height | The height of the image, in meters. |
name | A name associated with this reference image. |
size | The size of the image, in meters. This can improve image detection, and might be required by some platforms. |
specifySize | Must be set to true for size to be used. |
texture | The source texture which this reference image represents.
This may be |
textureGuid | The Guid of the source texture as it appears in the AssetDatabase in the Editor. |
width | The width of the image, in meters. |
Methods
Name | Description |
---|---|
Equals(object) | Tests for equality. |
Equals(XRReferenceImage) | Tests for equality. |
GetHashCode() | Generates a hash suitable for use with containers like |
ToString() | Provides a string representation suitable for debug logging. |
Operators
Name | Description |
---|---|
operator ==(XRReferenceImage, XRReferenceImage) | Tests for equality. Same as Equals(XRReferenceImage). |
operator !=(XRReferenceImage, XRReferenceImage) | Tests for inequality. Same as |