AssetBundle 资源包
Inherits from Object
AssetBundles let you stream additional assets via the WWW class and instantiate them at runtime. AssetBundles are created via BuildPipeline.BuildAssetBundle.
AssetBundles让你通过WWW类流式加载额外的资源并在运行时实例化它们。AssetBundles通过BuildPipeline.BuildAssetBundle创建。
参见: WWW.assetBundle, BuildPipeline.BuildPlayer.
function Start () { //开始下载 var www = WWW ("http://myserver/myBundle.unity3d"); //等待下载完成 yield www; //获取指定的主资源并实例化 Instantiate(www.assetBundle.mainAsset); }
Variables变量
-
Main asset that was supplied when building the asset bundle (Read Only).
主资源在构建资源boundle时指定(只读)。
Functions函数
-
Check if an AssetBundle contains a specific object.
如果AssetBundle的名称中包含特定的对象则进行检索。 -
Loads object with name from the bundle.
从bundle中加载名为name的对象。 -
Asynchronously loads object with name of a given type from the bundle.
异步地从bundle中加载被指定类型的名为name的对象。 -
Loads all objects contained in the asset bundle that inherit from type.
加载所有包含在资源bundle中且继承自type的对象。 -
Unloads all assets in the bundle.
卸载包含在资源bundle中的所有对象。
Class Functions类函数
-
Asynchronously create an AssetBundle from a memory region.
从内存区异步创建资源包。
Inherited members继承成员
Inherited Variables继承变量
-
The name of the object. //物体的名字
-
Should the object be hidden, saved with the scene or modifiable by the user?
物体是否被隐藏、保存在场景中或被用户修改?
Inherited Functions继承函数
-
Returns the instance id of the object.
返回物体的实例ID -
Returns the name of the game object.
返回游戏物体的名称。
Inherited Class Functions继承类函数
-
Does the object exist?
物体是否存在? -
Clones the object original and returns the clone.
克隆原始物体,并返回克隆的物体 -
-
Removes a gameobject, component or asset.
删除一个游戏物体、组件或资源 -
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即销毁物体obj,强烈建议使用Destroy代替。 -
Returns a list of all active loaded objects of Type type.
返回Type类型的所有激活的加载的物体列表 -
Returns the first active loaded object of Type type.
返回Type类型第一个激活的加载的物体。 -
Compares if two objects refer to the same
比较如果两个物体相同 -
Compares if two objects refer to a different object
比较如果两个物体不同 -
Makes the object target not be destroyed automatically when loading a new scene.
加载新场景的时候使目标物体不被自动销毁。
最后修改:2011年9月16日 Friday 11:53