AssetBundle

  1. IEnumerator Start () {
  2. WWW www = new WWW("http://myserver/myBundle.unity3d");
  3. yield return www;
  4. // Get the designated main asset and instantiate it.
  5. Instantiate(www.assetBundle.mainAsset);
  6. }
  1. isStreamedSceneAssetBundle Return true if the AssetBundle is a streamed scene AssetBundle.
  2. mainAsset Main asset that was supplied when building the asset bundle (Read Only).
  3. Public Functions
  4. Contains Check if an AssetBundle contains a specific object.
  5. GetAllAssetNames Return all asset names in the AssetBundle.
  6. GetAllScenePaths Return all the scene asset paths (paths to *.unity assets) in the AssetBundle.
  7. LoadAllAssets Loads all assets contained in the asset bundle that inherit from type.
  8. LoadAllAssetsAsync Loads all assets contained in the asset bundle asynchronously.
  9. LoadAsset Loads asset with name from the bundle.
  10. LoadAssetAsync Asynchronously loads asset with name from the bundle.
  11. LoadAssetWithSubAssets Loads asset and sub assets with name from the bundle.
  12. LoadAssetWithSubAssetsAsync Loads asset with sub assets with name from the bundle asynchronously.
  13. Unload Unloads all assets in the bundle.
  14. false 仅删除没有引用的资源
  15. true 不管bundle中的资源是否在引用,全部删除
  16. Static Functions
  17. LoadFromFile Synchronously loads an AssetBundle from a file on disk. 必须有UncompressedAssetBundle
  18. LoadFromFileAsync Asynchronously loads an AssetBundle from a file on disk.
  19. LoadFromMemory Synchronously create an AssetBundle from a memory region.
  20. LoadFromMemoryAsync Asynchronously create an AssetBundle from a memory region.

?