Saveload.cs Problem On Ps Vita

hello everyone im trying to get saves working someone can help please, using unity2018.1.0b4 sdk 3.570 and visual studio 2017
saveload.cs and original github: https://github.com/PokemonUnity/PokemonUnity

//Original Scripts by IIColour (IIColour_Spectrum)

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;

public static class SaveLoad
{
    public static SaveData[] savedGames = new SaveData[]
    {
        null, null, null
    };


    public static void Save()
    {
        if (SaveData.currentSave != null)
        {
            if (SaveData.currentSave.getFileIndex() >= 0 && SaveData.currentSave.getFileIndex() < savedGames.Length)
            {
                savedGames[SaveData.currentSave.getFileIndex()] = SaveData.currentSave;
                BinaryFormatter bf = new BinaryFormatter();
                FileStream file = File.Create(Application.persistentDataPath + "/playerData.pkud");
                bf.Serialize(file, SaveLoad.savedGames);
                file.Close();
            }
        }
    }

    public static bool Load()
    {
        Debug.Log(Application.persistentDataPath);
        if (File.Exists(Application.persistentDataPath + "/playerData.pkud"))
        {
            BinaryFormatter bf = new BinaryFormatter();
            FileStream file = File.Open(Application.persistentDataPath + "/playerData.pkud", FileMode.Open);
            SaveLoad.savedGames = (SaveData[]) bf.Deserialize(file);
            file.Close();
            return true;
        }
        return false;
    }

    public static int getSavedGamesCount()
    {
        int count = 0;
        for (int i = 0; i < savedGames.Length; i++)
        {
            if (savedGames[i] != null)
            {
                count += 1;
            }
        }
        return count;
    }

    public static void resetSaveGame(int index)
    {
        savedGames[index] = null;

        if (index < 2)
        {
            for (int i = index; i < 2; i++)
            {
                SaveLoad.savedGames[i] = SaveLoad.savedGames[i + 1];
                SaveLoad.savedGames[i + 1] = null;
            }
        }

        bool sGN1 = savedGames[0] == null;
        bool sGN2 = savedGames[1] == null;
        bool sGN3 = savedGames[2] == null;

        Debug.Log(sGN1.ToString() + ", " + sGN2.ToString() + ", " + sGN3.ToString());

        BinaryFormatter bf = new BinaryFormatter();
        FileStream file = File.Create(Application.persistentDataPath + "/playerData.pkud");
        bf.Serialize(file, SaveLoad.savedGames);
        file.Close();
    }
}

Excellent! What works so far? What have you tried? What do you expect to happen? What isn’t quite right? Any error messages? Be as specific as possible.

(This is all super-standard basic “I am having an issue” type questions. Please try to pre-answer them for faster potential responses.)

Sorry i’m learning. The problem is ps vita in pc works well, i do a little research and im confused about
Persistentdatapath i posted the script because i dont know what is wrong.

all the project seems to work fine
but cant save the game

The issue is specific i want to save the game and i have a script that works on any other platform but not on vita.

If it works on other platforms then it is likely something to do with either permissions or configuration to actually write the file on PS Vita. I’m not a Sony developer but I recommend making a simple routine to write a file to disk and report (to the PSVita screen) if you get any errors writing that file. Then try reading the same file.

As far as where to put it, persistent data path is on the right track, but there might be some reason it doesn’t work on PSVita unless you do additional stuff. I’m only speculating about that however, based on other console work I’ve done. Consoles tend to be more tightly controlled permissions-wise.

Im trying to figure out whats wrong cause i don’t have a dev/testkit.

I find some forums and they talk about persistentdatapath and vita. some people say to work some say the oposite im confused

I don’t have a devkit OR a simulator, but the approach I suggest above will work on anything, and at the minimum it will get you more information/insight.

Is a weird issue because don’t cause any crash/freze or reboot
The game keep runing but nothing happens

The underlying platform implementation may be telling the C# layer “Yep, I wrote that file” when in fact it didn’t. That’s the point of trying to write a simple file (to eliminate any complexity from your load save logic), trying to read it back, studying the list of files stored on the disk (if possible; I’m not familiar with PSVita environment), etc.