![]() ![]() ![]() Note: 4 small files can take a second to finish copy. AssetBundles can express dependencies between each other for example, a Material in one AssetBundle can reference a Texture in another AssetBundle. String filesNamesToCopy = new string įoreach (string fileName in filesNamesToCopy)ĭebug.Log("copying from " fromPath fileName " to " toPath) įile.WriteAllBytes(toPath fileName, tes) An AssetBundle is an archive file that contains platform-specific non-code Assets (such as Models, Textures, Prefabs, Audio clips, and even entire Scenes) that Unity can load at run time. String toPath = Application.persistentDataPath "/" In Android = "jar:file://" Application.dataPath "!/assets/" String fromPath = Application.streamingAssetsPath "/" ![]() Small sample code in c# to copy files async:Īdd this method to a script which inherits MonoBehaviour IEnumerator CopyFileAsyncOnAndroid() If you enjoyed like and consider subscribingTimestamps listed below.0:00 Assets Studio GUI Intro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |