Yesterday Unity announced an open beta for the BlackBerry 10 Add-on. Be one of the first to bring Unity games to BlackBerry 10 and at the same time contribute to the quality of the Unity for BlackBerry 10 Add-on.
This blog post will walk you through the Add-on from start-to-finish.
Get your BlackBerry Signing Keys
Before you begin you need to register for BlackBerry Signing Keys, which lets you develop your Unity games and publish to BlackBerry World. After signing up, you should receive 2 .csj files that will be used to generate the Signing Keys. If you already have your Signing Keys setup, move on to the next section.
Setup your Signing Keys
Once you have the Unity Beta SDK installed, make sure you register your computer for BlackBerry development. This can be done through Unity’s Build Settings at File->Build Settings. You will find the BlackBerry option among other platforms.
Note: if BlackBerry is not among other platforms, it is probably because you do not have a Pro license or it is not unlocked for the BlackBerry 10 Add-on. You can find more information on activating your Trial Pro license in the Unity Beta forums.
- RegisterClicking on the “Player Settings” will open up the BlackBerry Platform settings tab.
Note: If you already have setup the BlackBerry Signing Keys with other BlackBerry Developer tools, the BlackBerry Add-on should detect and show you as Registered.
If you have not already registered your computer, click the Register Button and that will pop-up a screen where you can specify the appropriate .csj files that you received in your email. The CSJ Pin corresponds to the pin that you entered when filling out the Signing Key form. The CSK Password that you enter will be your actual Signing Key password that you should make sure to remember.
- Backup and RestoreOnce you have registered, make sure to backup the generated Signing Keys. It is very important that you backup the Signing Keys as this will allow you to develop, publish, and upgrade your game from different computers. Once backed up, you can simply use the Restore button to register a different computer for development.
Keeping your Signing Keys safe and remembering your password saves you a lot of potential hassle!
The Unregister button removes any Signing Key information from your computer. It is highly recommended to backup your keys in order to be able to publish or upgrade your games in the future. Unregistering your Signing Keys without a backup will make it impossible to retrieve them.
To securely develop, debug, and test your Unity Games, you’ll need DebugTokens.
If you already have a BlackBerry 10 Development environment setup, you can simply import your existing debug token from the following default folders:
- Windows XP: %HOMEPATH%Local SettingsApplication DataResearch In Motion
- Windows Vista and Windows 7: %HOMEPATH%AppDataLocalResearch In Motion
- Mac OS: ~/Library/Research In Motion
- UNIX or Linux: ~/.rim
To create a new debug token, click Create and the following window will pop-up to let you specify where to create a DebugToken and for which device based on the device PIN. The PIN of a BlackBerry 10 device can be accessed from the Settings screen in your device.
Before uploading the Debug Token, make sure that:
- The device is in the development mode.
It can be done at Settings Screen-> Security and Privacy -> Development Mode
- Device IP Address and device password are entered
If you have a USB cable then enter the Development IP Address starting 169.254.x.x in the Device Address text box. If you prefer deploying wirelessly, make sure your device is connected to the same Wi-Fi network and enter the Network IP address that can be found under Settings Screen -> About -> Network ->IP. In both cases, development mode has to be turned on.
To verify that the Debug Token was successfully uploaded, check the development mode screen for the Debug Token details.
For security reasons, the generated Debug Tokens are only valid for a month. For example, if you have a debug version of a Unity game installed on your BlackBerry with an expired token, the game will not launch unless it is renewed. You can renew any existing or expired Debug Tokens within the settings. You may also edit a Debug Token to add or remove BlackBerry Device PINs for development.
Build and Deploy
Assuming you were able to import your game and upload the debug token, here’s how to enable optimizations and deploy to a BlackBerry 10 Device.
- Texture CompressionDepending on the Device’s GPU, you can compress your textures to a GPU-specific texture compression format to improve performance, loading time, and of course, reduce the texture memory size. The following options are available in the Build settings:
- PVRTC – To optimize your existing textures to Power VR GPU.
Note: among the current Z10 and Q10 Devices lineup, Model Name STL100-1 indicates a PowerVR SGX544 GPU.
- ATC – To optimize your existing textures to Adreno GPU, which is present in majority of BlackBerry Z10 and Q10 devices.
- ETC1 or RGBA16 – To optimize your textures to the standard texture compression format included with OpenGL ES 2.0 extensions. Note: ETC1 is used to compress only opaque textures.
Build TypeIf your project is in development phase, use the Local Build Type with the development option turned on. This enables the Unity Script Debugging and Profiling feature. If you wish to test your game in release mode or submit it to BlackBerry World, choose the Signed Build Type.
Note: To deploy a Signed Build, you do not need a Debug Token to be uploaded to a device. This allows you to distribute you game for Beta testing without having to distribute a Debug Token.
Before submitting your game to BlackBerry World, explore the options under the BlackBerry platform settings to choose your game’s Resolution and Presentation options, Icon, Splash Screen, rendering optimizations etc.
Now that you are up and running, lets see those amazing titles on BlackBerry World!
Read the article: