Unity3d development of 3D games inevitably requires a large amount of models, images and other resources. It only takes a few megabytes to eat a game APK package, but the resources are dozens of megabytes, hundreds of megabytes, or even hundreds of megabytes. You can publish the APK separately, and then copy the resource package to the SD card separately for file access. However, this operation is troublesome. If this method is used to publish a game, the audience may not be able to accept it. Another way is to package the resource package into the APK package. In this way, you only need to install one APK package, but the problem is that the APK package is large.
So how to package the resource package into the APK package? In fact, it is very easy to create a new streamingassets folder in the project folder and put the various resource files to be packaged under this directory. In this way, resources are packaged into the assets folder in the APK package. What directory is used to access the resources here? It is actually quite simple. "jar: file: //" + application. datapath + "! /Assets is the path to access this directory. If it is iOS platform, the path is application. datapath + "/raw". The file path must be case-sensitive. The file path is case-sensitive. If you do not pay attention to this issue, you may not be able to load resources. Therefore, the project naming rules should be well established at the beginning.