Search Unity

Errors in AdapterManager

Discussion in 'Unity Ads & User Acquisition' started by charglerode, Oct 2, 2014.

  1. charglerode

    charglerode

    Joined:
    Sep 14, 2013
    Posts:
    5
    I just imported the Unity Ads package today(Oct 1) and I can't build because I'm getting 3 errors in the AdapterManager script. The errors are as following:

    Assets/UnityAds/Advertisements/Mediation/AdapterManager.cs(26,35): error CS0120: An object reference is required to access non-static member `object.GetType()'

    Assets/UnityAds/Advertisements/Mediation/AdapterManager.cs(28,50): error CS1502: The best overloaded method match for `System.Activator.CreateInstance(string, string)' has some invalid arguments

    Assets/UnityAds/Advertisements/Mediation/AdapterManager.cs(28,50): error CS1503: Argument `#1' cannot convert `Type' expression to type `string'

    These are the lines in the script that are apparently the culprit, but since these are part of the package, I don't know how to fix them.

    Type adapterType = Type.GetType(nameSpace + "." + className);
    if(adapterType != null) {
    Adapter adapter = (Adapter)Activator.CreateInstance(adapterType, new object[] {adapterId});
    ...
    ...
    ...
    }

    Any ideas?