Search Unity

Resolved Unity Bolt Save System Not Working On Android

Discussion in 'Visual Scripting' started by Eatsuki, Sep 20, 2021.

  1. Eatsuki

    Eatsuki

    Joined:
    Jun 4, 2021
    Posts:
    25
    I built my game in unity 2020.3.9f1. In windows version, save system works fine, but without changing anything, when i export it to apk for android 6.0.1, save system not working. It detects development wrote variables but seems like can't write. Due to version of unity, I'm using bolt, not visual scripting in general. Is anyone know how can I fix it?
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    Android has two scripting backends - IL2CPP and Mono. If you're on IL2CPP, did you run Tools/Bolt/AoT Pre-Build before building?

    Also, does the issue go away if you switch scripting backends? In theory Mono Desktop and Mono Android should behave the same.

    And what are the types you're trying to save? Ints, strings, lists?
     
    Last edited: Sep 21, 2021
    MonoSapiens likes this.
  3. Eatsuki

    Eatsuki

    Joined:
    Jun 4, 2021
    Posts:
    25
    I switched mono to IL2CPP but now buttons not working on android. It's working fine on editor but in android, not working and can't read written values.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    But did you run Tools/Bolt/AoT Pre-Build before building? Also, what types are you trying to save?
     
    Last edited: Sep 27, 2021
  5. Eatsuki

    Eatsuki

    Joined:
    Jun 4, 2021
    Posts:
    25
    I pre builded, now seems like buttons working, can read saved values but cant write. I'm trying to save bool type. I'm gonna look it a little more, if i won't reply, it's mean its still cant write.
     
  6. Eatsuki

    Eatsuki

    Joined:
    Jun 4, 2021
    Posts:
    25
    I figured out something on editor, probably it can write but something deleting values. It happens only when I change the scene.
     
  7. Eatsuki

    Eatsuki

    Joined:
    Jun 4, 2021
    Posts:
    25
    I found why its deleting and fixed it. Now everythings working fine, thanks for help!