Struct XRReferenceImage
Syntax
public struct XRReferenceImage : IEquatable<XRReferenceImage>
Properties
guid
The Guid
associated with this image. The guid is the same as the
source Texture2D
's guid in the AssetDatabase
.
Declaration
public readonly Guid guid { get; }
Property Value
height
The height of the image, in meters.
Declaration
public readonly float height { get; }
Property Value
name
A name associated with this reference image.
Declaration
public readonly string name { get; }
Property Value
size
The size of the image, in meters. This can improve image detection,
and may be required by some platforms.
Declaration
public readonly Vector2 size { get; }
Property Value
specifySize
Must be set to true for size to be used.
Declaration
public readonly bool specifySize { get; }
Property Value
texture
The source texture which this reference image represents.
This may be null
to avoid including the texture in
the Player build if that is not desired. See
UnityEditor.XR.ARSubsystems.XRReferenceImageLibraryExtensions.SetTexture
for more details.
Declaration
public readonly Texture2D texture { get; }
Property Value
Type |
Description |
Texture2D |
|
textureGuid
The Guid
of the source texture as it appeared in the
AssetDatabase
in the Editor.
Declaration
public readonly Guid textureGuid { get; }
Property Value
width
The width of the image, in meters.
Declaration
public readonly float width { get; }
Property Value
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(XRReferenceImage)
Declaration
public bool Equals(XRReferenceImage other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
ToString()
Provides a string representation suitable for debug logging.
Declaration
public override string ToString()
Returns
Type |
Description |
String |
A string representation of the reference image.
|
Operators
Equality(XRReferenceImage, XRReferenceImage)
Declaration
public static bool operator ==(XRReferenceImage lhs, XRReferenceImage rhs)
Parameters
Returns
Inequality(XRReferenceImage, XRReferenceImage)
Declaration
public static bool operator !=(XRReferenceImage lhs, XRReferenceImage rhs)
Parameters
Returns