PropertyDatabaseRecordKey
The key of a record that is stored in the PropertyDatabase.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Struct
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
- Implements: IComparable<PropertyDatabaseRecordKey>, IEquatable<PropertyDatabaseRecordKey>
public readonly struct PropertyDatabaseRecordKey : IComparable<PropertyDatabaseRecordKey>, IEquatable<PropertyDatabaseRecordKey>
Remarks
A key is a numerical value that represents a description of the property being stored in the PropertyDatabase. It is composed of two parts, the document key and the property key.
The document key represents what document owns the property, and the property key represents the property itself. For example, if you wish to store the size of a file, the file would be the document and the size would be the property. You can use any value for your documents, as long as it is consistent when storing multiple properties of a single document. You can also not use a document, in which case the document key will be 0.
We provide multiple helper functions to help create record keys, see PropertyDatabase.CreateRecordKey, PropertyDatabase.CreateDocumentKey and PropertyDatabase.CreatePropertyHash.
Fields
Value | Description |
|---|---|
| documentKey | The key of the document owning the property. |
| propertyKey | The key of the property. |
Constructors
Constructor | Description |
|---|---|
| PropertyDatabaseRecordKey(System.UInt64,UnityEngine.Hash128) | Constructs a new record key. |
Static Properties
Property | Description |
|---|---|
| size | The size of the key, in bytes. |
Methods
Method | Description |
|---|---|
| CompareTo | Compares the record key to another record key. |
| Equals | Tests equality with another record key. |
| GetHashCode | Gets the hashcode of the key. |
Operators
Operator | Description |
|---|---|
| operator == | The equals operator. |
| operator > | The greater than operator. |
| operator != | The not equal operator. |
| operator < | The less than operator. |