A thin wrapper around the Unity Ads Android and iOS SDK for use on Heyzap's mediation.
The latest release can be found in Releases.
Pull requests and issues are welcome.
Add the UnityAds.ane
to your Adobe Flex Builder or Adobe Flash project.
If on Android, follow the integration instructions on Heyzap or add the following permissions and activities to your Android Manifest in your application descriptor:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name="com.unity3d.ads.adunit.AdUnitActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name="com.unity3d.ads.adunit.AdUnitSoftwareActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="false"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
If not done automatically, add the follow extension context to your application descriptor:
<extensions>
<extensionID>com.heyzap.sdk.extensions.unityads</extensionID>
</extensions>
For iOS:
UnityAds.framework
and UnityAds.bundle
in ios/Vendor
with a newer version.ios/platform.xml
with any new iOS frameworks that the newer version might be dependent on. Built-in iOS SDK frameworks can be added within the linkerOptions tag. Custom iOS frameworks can be added under the packagedDependencies tag and their respective .framework
directories can be added to ios/Vendor
. Drag and drop these .framework
directories into the UnityAdsANE.xcodeproj
project in XCode under the Vendor group.For Android:
unity-ads.jar
in android/libs
with a newer version.android/platform.xml
with any new android libraries that the newer version might be dependent on. Android libraries can be added under the packagedDependencies tag. The actual .jar
files can be added to the andorid/libs
directory.After making the necessary modifications, build the new ANE by following the building instructions below.
New versions of Unity Ads contain new .AAR archive. Just unpack it as zip file and add classes.jar file to android/libs
directory. Rename it to unityads.jar
.
Copy all resources to src-resources
folder. They will be automatically added to the build.
build.config
by copying build.config.dist
(your local config file)build.config
(named air.sdk
)ant
.After build completes, the native extension will be in bin/UnityAds.ane
.