Back to Unity

Import the UnityAds library

en-us-ads-android-4-dot-19-dot-0-sdk-integration-import-library.md

latest657 B
Original Source

Import the UnityAds library

Import the UnityAds library to start using the Unity Ads SDK APIs.

Read time 1 minute

Last updated 3 days ago


To access the Unity Ads SDK APIs in an Android project, import the

com.unity3d.ads

package. This enables direct use of the Unity Ads SDK classes, functions, and listeners in your app.Without this import, you can’t implement ad content in your app, such as rewarded or non-rewarded video, interstitial, or banner ads.Include the following import in every file where you need to use Unity Ads SDK functionality.

KotlinJava

import com.unity3d.ads
import com.unity3d.ads;