C# Class Tangzx.ABSystem.AssetBundleInfo

Show file Open project: tangzx/ABSystem Class Usage Examples

Public Properties

Property Type Description
bundleName string
data AssetBundleData
minLifeTime float
onUnloaded OnUnloadedHandler

Private Properties

Property Type Description
UpdateReference int

Public Methods

Method Description
AddDependency ( AssetBundleInfo target ) : void
AssetBundleInfo ( ) : System
Dispose ( ) : void
Instantiate ( ) : GameObject

实例化对象

Instantiate ( Vector3 position, Quaternion rotation, bool enable = true ) : GameObject
Instantiate ( bool enable ) : GameObject
Release ( ) : void

引用计数减一

Release ( object owner ) : void

释放引用

Require ( Component c, bool autoBindGameObject ) : Object

获取对象

Require ( Object user ) : Object

获取此对象

ResetLifeTime ( ) : void
Retain ( ) : void

引用计数增一

Retain ( Object owner ) : void

增加引用

UnloadBundle ( ) : void

Private Methods

Method Description
UpdateReference ( ) : int

Method Details

AddDependency() public method

public AddDependency ( AssetBundleInfo target ) : void
target AssetBundleInfo
return void

AssetBundleInfo() public method

public AssetBundleInfo ( ) : System
return System

Dispose() public method

public Dispose ( ) : void
return void

Instantiate() public method

实例化对象
public Instantiate ( ) : GameObject
return UnityEngine.GameObject

Instantiate() public method

public Instantiate ( Vector3 position, Quaternion rotation, bool enable = true ) : GameObject
position Vector3
rotation UnityEngine.Quaternion
enable bool
return UnityEngine.GameObject

Instantiate() public method

public Instantiate ( bool enable ) : GameObject
enable bool
return UnityEngine.GameObject

Release() public method

引用计数减一
public Release ( ) : void
return void

Release() public method

释放引用
public Release ( object owner ) : void
owner object
return void

Require() public method

获取对象
public Require ( Component c, bool autoBindGameObject ) : Object
c UnityEngine.Component 增加引用的Component
autoBindGameObject bool 如果为true,则增加引用到它的gameObject对象上
return UnityEngine.Object

Require() public method

获取此对象
public Require ( Object user ) : Object
user UnityEngine.Object 增加引用的对象
return UnityEngine.Object

ResetLifeTime() public method

public ResetLifeTime ( ) : void
return void

Retain() public method

引用计数增一
public Retain ( ) : void
return void

Retain() public method

增加引用
public Retain ( Object owner ) : void
owner UnityEngine.Object 用来计算引用计数,如果所有的引用对象被销毁了,那么AB也将会被销毁
return void

UnloadBundle() public method

public UnloadBundle ( ) : void
return void

Property Details

bundleName public property

public string bundleName
return string

data public property

public AssetBundleData,Tangzx.ABSystem data
return AssetBundleData

minLifeTime public property

如果没有其它东西引用的情况下,此AB最小生存时间(单位秒) 否则有可能刚加载完成就被释放了
public float minLifeTime
return float

onUnloaded public property

public OnUnloadedHandler onUnloaded
return OnUnloadedHandler