Search Unity

Scripts don't carry over to the APK when building (Please help!)

Discussion in 'Android' started by EdenInc, Apr 15, 2019.

  1. EdenInc

    EdenInc

    Joined:
    Apr 13, 2016
    Posts:
    15
    The issue:
    My game works perfectly fine inside unity. Everything is neat and tidy. It even builds and gives me a perfectly fine success message after doing so.

    However, when I open the APK on my phone, the scripts seem to be missing. All the animation and art assets are there and visible. But nothing works. Buttons, mechanics, features, whatever. Everything relying on scripts doesn't actually function in the build.

    I've tried building multiple times after restarting both pc & unity. Do any of you have any idea what could be the issue?
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    835
    Check the device log to see if you have any errors. Depending on your Unity version you can use a generic way described here https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/ or if you are using a beta release, you could try this package https://forum.unity.com/threads/android-logcat-package-feedback.595003/
    Also make sure you don't see any errors in the editor console after you build the apk. In addition to that you can try to build a standalone player to see if it's android specific or not.
     
  3. EdenInc

    EdenInc

    Joined:
    Apr 13, 2016
    Posts:
    15
    We seem to have fixed the issue by toggling off our in-game logging system, so that's where the issue lies. Thanks for the response!