Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

ObjectIdentifier.TryGetObjectIdentifier

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

Cancel

Obsolete TryGetObjectIdentifier(int, out ObjectIdentifier) is deprecated. Use TryGetObjectIdentifier(EntityId, out ObjectIdentifier) instead.

Declaration

public static Boolean TryGetObjectIdentifier(Int32 instanceID, out UnityEditor.Build.Content.ObjectIdentifier objectId);

Description

Tries to convert a persistent Object into an ObjectIdentifier.

Returns false if it was not possible. This can happen if the Object is is a Scene Object, or was not loaded from and Object on disk.


Declaration

public static Boolean TryGetObjectIdentifier(EntityId entityId, out UnityEditor.Build.Content.ObjectIdentifier objectId);

Parameters

Parameter Description
entityId The object identifier's entity id to look up.
objectId Out parameter with the found object identifier.

Description

Tries to convert a persistent Object into an ObjectIdentifier.

Returns false if it was not possible. This can happen if the Object is a Scene Object, or was not loaded from and Object on disk.