mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 12:37:37 +02:00
Persistent Settings (#234)
* modularize tabs-style menus * make remix properties use modular design * add persistent settings
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@ -8,6 +9,7 @@ using TMPro;
|
||||
|
||||
using Starpelly;
|
||||
|
||||
using HeavenStudio.Common;
|
||||
using HeavenStudio.Editor.Track;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
@ -26,7 +28,16 @@ namespace HeavenStudio.Editor
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
theme = JsonConvert.DeserializeObject<Theme>(ThemeTXT.text);
|
||||
if (File.Exists(Application.persistentDataPath + "/editorTheme.json"))
|
||||
{
|
||||
string json = File.ReadAllText(Application.persistentDataPath + "/editorTheme.json");
|
||||
theme = JsonConvert.DeserializeObject<Theme>(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
PersistentDataManager.SaveTheme(ThemeTXT.text);
|
||||
theme = JsonConvert.DeserializeObject<Theme>(ThemeTXT.text);
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
Reference in New Issue
Block a user