PlayMovie
Plays a full-screen movie. Note that player will stream movie directly from the iPhone disc, therefore you have to provide movie as a separate files and not as an usual asset.
The Unity game engine offers several ways of reading text data, but the usage depends on what you need and where the game is running. In this post I discuss some of the issues, and include C# code for the two methods used by Pawns.
he WWW class supports the file:// protocol on Unity iPhone. Here is what you have to do :
- Package your assets into bundles using editor scripts (the example project should help you : http://unity3d.com/support/resources...s/assetbundles . It's for Unity (not iPhone) but it works the same way)
- Put your asset bundles into the iPhoneStreamingAssets folder : the will be copied in the .app in the Data/Raw folder !
- Get the proper file:// link to load the asset. I use this :
Code:
public static string GetAssetBundleBasePath () {
if (Application.isEditor) {
return "file://" + Application.dataPath + "/../iPhoneStreamingAssets/";
} else {
return "file://" + Application.dataPath + "/Raw/";
}
}
AppController.mm file and change #define ENABLE_INTERNAL_PROFILER 0 to #define ENABLE_INTERNAL_PROFILER 1. Choose Run->Console in the XCode menu to display output (GDB) console and then run your project. Unity iOS will output statistics to the console window every 30 frames. For example: