TableReference
struct in
Unity.Localization
Suggest a change
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close
Description
A serializable reference to a table collection, identified either by its name or by its collection GUID.
using Unity.Localization;
using UnityEngine;
namespace Unity.Localization.Samples
{
public class TableReferenceOverviewExample
{
public void Run()
{
TableReference byName = "UI Text"; // implicit conversion from string
TableReference byGuid = TableReference.FromGuid("6f1e2c0a9b3d4e5f8a1b2c3d4e5f6a7b");
Debug.Log(byName.ReferenceType); // Name
Debug.Log(byGuid.ReferenceType); // Guid
Debug.Log(byName.IsEmpty); // False
}
}
}
Properties
| Property |
Description |
| IsEmpty |
Whether this reference points at nothing.
|
| ReferenceType |
How this reference identifies its collection.
|
| TableCollectionName |
The name of the referenced collection, or null when the reference is empty or GUID-based.
|
| TableCollectionNameGuid |
The GUID of the referenced collection, or an empty GUID when the reference is empty or name-based.
|
Public Methods
| Method |
Description |
| Equals |
Checks whether this reference identifies the same collection as another.
|
| GetHashCode |
Computes a hash code for this reference.
|
| ToString |
Returns a readable string describing this reference.
|
Static Methods
| Method |
Description |
| FromGuid |
Creates a table reference that identifies a collection by its GUID.
|
Operators
| Operator |
Description |
| TableReference |
Converts a collection name into a name-based table reference.
|