ドキュメント

Unity Engine

Unity Engine

FromGuid

Creates a table reference that identifies a collection by its GUID.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule

FromGuid(string)

Creates a table reference that identifies a collection by its GUID.
public static TableReference FromGuid(string tableCollectionNameGuid)

Parameters

tableCollectionNameGuid

The GUID of the table collection to reference.

Returns

Type

Description

TableReferenceA 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 of
Guid
, or
Empty
when the string is not a valid GUID.
Reference a collection by GUID so it survives a rename.

Examples

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.
public static TableReference FromGuid(GUID tableCollectionNameGuid)

Parameters

tableCollectionNameGuid

GUID
The GUID of the table collection to reference.

Returns

Type

Description

TableReferenceA 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 of
Guid
, or
Empty
when the GUID is empty.
Reference a collection from a GUID you already hold.

Examples

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