/// <summary> /// Add file with assetbundle /// </summary> /// <param name="path">File path</param> public void AddFile(string path) { //Debug.Log("Add file:" + path); var c = new iContent(); c.Initialize(path); this._contents.Add(c); }
/// <summary> /// Add directory with assetbundle /// </summary> /// <param name="directory">Directory</param> /// <param name="pattern">Target file name pattern</param> public void AddDirectory(string directory, string pattern) { //Debug.Log("Add directory:" + directory + pattern); var c = new iContent(); c.Initialize(directory, pattern); this._contents.Add(c); }
/// <summary> /// Add directory with assetbundle /// </summary> /// <param name="directory">Directory</param> /// <param name="pattern">Target file name pattern</param> public void AddDirectory(string directory) { //Debug.Log("Add directory:" + directory + pattern); string reletivePath = directory; if (directory.StartsWith(Application.dataPath)) { reletivePath = directory.Replace(Application.dataPath, "Assets"); } var c = new iContent(); c.Initialize(reletivePath); c.Type = iContent.Types.DirectoryName; _contents.Add(c); AddFileWithDirectory(directory); }