Version: 2020.2
言語: 日本語

GlobalObjectId

struct in UnityEditor

マニュアルに切り替える

説明

Struct providing an API for stable, project-global object identifiers.

Provides a project-global object ID for lookup.

The ID is persistent and unique for a given Unity Object.

The format of the string representation of the ID is "GlobalObjectId_V1-{i}-{a}-{l}-{p}" where:
{i} is the identifier type represented by an integer (0 = Null, 1 = Imported Asset, 2 = Scene Object, 3 = Source Asset).
{a} is the asset GUID.
{l} is the local file ID of the object.
{p} is the prefab instance ID of the object.

The default null ID is "GlobalObjectId_V1-0-00000000000000000000000000000000-0-0".

Caveats:
- The ID changes when the object is moved to a new scene because the scene ID is part of the GlobalObjectID.

変数

assetGUIDThe GUID for the asset to which this object belongs.
identifierTypeThe identifier type represented as an integer.
targetObjectIdThe local file ID of the object.
targetPrefabIdThe prefab instance id of the object.

Public 関数

EqualsCheck equality between two GlobalObjectIds.
ToStringGet the string representation of the GlobalObjectId.

Static 関数

GetGlobalObjectIdSlowConverts an Object reference or InstanceID to a GlobalObjectId.
GetGlobalObjectIdsSlowCreates an array of GlobalObjectIds based on an array of Objects or InstanceIDs.
GlobalObjectIdentifiersToInstanceIDsSlowCreates an array of InstanceIDs based on an array of GlobalObjectIds.
GlobalObjectIdentifiersToObjectsSlowCreates an array of Objects based on an array of GlobalObjectIds.
GlobalObjectIdentifierToInstanceIDSlowConverts a GlobalObjectId to an InstanceID.
GlobalObjectIdentifierToObjectSlowConverts a GlobalObjectId to an Object reference.
TryParseParses the string representation of a GlobalObjectId into a GlobalObjectId struct.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961