Struct XRReferenceImage
Syntax
[Serializable]
public struct XRReferenceImage : IEquatable<XRReferenceImage>
Constructors
XRReferenceImage(SerializableGuid, SerializableGuid, Nullable<Vector2>, String, Texture2D)
Declaration
public XRReferenceImage(SerializableGuid guid, SerializableGuid textureGuid, Vector2? size, string name, Texture2D texture)
Parameters
Properties
guid
The Guid
associated with this image.
Declaration
public Guid guid { get; }
Property Value
height
The height of the image, in meters.
Declaration
public float height { get; }
Property Value
name
A name associated with this reference image.
Declaration
public 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 Vector2 size { get; }
Property Value
specifySize
Must be set to true for size to be used.
Declaration
public 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 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 Guid textureGuid { get; }
Property Value
width
The width of the image, in meters.
Declaration
public float width { get; }
Property Value
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
Equals(XRReferenceImage)
Declaration
public bool Equals(XRReferenceImage other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
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.
|
Overrides
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