# FromGuid

> Creates a table reference that identifies a collection by its GUID.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

## FromGuid(string)

Creates a table reference that identifies a collection by its GUID.

```csharp
public static TableReference FromGuid(string tableCollectionNameGuid)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The GUID of the table collection to reference.

### Returns

| Type                                                                                   | Description                                               |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| [TableReference](/engine/6000.7/script-reference/unity/localization/tablereference.md) | A table reference that identifies the collection by GUID. |

### Remarks

GUID references keep resolving after a collection is renamed, unlike name references. Dashed or differently cased input is accepted and canonicalized, so it compares equal to its plain hex form. The result has a [TableReference.ReferenceType](/engine/6000.7/script-reference/unity/localization/tablereference/referencetype.md) of `Guid`, or `Empty` when the string is not a valid GUID.

Reference a collection by GUID so it survives a rename.

### Examples

```csharp
using Unity.Localization;

namespace Unity.Localization.Samples
{
    public class TableReferenceFromGuidExample
    {
        public TableReference Run() => TableReference.FromGuid("6f1e2c0a9b3d4e5f8a1b2c3d4e5f6a7b");
    }
}
```

## FromGuid(GUID)

Creates a table reference that identifies a collection by its GUID.

```csharp
public static TableReference FromGuid(GUID tableCollectionNameGuid)
```

### Parameters

**** (GUID): The GUID of the table collection to reference.

### Returns

| Type                                                                                   | Description                                               |
| -------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| [TableReference](/engine/6000.7/script-reference/unity/localization/tablereference.md) | A table reference that identifies the collection by GUID. |

### Remarks

Use this overload when you already hold a GUID, for example one returned by the asset database. The result has a [TableReference.ReferenceType](/engine/6000.7/script-reference/unity/localization/tablereference/referencetype.md) of `Guid`, or `Empty` when the GUID is empty.

Reference a collection from a GUID you already hold.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class TableReferenceFromTypedGuidExample
    {
        public TableReference Run(GUID collectionGuid) => TableReference.FromGuid(collectionGuid);
    }
}
```
