UDN
Search public documentation:
UnrealOnMobile
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
UE3 Home > Mobile Home > Unreal Engine 3: Mobile Overview
Unreal Engine 3: Mobile Overview
Overview
Mobile Platforms
Apple iOS
While all mobile platforms share similar form factors and thus the advantages and limitations that come with the territory, developing games for Apple's iOS platform has its own intricacies and particulars. There are also special hardware and software requirements for developing iOS games and publishing iOS games to the App Store. For information specific to creating games for Apple's iOS platform, see the Unreal Engine 3: Apple iOS Overview page.Android
For information specific to creating games for Tegra devices, see the Unreal Engine 3: Android Overview page.- Android support is available to full UE3 source licensees. If you are developing a UDK title and wish to explore moving from UDK to UE3 in order to target additional platforms, please contact the sales team at Epic to discuss our competitive terms and licensing options.
Getting Started
Streaming on mobile
New Input Subsystem
System Settings for Mobile
Framerate
[Engine.Engine] MaxSmoothedFrameRate=35 bSmoothFrameRate=TRUEFor 60 fps, change
MaxSmoothedFrameRate
to 62. You can also disable bSmoothFrameRate
to let it go as fast as it can, but we do not recommend this, as the framerate may tend to bobble between to different framerates (20, 40, 20, 40, etc), which generally looks very bad.
Saving data on mobile
BasicSaveObject()
There is a static script-accessible native function in the Engine class that can be used to save an object (and it's properties, naturally). You would generally create a single one of these objects to store all of your settings, then save the object, something like this:MyObject = new SomeClass; MyObject.Value = 5; class'Engine'.static.BasicSaveObject(MyObject, "SaveGame.bin", true, 1);
MyObject
is the object variable to save. "SaveGame.bin"
is the name of the file to save. true
specifies that FILEWRITE_SaveGame will be passed to CreateFileWriter (this must be true for iOS to be able to load the file later). 1
is a game-specified version number, that can be used to not load older version files.
To load the object later (to load save game, etc), you would do something very similar to the save case:
MyObject = new SomeClass; class'Engine'.static.BasicLoadObject(MyObject, "SaveGame.bin", true, 1);After this, MyObject.Value will now be 5. Note that only basic properties (ints, floats, strings, names, etc) and arrays/structs of basic properties will be saved. You can save an object pointer, but when loading, the object must already be in memory (it uses StaticFindObject on the pathname of the object, since object properties are stored as strings).
Console commands
[Currently this method only works in iOS] You can also manually save (and load) a single value via a console command in Kismet or script code:mobile SaveSetting <SettingName> <Value> mobile LoadSetting <SettingName> <DefaultValue>With this method, all settings are saved and loaded as strings. It will be up to the code that runs the console command to do any necessary conversion to/from a string. When loading, you specify a default value that will be returned if the setting has not been set yet:
local int SavedValue, LoadedValue; SavedValue = 10; ConsoleCommmand("mobile SaveSetting TestSetting " $ SavedValue); LoadedValue = int(ConsoleCommand("mobile LoadSetting TestSetting 1"));
Kismet Action
See the Mobile Kismet Reference for information on the Save/Load Values Kismet action.Mobile Audio
Mobile Textures
Mobile Materials
Compiling materials at start up
Your material usage in your levels can have a significant impact on your game's startup time. Shaders are not compiled offline, so they must be compiled in the game. Because they take some time (would cause hitches during gameplay), the engine will compile as many shaders as it can during startup (as determined by the cooker). Depending on the various material mobile setting combinations that are used in your levels, the number of shaders to compile at startup can get large (and therefore slow to compile). Shaders that the cooker can pre-determine (which is generally more than 95% of them) are preprocessed into an optimal format for faster compiling. If there is a shader that is needed to render that the cooker didn't detect, it will be compiled at first use time (possibly hitching for a small bit). Note that two identical materials with only different textures will not cause two shaders to be compiled, only one, as the settings are the same.Fog
Network File Loader
How to use
For it to work, you need to use UnrealFrontend:- Run Unreal Frontend
- Go to the Game tab
- Ensure that "Use Networked File Loader" is set to true
- Perform a Sync one time.
- This will put a file in the app that has the IP Address of the machine running UFE
- Boot the game on the device
- This will copy files over the network to the phone
- It is not super fast copying over the network, but the Sync/install time is much faster
- If you change content:
- Cook as normal
- Quit the game
- Run the iPhone game (no need to touch iTunes)
- Newly updated files will be copied over
- If you only change the game's commandline:
- Go to Game tab
- Click the "Make Commandline" button
- Quit the game
- Run the game
- The new commandline will be applied
Important Notes
Recompiling code If you recompile code, you still need to click the Sync button to package up the executable. You must keep UnrealFrontend running for it to work. UFE is the file serving host application. This may change to be a service or something in the future, but for now, UFE is required. Switching back to normal file loading If you want to stop using the Network Loader, then you can uncheck the "Use Networked File Loader" checkbox, then Sync as before. HOWEVER you must manually fully delete the application from the phone to clean the cached files from previous runs!- This will be fixed via code in the future (if not using the file loader, the app could delete the cached files)