Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

null referenceexception on post process player step - 64bit iOS

Discussion in 'Unity Ads & User Acquisition' started by teamleal, Feb 9, 2015.

  1. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Hey there, I'm getting a null referenceexception on the post process build step. Running this game in editor or building the game on an iPhone are both successful without Unity Ads. However, when I integrate Ads, I can run the game in editor, but receive a non-descriptive build error.

    The specific error is this:
    Error building Player: NullReferenceException: Object reference not set to an instance of an object

    And nothing else.

    I'm on 4.6.2 indie and trying to build a project using the settings provided on the screenshot. Any suggestions? Is there anyway I can track down where the error is coming from? The editor log yields no additional detail.

    Thank you,

    d
     

    Attached Files:

  2. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Upgrading to the patch appears to have resolved the issue. If you're running into a similar error - upgrade to 4.6.2.p1
     
    unity-nikkolai likes this.
  3. georgepiva

    georgepiva

    Joined:
    Dec 16, 2013
    Posts:
    14
    Same issue here:
    Code (CSharp):
    1. Platform assembly: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iossupport/UnityEditor.iOS.Extensions.Xcode.dll (this message is harmless)
    2. Error building Player: NullReferenceException: Object reference not set to an instance of an object
    Using Unity 3D version 4.6.2f1.
     
  4. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Georgepiva and others,

    4.6.2.p1 does not solve the problem - 4.6.2.p2 might make it worse - so DO NOT use that patch. After much trial and error, the workaround is to create new Xcode projects for every build ( appending an existing one will not work ). You will receive the null error when trying to overwrite an existing project. This is a huge pain - but works.

    Do not spend a ton of time looking at your own code - this is an issue with Unity's pipeline.

    To whom it may concern at Unity, if there is a general faq you can point people to regarding system errors like the one discussed here, please do so. At the very least it will allow people to switch to different tasks instead of wasting time hacking their work in possibly destructive ways. I appreciate your software and think it's wonderful and I know upgrades like this are nightmares.

    Thanks,

    d
     
    georgepiva likes this.
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think its best always create new xcode project, append causes all kinds of issues not just for ads but when you have many plugins and if you check the ios forum a user has reported a general issue with append
     
    unity-nikkolai likes this.
  6. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Yes, it is safest to do as you suggest - although a bit irritating. Since the functionality was working before it's worth pointing out the change in behavior.
     
  7. dttngan91

    dttngan91

    Joined:
    Nov 21, 2013
    Posts:
    80
    Really? Does unity 4.6.3 solved this issue?
     
  8. Mishaps

    Mishaps

    Joined:
    Nov 28, 2011
    Posts:
    181
    yea I agree its not practical to create a new Xcode project each time (setting in Xcode to adjust each time etc).

    The plugin from the asset store is still broken for me in unity 4.6.3.

    Perhaps try the one from github, I haven't had a chance yet but it does seems to have had some changes more recently...
    https://github.com/Applifier/unity-ads
     
  9. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Not sure if 4.6.3 solves the post-procss error. However, if using indie it introduces the splash screen error. Recommend using 4.2.1
     
  10. teamleal

    teamleal

    Joined:
    Jul 21, 2013
    Posts:
    11
    Correction - use 4.6.2.p1 !!!
     
  11. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    I've submitted a bug for this. #676552