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

Bug Changing project link make android app crash on startup

Discussion in 'Unity Gaming Services General Discussion' started by alexisdavidson, Jan 12, 2022.

  1. alexisdavidson

    alexisdavidson

    Joined:
    Apr 28, 2015
    Posts:
    29
    Hi,

    I recently copy pasted a project that I used as a template. Now I wanted to change which game the services are linked to. So I did a "unlink project" and "link to existing project" to link to my new project id.

    I tried it multiple times now and every time I do that, my android Build crashes on startup.
    Once I revert the change (unlink + link project), the crash is gone.

    Any idea?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Can you determine where it is crashing? Which Unity Gaming Services are you using? The services are indeed associated with your ProjectID. To troubleshoot, please place unique Debug.Log statements in your initialization code which will show in the Android logcat logs, and attach the logs here. Make sure to track all API return codes, and write them to the Debug.Log output. https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/
     
  3. alexisdavidson

    alexisdavidson

    Joined:
    Apr 28, 2015
    Posts:
    29
    Thank you for your reply. I am using IAP, Analytics and Ads services. I have Google Ad Mobs and the Facebook SDK in my project.

    Unfortunately, there are absolutely no log before the crash happens. It doesn't get to the splash screen part.
    (The logs work fine when there is no crash so my Android logcat is functioning)

    I understand that without logs it could be difficult to debug...
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    You could either revert to the original ProjectID that you used to connect the services, or start with a new project and add the assets and services one at a time back in.
     
  5. alexisdavidson

    alexisdavidson

    Joined:
    Apr 28, 2015
    Posts:
    29
    Is there any potential problems when 2 games use the same Unity ProjectID? They are both on the Google Play Store.
    If yes I will try to start recreate a new project which will be a serious amount of work
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Just relink the project to ProjectID that you used to link the services. Correct, each game requires its own ProjectID
     
  7. alexisdavidson

    alexisdavidson

    Joined:
    Apr 28, 2015
    Posts:
    29
    Alright so I created a new project from scratch (and implemented the gameplay from the old project that I exported as an .unitypackage). All works fine now
     
    JeffDUnity3D likes this.