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) Click Download in the bottom right corner of the window. String toPath = Application.persistentDataPath +"/" Click the asset name you want to download from the left side list. In Android = "jar:file://" + Application.dataPath + "!/assets/" String fromPath = Application.streamingAssetsPath +"/" Free download paid assets for Unity and Unreal Engine: 3D models, animations, weapons, blueprints, particles, shaders, templates, textures, tutorials and much more. 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 Video Player Extension Video Player Solution Video Player Plugin Unity Video Player Video Viewer Video Asset Video Control Simple Video Playback Video Integration Video Player UI Media player simple video player Video video player. 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 |