You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PlumberUltimateAds/Assets/IronSource/Scripts/IronSourceInitilizer.cs

45 lines
1.2 KiB
C#

2 months ago
using UnityEngine;
public class IronSourceInitilizer
{
#if UNITY_IOS || UNITY_ANDROID
[RuntimeInitializeOnLoadMethod]
static void Initilize()
{
var developerSettings = Resources.Load<IronSourceMediationSettings>(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME);
if (developerSettings != null)
{
#if UNITY_ANDROID
string appKey = developerSettings.AndroidAppKey;
#elif UNITY_IOS
string appKey = developerSettings.IOSAppKey;
#endif
if (developerSettings.EnableIronsourceSDKInitAPI == true)
{
if (appKey.Equals(string.Empty))
{
Debug.LogWarning("IronSourceInitilizer Cannot init without AppKey");
}
else
{
IronSource.Agent.init(appKey);
IronSource.UNITY_PLUGIN_VERSION = "7.2.1-ri";
}
}
if (developerSettings.EnableAdapterDebug)
{
IronSource.Agent.setAdaptersDebug(true);
}
if (developerSettings.EnableIntegrationHelper)
{
IronSource.Agent.validateIntegration();
}
}
}
#endif
}