Пример #1
0
 /// <summary>
 /// 加载
 /// </summary>
 public void Load()
 {
     m_loader = AssetBundleLoader.Allocate(m_cubeParse.ab, m_cubeParse.assets, (ready, res) =>
     {
         GameObject go            = GameObject.Instantiate(res.GetAsset <GameObject>());
         go.transform.parent      = transform;
         go.transform.position    = m_cubeParse.position;
         go.transform.eulerAngles = m_cubeParse.angle;
         go.transform.localScale  = m_cubeParse.scale;
     });
     m_loader.LoadAsync();
 }
Пример #2
0
 /// <summary>
 /// 创建 AssetBundleLoader
 /// </summary>
 /// <param name="bundleName">assetBundle名称</param>
 /// <param name="assetName">资源名称</param>
 /// <param name="listener"></param>
 public static AssetBundleLoader CreateAssetBundleLoader(string bundleName, string assetName, ResNotificationListener listener)
 {
     return(AssetBundleLoader.Allocate(bundleName, assetName, listener));
 }