コード例 #1
0
#pragma warning restore 649
        #endregion

        /// <summary>
        /// Initialize new <see cref="IMediationManager"/> and save to <see cref="MobileAds.manager"/> field.
        /// Can be called for different identifiers to create different managers.
        /// </summary>
        /// <exception cref="NotSupportedException">Not supported platform. Allowed Android, iOS and Editor only</exception>
        /// <exception cref="ArgumentNullException">Manager ID are not found</exception>
        public IMediationManager Initialize()
        {
            if (string.IsNullOrEmpty(targetId))
            {
                WithManagerIdAtIndex(0);
            }
            return(CASFactory.CreateManager(this));
        }
コード例 #2
0
        /// <summary>
        /// Create <see cref="IMediationManager"/> builder.
        /// <para>Don't forget to call the <see cref="CASInitSettings.Initialize"/> method to create manager instance.</para>
        /// </summary>
        public static CASInitSettings BuildManager()
        {
            var builder = CASFactory.LoadInitSettingsFromResources();

            if (builder == null)
            {
                return(ScriptableObject.CreateInstance <CASInitSettings>());
            }
            return(UnityEngine.Object.Instantiate(builder));
        }
コード例 #3
0
 public static void SetGlobalEtras(Dictionary <string, string> extras)
 {
     CASFactory.SetGlobalMediationExtras(extras);
 }
コード例 #4
0
 /// <summary>
 /// Get array of active mediation networks in build.
 /// </summary>
 public static AdNetwork[] GetActiveNetworks()
 {
     return(CASFactory.GetActiveNetworks());
 }
コード例 #5
0
 /// <summary>
 /// The CAS SDK provides an easy way to verify that you’ve successfully integrated any additional adapters;
 /// it also makes sure all required dependencies and frameworks were added for the various mediated ad networks.
 /// <para>After you have finished your integration, call the following static method
 /// and confirm that all networks you have implemented are marked as <b>VERIFIED</b>.</para>
 ///
 /// <para>Find log information by tag: <b>CASIntegrationHelper</b></para>
 ///
 /// Once you’ve successfully verified your integration,
 /// please remember to remove the integration helper from your code.
 /// </summary>
 public static void ValidateIntegration()
 {
     CASFactory.ValidateIntegration();
 }
コード例 #6
0
 /// <summary>
 /// Return Native SDK version else <see cref="wrapperVersion"/> for Unity Editor.
 /// </summary>
 public static string GetSDKVersion()
 {
     return(CASFactory.GetSDKVersion());
 }
コード例 #7
0
 public static string GetActiveMediationPattern()
 {
     return(CASFactory.GetActiveMediationPattern());
 }
コード例 #8
0
 public static bool IsActiveNetwork(AdNetwork network)
 {
     return(CASFactory.IsActiveNetwork(network));
 }