Twoorb Plugins  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Twoorb.PrefabSystem.AssetBundleData Class Reference

Container class for an asset bundle. Keeps track of the objects using this bundle More...

Public Member Functions

bool ContainsReferences ()
 Determines whether the list with references to this asset bundle is empty. More...
 
int GetTotalReferenceCount ()
 Gets the total number of objects referencing this asset bundle. This bundle should be safe to unload if it's zero. More...
 
GameObject GetInstantiatedObject (string prefabName)
 Returns an instantiated object of a prefab within the asset bundle using the prefabName in the parameters. This class saves a reference to the instantiated object for reference counting, so make sure to call ReturnInstantiatedObject() after using this. More...
 
bool ReturnInstantiatedObject (string prefabName, GameObject instantiatedObject)
 Returns an instantiated object that was created by using the GetInstantiatedObject() method of this class. It will be subtracted by the reference counting system of this bundle. More...
 
void Unload ()
 Unloads the referenced AssetBundle. It ALWAYS unloads all loaded objects. More...
 

Properties

AssetBundle ThisAssetBundle [get, set]
 Gets or sets the asset bundle More...
 
string BundleName [get, set]
 Gets or sets the name of the asset bundle More...
 

Detailed Description

Container class for an asset bundle. Keeps track of the objects using this bundle

Member Function Documentation

bool Twoorb.PrefabSystem.AssetBundleData.ContainsReferences ( )

Determines whether the list with references to this asset bundle is empty.

GameObject Twoorb.PrefabSystem.AssetBundleData.GetInstantiatedObject ( string  prefabName)

Returns an instantiated object of a prefab within the asset bundle using the prefabName in the parameters. This class saves a reference to the instantiated object for reference counting, so make sure to call ReturnInstantiatedObject() after using this.

Parameters
prefabNameThe name of the prefab to instantiated prefab
Returns
The instantiated object. Returns null if the prefab doesn't exist within this bundle.
int Twoorb.PrefabSystem.AssetBundleData.GetTotalReferenceCount ( )

Gets the total number of objects referencing this asset bundle. This bundle should be safe to unload if it's zero.

Returns
The total number of objects referencing this asset bundle
bool Twoorb.PrefabSystem.AssetBundleData.ReturnInstantiatedObject ( string  prefabName,
GameObject  instantiatedObject 
)

Returns an instantiated object that was created by using the GetInstantiatedObject() method of this class. It will be subtracted by the reference counting system of this bundle.

Parameters
prefabNameThe original prefab name used in the GetInstantiatedObject() method
instantiatedObjectThe instantiated object originally retrieved from the GetInstantiatedObject() method
Returns
If the operation was successful
void Twoorb.PrefabSystem.AssetBundleData.Unload ( )

Unloads the referenced AssetBundle. It ALWAYS unloads all loaded objects.

Property Documentation

string Twoorb.PrefabSystem.AssetBundleData.BundleName
getset

Gets or sets the name of the asset bundle

AssetBundle Twoorb.PrefabSystem.AssetBundleData.ThisAssetBundle
getset

Gets or sets the asset bundle


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