Search Unity

Binary File somehow included in Build apk

Discussion in 'Editor & General Support' started by David_GameDev, Nov 6, 2018.

  1. David_GameDev

    David_GameDev

    Joined:
    Dec 25, 2016
    Posts:
    29
    Hello everyone,

    I had this problem for some time now and I can´t seem to find a solution for this. So basically I have made a very simple save/load system which works with a binary formatter. It saves the file in Application.persistentDataPath with a specific name. Everything works fine, however, every time I build the game to an apk and install it on a phone, somehow, the file appears in the folder structure of the android phone without even starting the game, which led me to the conclusion that it probably is built into the package.

    As I have always only one save, the name is constant, I have changed it since and it works fine and it theoretically is no problem anymore, however, I don’t want the file to be packed in the apk because it is unnecessary and never used.

    I can´t find it anywhere in the project structure, I always delete the gamesave from the editor Application.persistentDataPath before building, I also delete it from my phone before reinstalling the apk and it still comes back every time. I really have no clue how this magic file is doing this.

    Not sure if relevant but I am using the Adressables System which is still in the preview (currently 0.4.6) which I know kidnaps the build pipeline for asset bundle building, but not sure how this would package a file from Application.persistentDataPath.

    It is driving me slightly nuts, hope someone might have an answer or at least a clue what this might be.

    Thanks in advance,

    David