![]() ![]() Note: 4 small files can take a second to finish copy. 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.The video has English subtitles, so please turn them on I hope you find it useful 1.1K. I really like the final result, so if anyone is interested, I'll leave the tutorial in the comments. 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. Hey guys I made a tutorial on how to interact with water using shaders/shader graph. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |