Search Unity

Isues with building Unity Ads 2.0 from the asset store when doing it from Command line

Discussion in 'Unity Ads & User Acquisition' started by VMugen, Feb 6, 2018.

  1. VMugen

    VMugen

    Joined:
    Jan 15, 2018
    Posts:
    10
    Hi,
    I'm having issues integrating the version of UnityAds from the Asset Store when deploying it on a build machine that creates the build from command line.

    I'm encountering on the platforms:

    [Android] : On initializing Android Ads-> AndroidJavaException: java.lang.ClassNotFoundException: com.unity3d.ads.IUnityAdsListener

    [IOS] : On building -> ...Assets/Plugins/iOS/UnityAdsUnityWrapper.mm:4:9: fatal error: 'UnityAds/UnityAds.h' file not found

    Since I was able to build the game proper on a empty project directly from the Editor, my research on why these errors are being thrown point to not including these packages correctly or a clash with the older UnityAds implementation. (possibly from the services tab in the case of XCode)

    Anyone have advice on how to include the plugins correctly? Thanks.
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Which Unity version?
     
  3. VMugen

    VMugen

    Joined:
    Jan 15, 2018
    Posts:
    10
    unity 5.3.6p1
     
  4. VMugen

    VMugen

    Joined:
    Jan 15, 2018
    Posts:
    10
    Hi, would there be help available on this issue I am encountering? I think it is a issue that is generally faced by those trying to include plugins, but as part of building from command line.

    Thank you
     
    Last edited: Feb 8, 2018
  5. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Hi, sorry for delay.

    I'm unfortunately unable to test with that version of Unity here, as I'm on Mac High Sierra version, and editor doesn't load project correctly (see https://forum.unity.com/threads/unity-and-macos-10-13-high-sierra.474527)

    Options:

    1) Can you upgrade you project to one of the versions listed on https://forum.unity.com/threads/unity-and-macos-10-13-high-sierra.474527/ ?
    or 2) Our test/example project on https://github.com/Unity-Technologies/unity-ads-assetstore-test has a build.sh script to build from command line. Can you see if you can reproduce using that project?

    And fyi, I tested here with 2017.3, building from command line. Worked fine.

    Thanks,
    Rasmus
     
    Last edited: Feb 9, 2018
    VMugen likes this.
  6. VMugen

    VMugen

    Joined:
    Jan 15, 2018
    Posts:
    10
    Hi Rasmus, thanks! The test project was very useful in getting it to work.

    My issues with the Android build were to do with git ignore and remote building, whereas the IOS build involved a postprocessor script and having to directly include the UnityAds.framework.