Inserting ad networks is the easiest way to monetise your mobile project. There are a number of different ad networks available. Which you choose to integrate into your project will depend on which is currently got the highest eCPMs and what type of ads the service supports. The current types of ads available are banners, interstitials (full screen) and videos.
As the popularity of the Unity3D engine keeps growing more ad companies are realising the need to create not only SDKs that can be used for iOS and Android but also for Unity projects.
These are the some of the most popular ad networks that support Unity projects.
All apps will be made up some form of content. This may be images, text or a mixture of the two. Your app could rely directly on the content that is being stored or it could be used simply for translations. Either way how you store it within your app will need to be considered as using a method that is inappropriate may impact on the quality and performance of your app leading to negative user experience and can affect the revenue generated.
So what ways can you store data within an app developed using Unity?
C# and .NET data structures
The most common methods are:
- Databases (there are many types of databases to use, use one that you are familiar with)
- XML serialization and deserialization
- Data structures such as lists and arrays
Unity data structures
PlayerPrefs storing single values within Unity using a key/value pair style data structure.
Asset Store plugins
The Unity Asset Store also provides useful, quick to implement plugins like Google Sheets For Unity (GSFU) which creates a game object that once add to your scene and set up connects to a Google Doc sheet document and reads data from these sheets. When the sheets are updated the changes are reflected in the project. Very handy as these changes won’t require a new submission to the app stores to modify content.
The data structure you decide to use will depend on a lot of factors. These will be specific to your project so you need to consider how secure you need all the content to be, whether the data needs to be dynamically accessed when the app is being used and the file size restrictions of your app for your chosen app store.
So think carefully about which data structure that will most benefit your project, bear in mind it may not be a simple task so you may have a learning curve.
What is Analytics?
Analytics packages are plugins for your Unity projects that are either made by third party companies or Unity Technologies.
Analytics allows the developer to gather statistics on the user’s progress through the app. This means we can improve designs, the user’s journey and cater more closely to what the user actually wants rather than what we think they do.
Most systems have basic and custom events options to help you obtain the best information. Basic events are tracked as standard when you set up the SDK in your project. Custom events are those scripted by the developer to capture data that may be specific to that app. If you’re not very technical, just using the basic analytics events should give you a good amount of data to analyse to begin with so you don’t need to worry about any custom events. However, you could always hire a contract developer to integrate custom events for you.
The basic events that are tracked will depend on the system you choose to add.
When should you add analytics to your project?
I would suggest that you integrate analytics within the first version of your app. This way you have at least captured the basic analytics data from day one. You can always add custom events in a later update.
What’s currently available?
Here’s a short list of the analytics packages available to add to your Unity project.
- GameAnalytics - free
- Google Analytics – free
- Flurry Analytics – free
- Unity Analytics – free
- Prime31 - $40+
- Parse - free
- Game Sparks – free
Which one do I pick?
I have been using GameAnalytics within my apps and have found the integration process extremely fast and easy to understand even for someone with no previous experience. But there is no right or wrong solution to use. It’s all about preference, how much you’re willing to spend and how much time you have to learn the integration process. For beginners developing cross platform apps, I would recommend trying to use a tool where the code used to add in the basic events doesn’t change for each platform.
There are a number of resources on the Internet and offline that go into detail about the definition of unit testing. The MSDN site defines unit testing as follows:
The primary goal of unit testing is to take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect. Each unit is tested separately before integrating them into modules to test the interfaces between modules. Unit testing has proven its value in that a large percentage of defects are identified during its use.
The developers enforce test-driven development (TDD) in my current role as a software developer so I was introduced to unit and integration testing. My experience so far with unit testing is like the MSDN definition above, however writing these tests with the test tools for the Unity engine does not appear to be the same.
In a later post I’ll discuss writing tests within the Unity engine. For an introduction to using the test tools within Unity watch the live tutorial.
In the meantime, here are some more links regarding unit testing that you may find useful
So you want to create an app and release it to one of the App Stores? That’s a great idea, however you will need a few basic tools and tech in order to develop and release your app.
Every platform’s app store is different so which you decide to focus on will depend on why you are making this app.
For now I’ll assume that your focus is to develop and release for Google’s Play Store and Android development (for the minimum tech needed for iOS development read Minimum tech for iOS development).
For Android development you’ll need the following:
There are tools that you can use to emulate how your app will look and function, like using the Game window in the Unity editor. However, I would advise to test on physical devices when you develop an Android app because of the multitude of devices with different screen sizes and resolutions. This is sometimes known as fragmentation across Android devices. But bear in mind that it’s not practical or possible to test your app across every Android device. By picking a cross section of the most popular devices (with the most popular screen sizes) and using these as the bare minimum you should have sufficient test coverage for your app. As long as you fix any issues that you find during testing, when you release you should be more confident that your app won’t run into many fragmentation issues.
This short guide focuses on how to set up Android SDK tools on your Mac development machine when building Android projects using Unity.
Note: At the time of writing, the current Android version is 5.0 (Lollipop) and the OS X version is OS X 10.10 (Yosemite).
In order to set up your Mac to build Android apps using Unity you can run through the following steps.
1. You will need the minimum spec required
Tip: Install the Java update from Apple’s official website as this seems to work more reliably when setting up Android SDK tools on Macs
2. Install the most recent version of the Java Runtime Environment (JRE)
3. Install the most recent version of the Java Development Kit (JDK)
4. Download the SDK tools only. These are to be used with standalone IDEs like Unity and NOT the Android Studio.
5. Unzip the files and put in a useful place (preferably your home directory). Since the Mavericks OS X update the home directory has been hidden. If you want to locate the home directory to place these files here see this solution but this isn’t necessary so just put unzipped file in a sensible location that you can access in future.
6. Open a Terminal (Finder > Applications > Terminal) and navigate to the tools/ directory in the Android SDK, then execute android sdk.
e.g. /Users/my-username/location/android-sdk-macosx/tools/android sdk
When you open the SDK Manager for the first time, several packages are selected by default. Leave these selected, but be sure you have everything you need to get started, the basic file needed from each Android version is the SDK tools.
For more information see Adding SDK packages.
As you can develop Android apps on inexpensive desktops and laptops running Windows most people just use these to build their Android apps. If you’re a small business owner, just starting up your business or a hobbyist it’s a logical financial choice. After trying to maintain both for a while myself I have resounded myself to the fact that getting my MacBook set up as my sole development machine is the only effective way forward at this time. There are a few reasons why you may choose to use a Mac for Android development too. Here are mine.
Become more efficient
If you are using a Mac to develop iOS apps at the same time maybe you want to become more efficient and use your time more effectively. Using a single development machine you can streamline your processes of updating tools as you will only have one machine to maintain. This could be for e,g. Java updates, Unity updates, SDK updates etc
Only one machine to invest in
As well as helping to free up some more time, having only one machine will be more cost effective too. You will have more funds to put into buying other development tech like devices to test on or licences for software as you won’t require multiple copies per machine anymore.
Only one machine to carry around
Demos to anyone outside of your team may require you to have a small range of tech on hand. Not many people would carry both Dev machines to demos, but in the likelihood that something went wrong or you were missing an important file you may carry both with you. If you now only have to carry one machine around you’ve now cut down your baggage by about a third of the weight. This also means you should be able to reduce the insurance costs of items you carry around (this may only be applicable with certain UK insurance companies).
Separate work from play
If you also use your laptop for gaming, you now have a dedicated gaming machine separate from your business machine.
So you want to create an app an release it to one of the App Stores? That’s a great idea, however you will need a few basic tools and tech in order to develop and release your app.
Every platform’s app store is different so which you decide to focus on will depend on why you are making this app.
For now I’ll assume that your focus is to develop and release for Apple’s App Store and iOS development. For this you’ll need the following:
- iOS developer program membership which costs $99 per year
- An Apple Mac laptop or desktop computer (depends on the make, model and spec of the machine)
- The latest version of XCode installed (free)
- An iOS device to test on (depending on the target device for your app, whether you want a new one or not will determine what this will cost)
The last item is actually not an essential one for development as XCode does provide iOS emulators of devices. However, emulators aren’t always reliable. It’s always good to get into the habit of testing your app on physical devices to ensure your graphics are all at least acceptably positioned on actual devices. It will increase the initial cost of your development setup but remember you’re purchasing tech and tools that can be used multiple times over many projects so these are an investment.