2048 Unity Template Guide

Thanks for purchasing the 2048 Unity Template. This guide will take you through installing the template and deploying to both Android and iOS.

For a quick overview/introduction please check out the video here.

Initial Installation

  • Download and install Unity 4.5.x or higher
  • Open Unity and create a new project
  • Import the 2048Template_vx.x.unitypackage into Unity
    • Right Click Assets folder, Import Package -> Custom Package -> Browse to 2048Template_vx.x.unitypackage file and click Open and Import
  • Open the 2048/MainScene scene and press Play to run the game in the editor

Setting Up AdMob

  • Click the ‘Ads’ GameObject and enter your Ad Unit ID’s

Setting Up Google Play Game Services

  • Click ‘Google Play Games’ in the top menu, click ‘Android Setup’ and/or ‘iOS Setup’ and follow the on-screen instructions
  • Click the ‘GPGS_Score’ game object and enter your own id’s

Setting Up In-App Purchases

  • Click on the ‘InAppBilling/Products’ game object and enter your Android public key
  • Expand the ‘Products/Remove Ads’ and amend the product id’s as necessary

Deploying To Android

  • Switch Unity to Build for Android
    • File-> Build Settings->Android->Switch Platform
  • Amend your Product Name, Keystore password,Bundle Identifier,Version
    • File-> Build Settings->Player Settings
  • Build and Run Your Game
    • File->Build Settings->Build and Run

Deploying To iOS Devices (iPad/iPhone)

  • Make sure you have run the Google Play Game Services Setup for iOS (see above)
  • Switch Unity to Build for iOS
    • File-> Build Settings->iOS->Switch Platform
  • Amend your Product Name, Bundle Identifier,Version
    • File-> Build Settings->Player Settings
  • Amend the Target iOS Version to 6.0
    • File-> Build Settings->Player Settings->Other Settings->Optimization-Target iOS Version -> 6.0
  • Build Your Game
    • File->Build Settings->Build
  • You will get an error in Xcode (GooglePlayGames.h file not found), don’t panic, you need to add some frameworks…
  • The following frameworks need adding in Build Phases->Link Binary With Libraries
    • AdSupport, AddressBook, AssetsLibrary, CoreData, CoreLocation, CoreTelephony, StoreKit, MessageUI, CoreText, Security, lic++dylib, libz.dylib
  • The following frameworks need to be dragged on to the Unity-iPhone project (unzip the included ‘GoogleFrameworksForiOS.zip‘ or download latest from here)
    • GoogleOpenSource.framework, GooglePlus.bundle, GooglePlus.framework,GooglePlayGames.bundle, GooglePlayGames.framework
  • Add the -ObjC flag
    • Build Settings->Other Linker Flags-> add -ObjC to the end of the list
  • The game should now build without errors

One thought on “2048 Unity Template Guide

  1. Pingback: Massive Update to 2048 Template | Plato Evolved

Leave a Reply

Your email address will not be published. Required fields are marked *