예제 #1
0
    public static UnityBFIO getInstance(string appId, string addUnitID, AdListener listener)
    {
        if (instance == null)
        {
            instance = FindObjectOfType(typeof(UnityBFIO)) as UnityBFIO;
            if (instance == null)
            {
                instance = new GameObject("UnityBFIO").AddComponent <UnityBFIO>();
            }
        }
        instance.listener = listener;
        AndroidJavaClass bfioClass = new AndroidJavaClass("com.bfio.unitysdk.UnityBFIO");

        instance.session = bfioClass.CallStatic <AndroidJavaObject>("configure", UnityBFIO.getActivity(), appId, addUnitID);
        return(instance);
    }
예제 #2
0
 public void requestAD(string appId, string addUnitID)
 {
     this.session.Call("requestAD", UnityBFIO.getActivity(), appId, addUnitID);
 }