1) Go to Windows -> Package Manager. We update and install the necessary components for the project.
To install Newtonsoft Json, you need to click on the plus (+) icon in the Package Manager window, and select “Add package by name …” Next, insert the name “com.unity.nuget.newtonsoft-json” and click the Add button.
2) Install External Dependency Manager.
https://github.com/googlesamples/unity-jar-resolver/blob/master/external-dependency-manager-latest.unitypackage
And set up
3) Set up the module for In-Game Transactions.
To do this, go to Edit -> Project Settings -> Services -> In-App Purchasing, and enable the module by clicking on the OFF button
Let’s go to the developer console https://play.google.com/console/developers
Let’s go to the project and then to the Monetization settings.
In the License section, copy the RSA public key.
Next, in Unity, open the Services -> In-App Purchasing -> Receipt Validation Obfuscator window And paste the RSA public key in point 2, And click the Obfuscate Google Play License Key button.
Next, in your Unity account in Project Settings, paste the RSA public key
5) Project setup. Go to File -> Build Settings. When choosing the Android Compression Method platform, always choose LZ4HC.
Go to Project Settings and set the settings:
In Splash Image settings use our signature color #0045E8
Set Other Settings:
VERY IMPORTANT!
in “Other Setting” set “Managed Stripping Level” to “Minimal”
Configure Publishing Settings:
You need to add an entry to the Assets/Plugins/Android/proguard-user.txt file (if the ProGuard checkbox is enabled):
-keep class com.** { *;}
The file Assets/Plugins/Android/gradleTemplate.properties should have an entry without R8, something like:
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**
In the file Assets/Plugins/Android/settingsTemplate.gradle it should be something like this:
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url (unityProjectPath + "/Assets/GeneratedLocalRepo/Firebase/m2repository") // Assets/Firebase/Editor/AnalyticsDependencies.xml:18, Assets/Firebase/Editor/AppDependencies.xml:22, Assets/Firebase/Editor/CrashlyticsDependencies.xml:20, Assets/Firebase/Editor/DynamicLinksDependencies.xml:20
}
maven {
url "https://android-sdk.is.com/" // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:9, Assets/IronSource/Editor/ISAdMobAdapterDependencies.xml:16, Assets/IronSource/Editor/ISFacebookAdapterDependencies.xml:16, Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:48, Assets/IronSource/Editor/ISPangleAdapterDependencies.xml:8, Assets/IronSource/Editor/ISUnityAdsAdapterDependencies.xml:8
}
maven {
url "https://maven.google.com/" // Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17, Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25, Assets/IronSource/Editor/ISAdMobAdapterDependencies.xml:8, Assets/IronSource/Editor/ISFacebookAdapterDependencies.xml:8, Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:40, Assets/IronSource/Editor/ISUnityAdsAdapterDependencies.xml:15
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea/" // Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:8, Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:16, Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:24, Assets/IronSource/Editor/ISMintegralAdapterDependencies.xml:32
}
maven {
url "https://artifact.bytedance.com/repository/pangle/" // Assets/IronSource/Editor/ISPangleAdapterDependencies.xml:15
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
}
}