Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

LoadableObjectIdEditorUtility.TryDeconstructLoadableObjectId

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

Declaration

public static bool TryDeconstructLoadableObjectId(LoadableObjectId loadableObjectId, out GUID guid, out long localId, out FileIdentifierType fileType);

Parameters

Parameter Description
loadableObjectId The LoadableObjectId to deconstruct.
guid The GUID of the asset file containing the referenced object.
localId The local file identifier of the object within the asset.
fileType The file identifier type indicating whether this is a source asset, primary artifact, or non-asset reference.

Returns

bool true if the LoadableObjectId represents an asset reference and all components were successfully retrieved; false if the LoadableObjectId is a runtime handle.

Description

Deconstructs a LoadableObjectId into its component parts: GUID, local file identifier, and file identifier type.

This method will return false if the LoadableObjectId contains a runtime handle. Runtime handles are only interpretable by the ContentLoadManager and cannot be converted to GUID/local file identifier.

Additional resources: LoadableObjectIdEditorUtility.CreateLoadableObjectId, AssetDatabase.TryGetGUIDAndLocalFileIdentifier