Пример #1
0
    private void LoadPlayableData()
    {
        string filePath = Application.dataPath + playableDataProjectFilePath;

        if (File.Exists(filePath))
        {
            string dataAsJSON = File.ReadAllText(filePath);
            playableData = JsonUtility.FromJson <PlayableDataJSON>(dataAsJSON);
        }
        else
        {
            playableData = new PlayableDataJSON();
        }
    }
Пример #2
0
    private void LoadPlayableData()
    {
        string filePath = Application.dataPath + playableDataProjectFilePath;

        if (File.Exists(filePath))
        {
            string dataAsJSON = File.ReadAllText(filePath);
            playableData = JsonUtility.FromJson <PlayableDataJSON>(dataAsJSON);
        }
        else
        {
            Debug.Log("Error, Playable File not found");
        }
    }