void Start()
    {
        DontDestroyOnLoad(gameObject);
        allRoundData = QuizData.LoadFromFile().allRoundData;
        LoadPlayerProgress();

        SceneManager.LoadScene("MenuScreen");
    }
Beispiel #2
0
    void OnGUI()
    {
        if (quizData != null)
        {
            SerializedObject   obj  = new SerializedObject(this);
            SerializedProperty prop = obj.FindProperty("quizData");

            EditorGUILayout.PropertyField(prop, true);

            obj.ApplyModifiedProperties();

            if (GUILayout.Button("Save data"))
            {
                quizData.SaveToFile();
            }
        }

        if (GUILayout.Button("Load data"))
        {
            quizData = QuizData.LoadFromFile();
        }
    }