RemotePackageManager  0.2
Easily add suport for AssetBundles to your game!
 All Classes Functions Variables Properties
Public Member Functions | Properties | List of all members
RemotePackageRequest Class Reference

RemotePackageRequest. More...

Public Member Functions

RemotePackageRequest Get< T > (System.Action< T > callback)
 Filter the downloaded Objects and get the first of type "T". Then it calls the callback delegate passing it as the parameter. More...
 
RemotePackageRequest GetAll< T > (System.Action< IEnumerable< T >> callback)
 Filter the downloaded Objects and get all of type "T". Then it calls the callback delegate passing them as the parameter. More...
 
RemotePackageRequest GetAndInstantiate (Transform parent=null, System.Action< GameObject > callback=null)
 Filter the downloaded Objects and get the first of type GameObject (Prefab) and then instantiates it. Then it calls the callback delegate passing the instantiated GameObject as the parameter. More...
 
 RemotePackageRequest (string packageUri)
 
void GetRemotePackage (Object mainAsset, IEnumerable< Object > remotePackage)
 

Properties

string PackageUri [get, set]
 

Detailed Description

RemotePackageRequest.

Helper object to handle package load requests.

You never have to instantiate it manually as an instance to it is already returned from RemotePackageManager's "Load" method!

See RemotePackageManager example to see this in use since this class depends on it!

See Also
RemotePackageManager

Member Function Documentation

RemotePackageRequest RemotePackageRequest.Get< T > ( System.Action< T >  callback)

Filter the downloaded Objects and get the first of type "T". Then it calls the callback delegate passing it as the parameter.

Parameters
callbackCallback to be called with the filtered Object after the download.
Template Parameters
TFilter the downloaded Objects by type (GameObject, Texture, AudioClip, etc.)
See Also
RemotePackageManager
Type Constraints
T :Object 
RemotePackageRequest RemotePackageRequest.GetAll< T > ( System.Action< IEnumerable< T >>  callback)

Filter the downloaded Objects and get all of type "T". Then it calls the callback delegate passing them as the parameter.

Don't forget to import "System.Collections.Generic"! using System.Collections.Generic;

Parameters
callbackCallback to be called with the filtered Objects after the download.
Template Parameters
TFilter the downloaded Objects by type (GameObject, Texture, AudioClip, etc.)
See Also
RemotePackageManager
Type Constraints
T :Object 
RemotePackageRequest RemotePackageRequest.GetAndInstantiate ( Transform  parent = null,
System.Action< GameObject >  callback = null 
)

Filter the downloaded Objects and get the first of type GameObject (Prefab) and then instantiates it. Then it calls the callback delegate passing the instantiated GameObject as the parameter.

Parameters
parentParent transform to instantiate the downloaded Prefab as its child.
callbackCallback to be called with the instantiated GameObject after the download and instantiation.
See Also
RemotePackageManager

The documentation for this class was generated from the following file: