Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LoadAssetWithSubAssets

Loads Asset and sub Assets from the AssetBundle synchronously.
Read time 2 minutesLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AssetBundleModule

LoadAssetWithSubAssets(string)

Loads Asset and sub Assets from the AssetBundle synchronously.
public Object[] LoadAssetWithSubAssets(string name)

Parameters

name

Name of the Asset.

Returns

Type

Description

Object[]

Remarks

Load objects from the Asset and its SubAssets. If the signatures that specify the type are called then the requested type is matched against the Main object and Visible objects in each Asset. Otherwise the main objects of each Asset is returned. An example usage is to load all sprites from an sprite that uses "Multiple" for its Sprite Mode.

LoadAssetWithSubAssets<T>(string)

Loads Asset and sub Assets from the AssetBundle synchronously.
public T[] LoadAssetWithSubAssets<T>(string name) where T : Object

Parameters

name

Name of the Asset.

Returns

Type

Description

<T>[]

Remarks

Load objects from the Asset and its SubAssets. If the signatures that specify the type are called then the requested type is matched against the Main object and Visible objects in each Asset. Otherwise the main objects of each Asset is returned. An example usage is to load all sprites from an sprite that uses "Multiple" for its Sprite Mode.

LoadAssetWithSubAssets(string, Type)

Loads Asset and sub Assets from the AssetBundle synchronously.
public Object[] LoadAssetWithSubAssets(string name, Type type)

Parameters

name

Name of the Asset.

type

Type to load.

Returns

Type

Description

Object[]

Remarks

Load objects from the Asset and its SubAssets. If the signatures that specify the type are called then the requested type is matched against the Main object and Visible objects in each Asset. Otherwise the main objects of each Asset is returned. An example usage is to load all sprites from an sprite that uses "Multiple" for its Sprite Mode.