Version: 2023.2

ObjectIdentifier

struct in UnityEditor.Build.Content

切换到手册

描述

这是一个结构,用于标识项目范围内的特定对象。

注意:此结构及其成员用于为**可编程构建管线 (Scriptable Build Pipeline)** 包提供低级支持。仅限内部使用;使用可编程构建管线包可以实现全功能的构建管线。可以通过 Unity Package Manager 安装此包。

变量

filePath磁盘上包含此对象的文件路径。(仅用于 AssetDatabase 未知的对象)。
fileType包含此对象的文件类型。
guid包含此对象的特定资源。
localIdentifierInFile序列化文件中对象的索引。

公共函数

Equals如果对象相等,则返回 true。
GetHashCode获取 ObjectIdentifier 的哈希代码。
ToString返回此 ObjectIdentifier 的整齐格式化的字符串。

静态函数

ToInstanceIDTries to return the InstanceID that represents this ObjectIdentifier.
ToObjectTries to find, load, and return the Object that represents this ObjectIdentifier.
TryGetObjectIdentifierTries to convert a persistent Object into an ObjectIdentifier.

运算符

operator !=如果 ObjectIdentifiers 不同,则返回 true。
operator <如果第一个 ObjectIdentifier 小于第二个 ObjectIdentifier,则返回 true。
operator ==如果 ObjectIdentifiers 相同,则返回 true。
operator >如果第一个 ObjectIdentifier 大于第二个 ObjectIdentifier,则返回 true。