Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Solved] Initializing Unity Ads Errors

Discussion in 'Unity Ads' started by Blaze5565, Jan 9, 2019.

Thread Status:
Not open for further replies.
  1. Blaze5565

    Blaze5565

    Joined:
    Sep 11, 2018
    Posts:
    7
    Hi,

    I suddenly started getting errors in my game yesterday. I've managed to fix most of them, but I can't find much on the last two that I'm getting now.

    Initializing Unity Ads.
    UnityEngine.Advertisements.Creator:LoadRuntime()



    InvalidCastException: Specified cast is not valid.
    UnityEngine.Advertisements.Creator.CreatePlatform () (at <2a095cd4bec246c295780cb64ddeb6c7>:0)
    UnityEngine.Advertisements.Creator:LoadRuntime()

    Both of them are the red exclamation mark errors. I'm building to Android currently, so that shouldn't be the problem. I've also already tried re-importing all assets.

    Any help would be much appreciated.
     
  2. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    306
    Hi,

    Can you provide some more details:
    - Your integration path (Asset Store? Services window?)
    - Your Unity version
     
  3. Blaze5565

    Blaze5565

    Joined:
    Sep 11, 2018
    Posts:
    7
    Um, both? I installed via the asset store, but it says on in the services tab too. But it's been like that before I got any bugs or anything.
    Unity version is 2018.3.0f2, but I initially started the project in 2018.2.xx (can't remember). It was also initially working after updating to 2018.3.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,125
    Please share the code that you are using.
     
  5. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    306
    Use only one integration - I recommend disabling the services window -integration and testing again.

    In later versions - there's also the package manager to take into account. Make sure Ads isn't included through the package manager as well when integrating the Asset Store package. You can do this from the package manager window or by manually editing the manifest.json -file:

    https://docs.unity3d.com/Packages/com.unity.package-manager-ui@1.7/manual/index.html

    Let me know if this helps.
     
    Blaze5565 likes this.
  6. Blaze5565

    Blaze5565

    Joined:
    Sep 11, 2018
    Posts:
    7
    I disabled the services window and package manager versions, and now it's working fine. Thank you!
     
Thread Status:
Not open for further replies.