preferences fixes and dropdown styles
This commit is contained in:
1 parent
464d39321e
commit
70ab364c08
9 files changed
+1792
-2164
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[ExecuteAlways]
|
||||
public class Preferences : MonoBehaviour {
|
||||
ThemeSelector themeSelector;
|
||||
public PreferenceData data;
|
||||
|
||||
void Awake() {
|
||||
string path = Path.Combine(Application.persistentDataPath, "preferences.json");
|
||||
data = new PreferenceData(path).Load();
|
||||
// Debug.Log($"ThemeIndex {data.themeIndex}");
|
||||
}
|
||||
|
||||
public void SetThemeIndex(int i) {
|
||||
data.themeIndex = i;
|
||||
data.Save();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user