Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetRootAssets

Retrieve all root assets from all registered content directories.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: Unity.Loading
  • Assembly: UnityEngine.ContentLoadModule

GetRootAssets()

Retrieve all root assets from all registered content directories.
public static Object[] GetRootAssets()

Returns

Type

Description

Object[]An array of all the root assets in all registered content directories.

GetRootAssets(ContentDirectoryHandle)

Retrieve all root assets from the specified content directory.
public static Object[] GetRootAssets(ContentDirectoryHandle contentDirectory)

Parameters

contentDirectory

The registered content directory handle from which to retrieve root assets.

Returns

Type

Description

Object[]An array of all the root assets in the specified content directory.

GetRootAssets<T>()

Retrieve all root assets of a specific type from all registered content directories.
public static T[] GetRootAssets<T>() where T : Object

Returns

Type

Description

<T>[]An array of root assets that match the specified type.

GetRootAssets<T>(ContentDirectoryHandle)

Retrieve all root assets of a specific type from the specified content directory.
public static T[] GetRootAssets<T>(ContentDirectoryHandle contentDirectory) where T : Object

Parameters

contentDirectory

The registered content directory handle from which to retrieve root assets.

Returns

Type

Description

<T>[]An array of root assets that match the specified type.