preferences json save

This commit is contained in:
ntr committed 2022-03-31 17:38:22 +11:00
1 parent a32a10afe6
commit fb18bc08d1
3 files changed
+236 -204

No files matched your search

+46
View File
@@ -876,6 +876,51 @@ MonoBehaviour:
m_Mode: 0 m_Mode: 0
m_NumColorKeys: 2 m_NumColorKeys: 2
m_NumAlphaKeys: 2 m_NumAlphaKeys: 2
preferences: {fileID: 8681115429733332136}
--- !u!1 &4572416332750939958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3507733486544043422}
- component: {fileID: 8681115429733332136}
m_Layer: 0
m_Name: Preferences
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3507733486544043422
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4572416332750939958}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -873, y: -389, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5305278010342315827}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &8681115429733332136
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4572416332750939958}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26b88d85e12af85469a5e3e4cfc3586b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5305278009141335879 --- !u!1 &5305278009141335879
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1073,6 +1118,7 @@ RectTransform:
- {fileID: 1729957376054616780} - {fileID: 1729957376054616780}
- {fileID: 1791438027654186390} - {fileID: 1791438027654186390}
- {fileID: 4967975864164671326} - {fileID: 4967975864164671326}
- {fileID: 3507733486544043422}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+185 -202
View File
@@ -123,53 +123,6 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!28 &18988211
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: AudioSpectrumData128
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 128
m_Height: 1
m_CompleteImageSize: 512
m_MipsStripped: 0
m_TextureFormat: 18
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMasterTextureLimit: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 512
_typelessdata: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1 &100829523 --- !u!1 &100829523
GameObject: GameObject:
m_ObjectHideFlags: 3 m_ObjectHideFlags: 3
@@ -245,7 +198,7 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100829523} m_GameObject: {fileID: 100829523}
m_LocalRotation: {x: 0.16018222, y: -0.00000003329039, z: 0.0000000054022857, w: 0.9870875} m_LocalRotation: {x: 0.16018224, y: 0.000000009349981, z: -0.0000000015172936, w: 0.9870875}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@@ -329,7 +282,7 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 135872332} m_GameObject: {fileID: 135872332}
m_LocalRotation: {x: 0.124220625, y: -0.0000000070583512, z: 8.8363683e-10, w: 0.9922547} m_LocalRotation: {x: 0.12422062, y: -0.000000011957323, z: 0.0000000014969403, w: 0.9922547}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@@ -1239,7 +1192,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1336357564912058984, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 1336357564912058984, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0.81333333
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1754673864255675372, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 1754673864255675372, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_Colors.m_NormalColor.b propertyPath: m_Colors.m_NormalColor.b
@@ -1315,7 +1268,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3013196897029551629, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 3013196897029551629, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4365975985793281027, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 4365975985793281027, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
@@ -1527,7 +1480,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6822126994811884559, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 6822126994811884559, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: -17
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7479755003839443640, guid: 31660dba95ae9a9408051002a1e4c382, type: 3} - target: {fileID: 7479755003839443640, guid: 31660dba95ae9a9408051002a1e4c382, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
@@ -2314,7 +2267,7 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 936348874} m_GameObject: {fileID: 936348874}
m_LocalRotation: {x: 0.14220117, y: 0.000000017570697, z: -0.0000000023692526, w: 0.98983777} m_LocalRotation: {x: 0.14220117, y: 0.000000017570697, z: -0.0000000023692373, w: 0.98983777}
m_LocalPosition: {x: 0, y: 50, z: -150} m_LocalPosition: {x: 0, y: 50, z: -150}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@@ -2781,6 +2734,53 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3} m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!28 &1951334687
Texture2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: AudioSpectrumData128
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 2
m_Width: 128
m_Height: 1
m_CompleteImageSize: 512
m_MipsStripped: 0
m_TextureFormat: 18
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMasterTextureLimit: 0
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 0
m_WrapV: 0
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
m_PlatformBlob:
image data: 512
_typelessdata: a07ab23dfde19f3d0957883df1e1813d77ace83d8f9ba03d17af673d23c0543df7223d3dc6845f3d7bd86f3d14dc723d5c22503d1e55413d698b243da323fc3c94a5d33cdc2eb43c9812a13cc93e963c20738b3ce34f833c74c2823ccdcf7b3cc7b5743cc3a56e3cd920683c6434643c9dd05f3c11755c3cc69e593caaf5563c9dd9533c65f1513c59734f3cef5e4d3c60874b3c8d69493c3aa3473c0b01463c126b443cd7ff423cd392413c3817403c682d3f3c5c7f3d3c21403c3c83ee3a3c9eae393c701d393cd84e383c0a08373caf0f363c0705353c42ec333c8205333cab12323cdb80313cea79313cc86d303cc85b2f3c922b2e3c379b2d3cc2722c3cbe762b3c944f2b3c9efc2a3cdbb3293cc3ef283cdc9e283cdbf7273cbcfd263c732f263ce74d253cf9cc243ca843243c0c9d233c06ba223c564f223c6b54213cff93203c7f21203cfcd01f3c61cd1f3caeb81e3c18441e3ceb6a1d3c05f21c3c72711c3c2cf91b3c46701b3cd6821a3c2a3c1a3c00bf193c692c183c2b47173ce45f163ce23b153cea9c143c3446143cc58e133c8184123c5bfc113c532d113c0e60103ceddf0f3c6b150f3cf1e60e3cf6b90d3c2ece0c3ccce10b3cc9d50a3c44820a3c0032093ca066083c6c39073c1900063c63a6053cf398043c56c20c3c99d4063cae91033c5eda003c7f43fd3bf5e4f93b14acf53b61b3f03be348eb3b
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
--- !u!1 &2125593500 --- !u!1 &2125593500
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -2794,7 +2794,6 @@ GameObject:
- component: {fileID: 2125593503} - component: {fileID: 2125593503}
- component: {fileID: 2125593502} - component: {fileID: 2125593502}
- component: {fileID: 2125593506} - component: {fileID: 2125593506}
- component: {fileID: 2125593507}
- component: {fileID: 2125593511} - component: {fileID: 2125593511}
m_Layer: 0 m_Layer: 0
m_Name: Mnml_CircleBar m_Name: Mnml_CircleBar
@@ -2818,7 +2817,6 @@ MonoBehaviour:
m_ExecuteInEditor: 1 m_ExecuteInEditor: 1
m_Bindings: m_Bindings:
- {fileID: 2125593506} - {fileID: 2125593506}
- {fileID: 2125593507}
- {fileID: 2125593511} - {fileID: 2125593511}
m_VisualEffect: {fileID: 2125593504} m_VisualEffect: {fileID: 2125593504}
--- !u!73398921 &2125593503 --- !u!73398921 &2125593503
@@ -2923,8 +2921,8 @@ VisualEffect:
m_Array: m_Array:
- m_Value: - m_Value:
serializedVersion: 2 serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1} key0: {r: 6.498019, g: 0, b: 0, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1} key1: {r: 0, g: 0.6901961, b: 11.984314, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0} key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0} key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0}
@@ -2940,7 +2938,7 @@ VisualEffect:
ctime6: 0 ctime6: 0
ctime7: 0 ctime7: 0
atime0: 0 atime0: 0
atime1: 65342 atime1: 65535
atime2: 0 atime2: 0
atime3: 0 atime3: 0
atime4: 0 atime4: 0
@@ -2954,7 +2952,7 @@ VisualEffect:
m_Overridden: 1 m_Overridden: 1
m_NamedObject: m_NamedObject:
m_Array: m_Array:
- m_Value: {fileID: 0} - m_Value: {fileID: 1951334687}
m_Name: SpectrumDataTexture m_Name: SpectrumDataTexture
m_Overridden: 1 m_Overridden: 1
- m_Value: {fileID: 0} - m_Value: {fileID: 0}
@@ -2983,134 +2981,134 @@ MonoBehaviour:
- rid: 1586242992680206341 - rid: 1586242992680206341
Preview: Preview:
Values: Values:
- 0 - 0.08714795
- 0 - 0.07806776
- 0 - 0.06657226
- 0 - 0.06341923
- 0 - 0.1136102
- 0 - 0.078421704
- 0 - 0.056563463
- 0 - 0.05194105
- 0 - 0.046175923
- 0 - 0.054569982
- 0 - 0.05855606
- 0 - 0.059291914
- 0 - 0.050814018
- 0 - 0.047200315
- 0 - 0.040172014
- 0 - 0.030778712
- 0 - 0.02583579
- 0 - 0.021995
- 0 - 0.019662187
- 0 - 0.018340485
- 0 - 0.01702267
- 0 - 0.016029304
- 0 - 0.015961863
- 0 - 0.015369368
- 0 - 0.014935917
- 0 - 0.014565888
- 0 - 0.014167988
- 0 - 0.0139285065
- 0 - 0.013660577
- 0 - 0.013455645
- 0 - 0.013282483
- 0 - 0.013120094
- 0 - 0.012930301
- 0 - 0.012813901
- 0 - 0.012661778
- 0 - 0.012534841
- 0 - 0.012422413
- 0 - 0.012293232
- 0 - 0.012184912
- 0 - 0.01208521
- 0 - 0.011988418
- 0 - 0.011901817
- 0 - 0.011814791
- 0 - 0.011724286
- 0 - 0.011668541
- 0 - 0.011566009
- 0 - 0.011489899
- 0 - 0.011409405
- 0 - 0.011333136
- 0 - 0.011298522
- 0 - 0.011249267
- 0 - 0.01117135
- 0 - 0.011112138
- 0 - 0.011048562
- 0 - 0.010981621
- 0 - 0.010926606
- 0 - 0.010868709
- 0 - 0.010833944
- 0 - 0.010832289
- 0 - 0.010768361
- 0 - 0.010703035
- 0 - 0.010630505
- 0 - 0.010596088
- 0 - 0.010525407
- 0 - 0.010465322
- 0 - 0.010455985
- 0 - 0.010436205
- 0 - 0.010357822
- 0 - 0.01031107
- 0 - 0.010291781
- 0 - 0.010251964
- 0 - 0.010192331
- 0 - 0.010143149
- 0 - 0.010089374
- 0 - 0.010058635
- 0 - 0.010025896
- 0 - 0.009986173
- 0 - 0.009932047
- 0 - 0.0099066105
- 0 - 0.009846787
- 0 - 0.00980091
- 0 - 0.009773611
- 0 - 0.009754416
- 0 - 0.009753556
- 0 - 0.009687586
- 0 - 0.0096597895
- 0 - 0.009608011
- 0 - 0.009579186
- 0 - 0.009548532
- 0 - 0.009519856
- 0 - 0.009487217
- 0 - 0.009430608
- 0 - 0.009413758
- 0 - 0.009383917
- 0 - 0.009287932
- 0 - 0.009233276
- 0 - 0.009178136
- 0 - 0.009108515
- 0 - 0.009070614
- 0 - 0.009049941
- 0 - 0.009006207
- 0 - 0.008942724
- 0 - 0.008910264
- 0 - 0.008860904
- 0 - 0.008811964
- 0 - 0.008781415
- 0 - 0.008733134
- 0 - 0.008722053
- 0 - 0.008650294
- 0 - 0.008594079
- 0 - 0.008537721
- 0 - 0.008473822
- 0 - 0.008453909
- 0 - 0.008373737
- 0 - 0.008325249
- 0 - 0.008253437
- 0 - 0.008178734
- 0 - 0.0081573455
- 0 - 0.008093107
- 0 - 0.008591255
- 0 - 0.008229398
- 0 - 0.008030338
- 0 - 0.007864563
- 0 - 0.0077289934
- 0 - 0.0076261708
- 0 - 0.00749732
- 0 - 0.0073456024
- 0 - 0.0071803196
SpectrumSizeParameter: SpectrumSizeParameter:
m_Name: SpectrumSize m_Name: SpectrumSize
SpectrumDataTextureParameter: SpectrumDataTextureParameter:
@@ -3152,21 +3150,6 @@ MonoBehaviour:
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
--- !u!114 &2125593507
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2125593500}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dd725d7ee17678a4a8ffd6a1959475df, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Property:
m_Name: Monochrome
Target: {fileID: 674604167}
--- !u!224 &2125593510 --- !u!224 &2125593510
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
+5 -2
View File
@@ -3,17 +3,20 @@ using System.Collections.Generic;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEngine; using UnityEngine;
[RequireComponent(typeof(Dropdown))]
public class ThemeSelector : MonoBehaviour { public class ThemeSelector : MonoBehaviour {
public Gradient[] themeList; public Gradient[] themeList;
public static Gradient theme; public static Gradient theme;
public Preferences preferences;
void Awake() { void Awake() {
if (theme == null) theme = themeList[0]; theme = themeList[preferences.data.themeIndex];
gameObject.GetComponent<Dropdown>().value = preferences.data.themeIndex;
} }
public void SelectTheme(Dropdown d) { public void SelectTheme(Dropdown d) {
Debug.Log($"{d.value}");
theme = themeList[d.value]; theme = themeList[d.value];
preferences.data.SetThemeIndex(d.value);
} }
public Gradient CurrentTheme() { public Gradient CurrentTheme() {