Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TryDeconstructLoadableObjectId(LoadableObjectId, out GUID, out long, out FileIdentifierType)

Deconstructs a LoadableObjectId into its component parts: GUID, local file identifier, and file identifier type.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

TryDeconstructLoadableObjectId(LoadableObjectId, GUID, long, FileIdentifierType)

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

Parameters

loadableObjectId

The LoadableObjectId to deconstruct.

guid

GUID
The GUID of the asset file containing the referenced object.

localId

The local file identifier of the object within the asset.

The FileIdentifierType indicating whether this is a source asset, primary artifact, or non-asset reference.

Returns

Type

Description

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

Remarks

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.