# XRMarkerDatabaseEntry

Represents an entry in an[XRMarkerDatabase](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRMarkerDatabase#classGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabase)with the specialized information that can be converted into a marker XRReferenceImage, then used at ARTrackedImageManager.referenceLibrary for runtime configuration.

## Summary

### Inheritance

Inherits from:`IEquatable< XRMarkerDatabaseEntry >`,`IComparable< XRMarkerDatabaseEntry >`

| ### Constructors and Destructors ||
|---|---|
| [XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#xrmarkerdatabaseentry)`(`[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)` dictionary)` Constructs a[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)which represents all markers from a given[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary). ||
| [XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#xrmarkerdatabaseentry)`(`[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)` dictionary, bool allMarkers, uint markerId, float physicalEdge)` Constructs a[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)which contains the specialized information for the conversion with a marker XRReferenceImage. ||

|                                                                                                                                                                                                                                           ### Public attributes                                                                                                                                                                                                                                           ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AllMarkers](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#allmarkers)` => _allMarkers`                                            | `bool` Gets a bool indicating whether this entry reprents all markers from[Dictionary](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#dictionary).                                                                                           |
| [Dictionary](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#dictionary)` => _dictionary`                                            | [XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary) Gets the[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)in which this entry belongs to. |
| [MarkerId](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#markerid)` => _markerId`                                                  | `uint` Gets the marker Id.                                                                                                                                                                                                                                                                               |
| [Name](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#name)` => _allMarkers ? _dictionary.ToString() : $"{_dictionary}-{MarkerId}"` | `string` Convert to the name of a XRReferenceImage which represents a marker reference of[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry).                  |
| [PhysicalEdge](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#physicaledge)` => _physcialEdge`                                      | `float` Gets the physical edege in meter.                                                                                                                                                                                                                                                                |

|                                                                                                                                                                          ### Public functions                                                                                                                                                                          ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
| [CompareTo](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#compareto)`(`[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)` other)` | `int`                      |
| [Equals](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#equals)`(object obj)`                                                                                                                                                                                                  | `override bool`            |
| [Equals](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#equals)`(`[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)` other)`       | `bool` Tests for equality. |
| [GetHashCode](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#gethashcode)`()`                                                                                                                                                                                                  | `override int`             |
| [ToString](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#tostring)`()`                                                                                                                                                                                                        | `override string`          |

|                                                                                                                                                                                                                                                                                                                 ### Public static functions                                                                                                                                                                                                                                                                                                                 ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [TryParse](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#tryparse)`(string name, out `[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)` entry)`             | `bool` Converts the string representation of a marker reference to an equivalent[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object. |
| [TryParse](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#tryparse)`(string name, float edge, out `[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)` entry)` | `bool` Converts the string representation of a marker reference to an equivalent[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object. |

## Public attributes

### AllMarkers

```c#
bool Google::XR::Extensions::XRMarkerDatabaseEntry::AllMarkers => _allMarkers
```  
Gets a bool indicating whether this entry reprents all markers from[Dictionary](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#dictionary).  

### Dictionary

```c#
XRMarkerDictionary Google::XR::Extensions::XRMarkerDatabaseEntry::Dictionary => _dictionary
```  
Gets the[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)in which this entry belongs to.  

### MarkerId

```c#
uint Google::XR::Extensions::XRMarkerDatabaseEntry::MarkerId => _markerId
```  
Gets the marker Id.

Note: It only takes effect when[AllMarkers](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#allmarkers)is not set.  

### Name

```c#
string Google::XR::Extensions::XRMarkerDatabaseEntry::Name => _allMarkers ? _dictionary.ToString() : $"{_dictionary}-{MarkerId}"
```  
Convert to the name of a XRReferenceImage which represents a marker reference of[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry).  

### PhysicalEdge

```c#
float Google::XR::Extensions::XRMarkerDatabaseEntry::PhysicalEdge => _physcialEdge
```  
Gets the physical edege in meter.

Note: it only takes effect when[AllMarkers](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#allmarkers)is not set.

## Public functions

### CompareTo

```c#
int Google::XR::Extensions::XRMarkerDatabaseEntry::CompareTo(
  XRMarkerDatabaseEntry other
)
```  

### Equals

```c#
override bool Google::XR::Extensions::XRMarkerDatabaseEntry::Equals(
  object obj
)
```  

### Equals

```c#
bool Google::XR::Extensions::XRMarkerDatabaseEntry::Equals(
  XRMarkerDatabaseEntry other
)
```  
Tests for equality.

<br />

|                                                                                                                                                                                                                                           Details                                                                                                                                                                                                                                            ||
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Parameters  | |---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `other` | The other[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)to compare against. | |
| **Returns** | `true`if the entries are equal.                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### GetHashCode

```c#
override int Google::XR::Extensions::XRMarkerDatabaseEntry::GetHashCode()
```  

### ToString

```c#
override string Google::XR::Extensions::XRMarkerDatabaseEntry::ToString()
```  

### XRMarkerDatabaseEntry

```c#
 Google::XR::Extensions::XRMarkerDatabaseEntry::XRMarkerDatabaseEntry(
  XRMarkerDictionary dictionary
)
```  
Constructs a[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)which represents all markers from a given[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary).

It can be converted to a marker XRReferenceImage and used by ARTrackedImageManager.referenceLibrary for runtime configuration.

<br />

|                                                                                                                                                                                                  Details                                                                                                                                                                                                  ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Parameters | |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `dictionary` | A predefined[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)in which this entry belongs to. | |

### XRMarkerDatabaseEntry

```c#
 Google::XR::Extensions::XRMarkerDatabaseEntry::XRMarkerDatabaseEntry(
  XRMarkerDictionary dictionary,
  bool allMarkers,
  uint markerId,
  float physicalEdge
)
```  
Constructs a[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)which contains the specialized information for the conversion with a marker XRReferenceImage.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ||
|------------| |
| Parameters | |----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `dictionary`   | A predefined[XRMarkerDictionary](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)in which this entry belongs to. | | `allMarkers`   | A bool indicating whether to track all markers from the*dictionary*.                                                                                                        | | `markerId`     | When*allMarkers* is not set, specify the marker id from the*dictionary*.                                                                                                    | | `physicalEdge` | When*allMarkers*is not set, specify the physical Edge (meters).                                                                                                             | |

## Public static functions

### TryParse

```c#
bool Google::XR::Extensions::XRMarkerDatabaseEntry::TryParse(
  string name,
  out XRMarkerDatabaseEntry entry
)
```  
Converts the string representation of a marker reference to an equivalent[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                  Details                                                                                                                                                                                                                                                                                                                                                                                                                                                  ||
|-------------| |
| Parameters  | |---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `name`  | The name of the marker reference to use for parsing.                                                                                                                                                                                                                             | | `entry` | When this method returns`true`, contains an[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object that represents the parsed value. | |
| **Returns** | Returns`true`if the conversion succeeded;`false`otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

### TryParse

```c#
bool Google::XR::Extensions::XRMarkerDatabaseEntry::TryParse(
  string name,
  float edge,
  out XRMarkerDatabaseEntry entry
)
```  
Converts the string representation of a marker reference to an equivalent[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object.

*edge*The physical edge in meters of the output.

|                                                                     Details                                                                     ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------|
| Parameters | |--------|------------------------------------------------------| | `name` | The name of the marker reference to use for parsing. | |

<br />

|                                                                                                                                                                                                                                                                                                  Details                                                                                                                                                                                                                                                                                                   ||
|-------------| |
| Parameters  | |---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `entry` | When this method returns`true`, contains an[XRMarkerDatabaseEntry](https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRMarkerDatabaseEntry#structGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabaseEntry)object that represents the parsed value. | |
| **Returns** | Returns`true`if the conversion succeeded;`false`otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |