![]() ![]() Get Started with Unity Personal Download Unity to start creating today and get access. Note: 4 small files can take a second to finish copy. Unity Asset Store Rules are complicated by now, especially for new. String filesNamesToCopy = new string įoreach (string fileName in filesNamesToCopy)ĭebug.Log("copying from "+ fromPath + fileName +" to "+ toPath) įile.WriteAllBytes(toPath+ fileName, tes) 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() The source files in the project should be under Assets\StreamingAssets.My workaround was to copy the files from the Application.streamingAssetsPath (which is inside a jar and can`t be accessed by most native libraries) to the Application.persistentDataPath (which is totally fine)and then to pass that path to the native code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |