├── .gitignore ├── .vsconfig ├── Assets ├── Packages.meta ├── Packages │ ├── XmlStorage.meta │ └── XmlStorage │ │ ├── Example.meta │ │ ├── Example │ │ ├── ExampleController.cs │ │ ├── ExampleController.cs.meta │ │ ├── GetExample.cs │ │ ├── GetExample.cs.meta │ │ ├── SetExample.cs │ │ ├── SetExample.cs.meta │ │ ├── XmlStorage.unity │ │ └── XmlStorage.unity.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ ├── Accessors.meta │ │ ├── Accessors │ │ │ ├── Accessor.cs │ │ │ ├── Accessor.cs.meta │ │ │ ├── Getters.cs │ │ │ ├── Getters.cs.meta │ │ │ ├── Setters.cs │ │ │ └── Setters.cs.meta │ │ ├── Storage.cs │ │ ├── Storage.cs.meta │ │ ├── Systems.meta │ │ └── Systems │ │ │ ├── Aggregations.meta │ │ │ ├── Aggregations │ │ │ ├── Accessors.meta │ │ │ ├── Accessors │ │ │ │ ├── Accessor.cs │ │ │ │ ├── Accessor.cs.meta │ │ │ │ ├── Getters.cs │ │ │ │ ├── Getters.cs.meta │ │ │ │ ├── Setters.cs │ │ │ │ └── Setters.cs.meta │ │ │ ├── Aggregation.cs │ │ │ └── Aggregation.cs.meta │ │ │ ├── Consts.cs │ │ │ ├── Consts.cs.meta │ │ │ ├── Data.meta │ │ │ ├── Data │ │ │ ├── DataElement.cs │ │ │ ├── DataElement.cs.meta │ │ │ ├── DataSet.cs │ │ │ └── DataSet.cs.meta │ │ │ ├── Utilities.meta │ │ │ └── Utilities │ │ │ ├── Converter.cs │ │ │ ├── Converter.cs.meta │ │ │ ├── FileUtils.cs │ │ │ └── FileUtils.cs.meta │ │ ├── Version.txt │ │ └── Version.txt.meta ├── PrefsUGUI.meta └── PrefsUGUI │ ├── Examples.meta │ ├── Examples │ ├── PrefsUGUI.unity │ ├── PrefsUGUI.unity.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── Classes.cs │ │ ├── Classes.cs.meta │ │ ├── Example.cs │ │ ├── Example.cs.meta │ │ ├── Structs.cs │ │ └── Structs.cs.meta │ ├── Textures.meta │ └── Textures │ │ ├── PrefsImage.jpg │ │ └── PrefsImage.jpg.meta │ ├── Prefabs.meta │ ├── Prefabs │ ├── EventSystem.prefab │ ├── EventSystem.prefab.meta │ ├── Guis.meta │ ├── Guis │ │ ├── Prefs.meta │ │ ├── Prefs │ │ │ ├── PrefsBool.prefab │ │ │ ├── PrefsBool.prefab.meta │ │ │ ├── PrefsColor.prefab │ │ │ ├── PrefsColor.prefab.meta │ │ │ ├── PrefsColorSlider.prefab │ │ │ ├── PrefsColorSlider.prefab.meta │ │ │ ├── PrefsEnum.prefab │ │ │ ├── PrefsEnum.prefab.meta │ │ │ ├── PrefsImage.prefab │ │ │ ├── PrefsImage.prefab.meta │ │ │ ├── PrefsImageLabel.prefab │ │ │ ├── PrefsImageLabel.prefab.meta │ │ │ ├── PrefsLabel.prefab │ │ │ ├── PrefsLabel.prefab.meta │ │ │ ├── PrefsNumericDecimal.prefab │ │ │ ├── PrefsNumericDecimal.prefab.meta │ │ │ ├── PrefsNumericInteger.prefab │ │ │ ├── PrefsNumericInteger.prefab.meta │ │ │ ├── PrefsNumericSliderDecimal.prefab │ │ │ ├── PrefsNumericSliderDecimal.prefab.meta │ │ │ ├── PrefsNumericSliderInteger.prefab │ │ │ ├── PrefsNumericSliderInteger.prefab.meta │ │ │ ├── PrefsRect.prefab │ │ │ ├── PrefsRect.prefab.meta │ │ │ ├── PrefsSelector.prefab │ │ │ ├── PrefsSelector.prefab.meta │ │ │ ├── PrefsString.prefab │ │ │ ├── PrefsString.prefab.meta │ │ │ ├── PrefsVector2.prefab │ │ │ ├── PrefsVector2.prefab.meta │ │ │ ├── PrefsVector2Int.prefab │ │ │ ├── PrefsVector2Int.prefab.meta │ │ │ ├── PrefsVector3.prefab │ │ │ ├── PrefsVector3.prefab.meta │ │ │ ├── PrefsVector3Int.prefab │ │ │ ├── PrefsVector3Int.prefab.meta │ │ │ ├── PrefsVector4.prefab │ │ │ └── PrefsVector4.prefab.meta │ │ ├── PrefsButton.prefab │ │ ├── PrefsButton.prefab.meta │ │ ├── PrefsRemovableButton.prefab │ │ └── PrefsRemovableButton.prefab.meta │ ├── PrefsCanvas.prefab │ └── PrefsCanvas.prefab.meta │ ├── Resources.meta │ ├── Resources │ ├── PrefsGuis.prefab │ └── PrefsGuis.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ ├── Commons.meta │ ├── Commons │ │ ├── MultikeyDictionary.cs │ │ ├── MultikeyDictionary.cs.meta │ │ ├── MultistageSortedList.cs │ │ ├── MultistageSortedList.cs.meta │ │ ├── NumericUpDownInput.cs │ │ ├── NumericUpDownInput.cs.meta │ │ ├── OrderableConcurrentCache.cs │ │ ├── OrderableConcurrentCache.cs.meta │ │ ├── SortedList.cs │ │ └── SortedList.cs.meta │ ├── Components.meta │ ├── Components │ │ ├── Draggable.cs │ │ └── Draggable.cs.meta │ ├── CustomExtensions.meta │ ├── CustomExtensions │ │ ├── Attributes.meta │ │ ├── Attributes │ │ │ ├── PrefsGuiTypeAttributes.cs │ │ │ └── PrefsGuiTypeAttributes.cs.meta │ │ ├── Csharp.meta │ │ └── Csharp │ │ │ ├── EnumExtensions.cs │ │ │ ├── EnumExtensions.cs.meta │ │ │ ├── ListExtensions.cs │ │ │ ├── ListExtensions.cs.meta │ │ │ ├── StringExtensions.cs │ │ │ └── StringExtensions.cs.meta │ ├── Guis.meta │ ├── Guis │ │ ├── Factories.meta │ │ ├── Factories │ │ │ ├── Classes.meta │ │ │ ├── Classes │ │ │ │ ├── AbstractGuiHierarchy.cs │ │ │ │ ├── AbstractGuiHierarchy.cs.meta │ │ │ │ ├── CanvasLinks.cs │ │ │ │ ├── CanvasLinks.cs.meta │ │ │ │ ├── GuiHierarchiesStruct.cs │ │ │ │ ├── GuiHierarchiesStruct.cs.meta │ │ │ │ ├── GuiHierarchy.cs │ │ │ │ ├── GuiHierarchy.cs.meta │ │ │ │ ├── LinkedGuiHierarchy.cs │ │ │ │ ├── LinkedGuiHierarchy.cs.meta │ │ │ │ ├── PrefsGuiCreator.cs │ │ │ │ ├── PrefsGuiCreator.cs.meta │ │ │ │ ├── PrefsGuiPrefab.cs │ │ │ │ ├── PrefsGuiPrefab.cs.meta │ │ │ │ ├── PrefsGuiPrefabs.cs │ │ │ │ └── PrefsGuiPrefabs.cs.meta │ │ │ ├── PrefsCanvas.cs │ │ │ └── PrefsCanvas.cs.meta │ │ ├── HierarchyType.cs │ │ ├── HierarchyType.cs.meta │ │ ├── Preferences.meta │ │ ├── Preferences │ │ │ ├── Abstracts.meta │ │ │ ├── Abstracts │ │ │ │ ├── IPrefsGuiInterfaces.cs │ │ │ │ ├── IPrefsGuiInterfaces.cs.meta │ │ │ │ ├── NumericGuiBase.cs │ │ │ │ ├── NumericGuiBase.cs.meta │ │ │ │ ├── NumericSliderGuiBase.cs │ │ │ │ ├── NumericSliderGuiBase.cs.meta │ │ │ │ ├── PrefsGuiBase.cs │ │ │ │ ├── PrefsGuiBase.cs.meta │ │ │ │ ├── PrefsInputGuiBase.cs │ │ │ │ ├── PrefsInputGuiBase.cs.meta │ │ │ │ ├── TextInputGuiBase.cs │ │ │ │ ├── TextInputGuiBase.cs.meta │ │ │ │ ├── VectorGuiBase.cs │ │ │ │ ├── VectorGuiBase.cs.meta │ │ │ │ ├── VectorSliderGuiBase.cs │ │ │ │ └── VectorSliderGuiBase.cs.meta │ │ │ ├── PrefsGuiBool.cs │ │ │ ├── PrefsGuiBool.cs.meta │ │ │ ├── PrefsGuiButton.cs │ │ │ ├── PrefsGuiButton.cs.meta │ │ │ ├── PrefsGuiColor.cs │ │ │ ├── PrefsGuiColor.cs.meta │ │ │ ├── PrefsGuiColorSlider.cs │ │ │ ├── PrefsGuiColorSlider.cs.meta │ │ │ ├── PrefsGuiEnum.cs │ │ │ ├── PrefsGuiEnum.cs.meta │ │ │ ├── PrefsGuiImage.cs │ │ │ ├── PrefsGuiImage.cs.meta │ │ │ ├── PrefsGuiImageLabel.cs │ │ │ ├── PrefsGuiImageLabel.cs.meta │ │ │ ├── PrefsGuiLabel.cs │ │ │ ├── PrefsGuiLabel.cs.meta │ │ │ ├── PrefsGuiNumericDecimal.cs │ │ │ ├── PrefsGuiNumericDecimal.cs.meta │ │ │ ├── PrefsGuiNumericInteger.cs │ │ │ ├── PrefsGuiNumericInteger.cs.meta │ │ │ ├── PrefsGuiNumericSliderDecimal.cs │ │ │ ├── PrefsGuiNumericSliderDecimal.cs.meta │ │ │ ├── PrefsGuiNumericSliderInteger.cs │ │ │ ├── PrefsGuiNumericSliderInteger.cs.meta │ │ │ ├── PrefsGuiRect.cs │ │ │ ├── PrefsGuiRect.cs.meta │ │ │ ├── PrefsGuiRemovableButton.cs │ │ │ ├── PrefsGuiRemovableButton.cs.meta │ │ │ ├── PrefsGuiSelector.cs │ │ │ ├── PrefsGuiSelector.cs.meta │ │ │ ├── PrefsGuiString.cs │ │ │ ├── PrefsGuiString.cs.meta │ │ │ ├── PrefsGuiVector2.cs │ │ │ ├── PrefsGuiVector2.cs.meta │ │ │ ├── PrefsGuiVector2Int.cs │ │ │ ├── PrefsGuiVector2Int.cs.meta │ │ │ ├── PrefsGuiVector3.cs │ │ │ ├── PrefsGuiVector3.cs.meta │ │ │ ├── PrefsGuiVector3Int.cs │ │ │ ├── PrefsGuiVector3Int.cs.meta │ │ │ ├── PrefsGuiVector4.cs │ │ │ └── PrefsGuiVector4.cs.meta │ │ ├── PrefsGuiType.cs │ │ ├── PrefsGuiType.cs.meta │ │ ├── PrefsGuis.cs │ │ └── PrefsGuis.cs.meta │ ├── Hierarchies.meta │ ├── Hierarchies │ │ ├── Abstracts.meta │ │ ├── Abstracts │ │ │ ├── AbstractHierarchy.cs │ │ │ ├── AbstractHierarchy.cs.meta │ │ │ ├── EditSyncElement.cs │ │ │ └── EditSyncElement.cs.meta │ │ ├── Hierarchy.cs │ │ ├── Hierarchy.cs.meta │ │ ├── LinkedHierarchy.cs │ │ ├── LinkedHierarchy.cs.meta │ │ ├── RemovableHierarchy.cs │ │ └── RemovableHierarchy.cs.meta │ ├── Managers.meta │ ├── Managers │ │ ├── Classes.meta │ │ ├── Classes │ │ │ ├── EditSyncInterfaces.cs │ │ │ ├── EditSyncInterfaces.cs.meta │ │ │ ├── EditSyncMessages.cs │ │ │ ├── EditSyncMessages.cs.meta │ │ │ ├── IPrefsStorageSetter.cs │ │ │ ├── IPrefsStorageSetter.cs.meta │ │ │ ├── PrefsCacheExecutor.cs │ │ │ └── PrefsCacheExecutor.cs.meta │ │ ├── EditSyncManager.cs │ │ ├── EditSyncManager.cs.meta │ │ ├── PrefsManager.cs │ │ └── PrefsManager.cs.meta │ ├── Preferences.meta │ ├── Preferences │ │ ├── Abstracts.meta │ │ ├── Abstracts │ │ │ ├── EditSyncElement.cs │ │ │ ├── EditSyncElement.cs.meta │ │ │ ├── IPrefsInterfaces.cs │ │ │ ├── IPrefsInterfaces.cs.meta │ │ │ ├── PrefsBase.cs │ │ │ ├── PrefsBase.cs.meta │ │ │ ├── PrefsGuiBase.cs │ │ │ ├── PrefsGuiBase.cs.meta │ │ │ ├── PrefsGuiEvents.cs │ │ │ ├── PrefsGuiEvents.cs.meta │ │ │ ├── PrefsGuiProperties.cs │ │ │ ├── PrefsGuiProperties.cs.meta │ │ │ ├── PrefsValueBase.cs │ │ │ ├── PrefsValueBase.cs.meta │ │ │ ├── StorageSetter.cs │ │ │ └── StorageSetter.cs.meta │ │ ├── PrefsBool.cs │ │ ├── PrefsBool.cs.meta │ │ ├── PrefsButton.cs │ │ ├── PrefsButton.cs.meta │ │ ├── PrefsColor.cs │ │ ├── PrefsColor.cs.meta │ │ ├── PrefsColorSlider.cs │ │ ├── PrefsColorSlider.cs.meta │ │ ├── PrefsEnum.cs │ │ ├── PrefsEnum.cs.meta │ │ ├── PrefsFloat.cs │ │ ├── PrefsFloat.cs.meta │ │ ├── PrefsFloatSlider.cs │ │ ├── PrefsFloatSlider.cs.meta │ │ ├── PrefsImage.cs │ │ ├── PrefsImage.cs.meta │ │ ├── PrefsImageLabel.cs │ │ ├── PrefsImageLabel.cs.meta │ │ ├── PrefsInt.cs │ │ ├── PrefsInt.cs.meta │ │ ├── PrefsIntSlider.cs │ │ ├── PrefsIntSlider.cs.meta │ │ ├── PrefsLabel.cs │ │ ├── PrefsLabel.cs.meta │ │ ├── PrefsRect.cs │ │ ├── PrefsRect.cs.meta │ │ ├── PrefsSelector.cs │ │ ├── PrefsSelector.cs.meta │ │ ├── PrefsString.cs │ │ ├── PrefsString.cs.meta │ │ ├── PrefsVector2.cs │ │ ├── PrefsVector2.cs.meta │ │ ├── PrefsVector2Int.cs │ │ ├── PrefsVector2Int.cs.meta │ │ ├── PrefsVector3.cs │ │ ├── PrefsVector3.cs.meta │ │ ├── PrefsVector3Int.cs │ │ ├── PrefsVector3Int.cs.meta │ │ ├── PrefsVector4.cs │ │ └── PrefsVector4.cs.meta │ ├── Prefs.cs │ ├── Prefs.cs.meta │ ├── PrefsParametersEntity.cs │ ├── PrefsParametersEntity.cs.meta │ ├── RichTextColors.cs │ ├── RichTextColors.cs.meta │ ├── Utilities.meta │ └── Utilities │ │ ├── Abstracts.meta │ │ ├── Abstracts │ │ ├── RemovablePrefsListStorageSetter.cs │ │ └── RemovablePrefsListStorageSetter.cs.meta │ │ ├── RemovablePrefsList.cs │ │ └── RemovablePrefsList.cs.meta │ ├── Version.txt │ └── Version.txt.meta ├── Documents └── PrefsUGUI.gif ├── LICENSE ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | 36 | [Ss]aves/ 37 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /Assets/Packages.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46fac477b0b2f8b489c40b93b33bcb80 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0aab459db0e40543b1ad725f45dbf4f 3 | folderAsset: yes 4 | timeCreated: 1444725532 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: deab0e0e644e0b24992a05b9f0fa5e33 3 | folderAsset: yes 4 | timeCreated: 1444725546 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example/ExampleController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f945dc5cbb055824caae304f2da1e83b 3 | timeCreated: 1470212978 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example/GetExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0a80494f6c6a0242a08c9611b98de69 3 | timeCreated: 1470212695 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example/SetExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | using UnityEngine; 4 | 5 | namespace XmlStorage.Examples 6 | { 7 | /// 8 | /// 値のセットと保存のテスト 9 | /// 10 | [AddComponentMenu("")] 11 | public class SetExample : MonoBehaviour 12 | { 13 | /// インスタンスの保存テスト 14 | [SerializeField] 15 | private ExampleController.Test1 test1 = new ExampleController.Test1(); 16 | /// インスタンスの保存テスト 17 | private ExampleController.Test2 test2 = new ExampleController.Test2(); 18 | /// の保存テスト 19 | private Vector2 vec2 = new Vector2(0.1f, 0.2f); 20 | /// の保存テスト 21 | private Vector3 vec3 = new Vector3(1f, 2f, 3f); 22 | /// の保存テスト 23 | private Quaternion quaternion = Quaternion.Euler(new Vector3(10f, 20f, 30f)); 24 | 25 | 26 | /// 27 | /// 値をセットして保存する 28 | /// 29 | public void Execute() 30 | { 31 | this.test1.ff = 10f; 32 | this.test2.vec4 *= 10f; 33 | 34 | Storage.Set(typeof(SetExample), "SetExample", 10); 35 | Storage.SetInt("integer1", 10); 36 | Storage.SetInt("integer2", 15); 37 | Storage.SetInt("integer3", 20); 38 | Storage.SetFloat("float", 1.12345f); 39 | 40 | Storage.ChangeAggregation("Test1"); 41 | Storage.CurrentAggregation.FileName = "Test1"; 42 | Storage.Set("test1", this.test1); 43 | Storage.Set("test2", this.test2); 44 | Storage.Set("vec2", this.vec2); 45 | Storage.Set("vec3", this.vec3); 46 | Storage.Set("qua", this.quaternion); 47 | 48 | Storage.Save(); 49 | 50 | // Save to oher folder. 51 | Storage.DirectoryPath = ExampleController.SecondaryFolder; 52 | Storage.Load(); 53 | 54 | // meaninglessness. 55 | Storage.ChangeAggregation(Storage.DefaultAggregationName); 56 | 57 | Storage.SetInt("integer", 100); 58 | Storage.SetFloat("float", 10.12345f); 59 | 60 | Storage.SetInt("del_test1", 2); 61 | Storage.SetString("del_test1", "del_test1"); 62 | Storage.DeleteKey("del_test1"); 63 | 64 | Storage.SetInt("del_test2", 5); 65 | Storage.SetString("del_test2", "del_test2"); 66 | Storage.DeleteKey("del_test2", typeof(int)); 67 | 68 | Storage.Save(); 69 | Debug.Log("Finish"); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example/SetExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40f55eefcf477b84cbface510a41e856 3 | timeCreated: 1470212687 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Example/XmlStorage.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba7c8636d6e2ac44c9ffef3815996a62 3 | timeCreated: 1444725557 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6946ceda0cbf13c48a17adc05008497f 3 | folderAsset: yes 4 | timeCreated: 1444725538 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Accessors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abaa674855f93e441a9d26f02caf3709 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Accessors/Accessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 846353aed5621b14a941f1c7e4f8a377 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Accessors/Getters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7209aad5a6dbcbd4da0e6519473f7f1d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Accessors/Setters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a70c0fdc5f7bd94482ba765cfed69c3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Storage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d5fc68c742c4ee47b15b8c640571136 3 | timeCreated: 1444725579 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a2f970bc3a016b4fae6e7590bd75687 3 | folderAsset: yes 4 | timeCreated: 1469782400 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02935531c9390da41bf0ad92dc47a9a7 3 | folderAsset: yes 4 | timeCreated: 1469785699 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Accessors.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfed178cb1c8d564a9e9c3e555b8fe42 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Accessors/Accessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 439de9ae7a2ec4a41a05f57f79ba4791 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Accessors/Getters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a9c109955751b24b8cf7ee252a6bf45 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Accessors/Setters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace XmlStorage.Systems.Aggregations.Accessors 4 | { 5 | public abstract class Setters 6 | { 7 | /// 8 | /// 任意の型のデータとキーをセットする 9 | /// 10 | /// セットするデータの型(Serializable) 11 | /// セットするデータのキー 12 | /// セットするデータ 13 | public void Set(string key, T value) 14 | => this.SetValue(key, value, typeof(T)); 15 | 16 | /// 17 | /// 任意の型のデータとキーをセットする 18 | /// 19 | /// セットするデータの型(Serializable) 20 | /// セットするデータの型情報 21 | /// セットするデータのキー 22 | /// セットするデータ 23 | public void Set(Type type, string key, T value) 24 | => this.SetValue(key, value, type); 25 | 26 | /// 27 | /// float型のデータとキーをセットする 28 | /// 29 | /// セットするデータのキー 30 | /// セットするデータ 31 | public void SetFloat(string key, float value) 32 | => this.SetValue(key, value, typeof(float)); 33 | 34 | /// 35 | /// int型のデータとキーをセットする 36 | /// 37 | /// セットするデータのキー 38 | /// セットするデータ 39 | public void SetInt(string key, int value) 40 | => this.SetValue(key, value, typeof(int)); 41 | 42 | /// 43 | /// string型のデータとキーをセットする 44 | /// 45 | /// セットするデータのキー 46 | /// セットするデータ 47 | public void SetString(string key, string value) 48 | => this.SetValue(key, value, typeof(string)); 49 | 50 | /// 51 | /// bool型のデータとキーをセットする 52 | /// 53 | /// セットするデータのキー 54 | /// セットするデータ 55 | public void SetBool(string key, bool value) 56 | => this.SetValue(key, value, typeof(bool)); 57 | 58 | /// 59 | /// データとキーを内部的にセットする 60 | /// 61 | /// データの型 62 | /// データのキー 63 | /// データ 64 | /// データの型情報 65 | protected abstract void SetValue(string key, T value, Type type = null); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Accessors/Setters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb3cdaf4e74056b45a12f95eed06952c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Aggregations/Aggregation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f080448a56d4794448f5e17365b887b5 3 | timeCreated: 1469785737 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Consts.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Text; 3 | 4 | namespace XmlStorage.Systems 5 | { 6 | using Utilities; 7 | 8 | public static class XmlStorageConsts 9 | { 10 | /// パスの区切り文字 11 | public static readonly char Separator = Path.DirectorySeparatorChar; 12 | /// Macのパスの区切り文字 13 | /// に統一する 14 | public static readonly char DoubleBackSlash = '\\'; 15 | /// Windowsのパスの区切り文字 16 | /// に統一する 17 | public static readonly char Slash = '/'; 18 | /// ピリオド 19 | public static readonly string Period = @"."; 20 | 21 | /// ファイルに保存する時のエンコード情報 22 | public static readonly UTF8Encoding Encode = new UTF8Encoding(false); 23 | /// ファイルの拡張子 24 | public static readonly string Extension = FileUtils.AdjustAsExtension(Period + "xml"); 25 | 26 | /// デフォルトの集団名 27 | public static readonly string DefaultAggregationName = "Default"; 28 | /// 拡張子のファイルを全検索するための検索パターン 29 | public static readonly string ExtensionSearchPattern = "*" + Extension; 30 | 31 | /// デフォルトの保存ディレクトリのディレクトリ名 32 | public static readonly string DefaultSubDirectoryName 33 | = FileUtils.AdjustAsDirectoryPath("Saves" + Separator, creatable: false); 34 | /// デフォルトの保存ディレクトリのフルパス 35 | public static readonly string DefaultSaveDirectory 36 | = FileUtils.AdjustAsDirectoryPath( 37 | #if UNITY_EDITOR 38 | Directory.GetCurrentDirectory() 39 | #else 40 | System.AppDomain.CurrentDomain.BaseDirectory.TrimEnd('\\') 41 | #endif 42 | 43 | + Separator + DefaultSubDirectoryName 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Consts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cac9a5aad39503042a42b571bf30c9ba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Data.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31064645e89d4a946b90e7f0b65bb364 3 | folderAsset: yes 4 | timeCreated: 1470047183 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Data/DataElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae1882a49f6b85447a9c7898e7de20bc 3 | timeCreated: 1463126300 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Data/DataSet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace XmlStorage.Systems.Data 5 | { 6 | using Utilities; 7 | using Elements = List; 8 | 9 | /// 10 | /// データ群をファイルに保存する時のデータ形式 11 | /// 12 | [Serializable] 13 | public sealed class DataSet 14 | { 15 | /// フルパス 16 | public string FullPath => Storage.DirectoryPath + this.FileName; 17 | /// 集団名 18 | public string AggregationName { get; set; } = ""; 19 | /// ファイル名 20 | public string FileName { get; set; } = ""; 21 | /// 保存するデータ群 22 | public Elements Elements { get; set; } = new Elements(); 23 | 24 | 25 | /// 26 | /// コンストラクタ 27 | /// 28 | /// シリアライズするのにデフォルトコンストラクタが必要 29 | public DataSet() { } 30 | 31 | /// 32 | /// コンストラクタ 33 | /// 34 | /// 集団名 35 | /// ファイル名 36 | /// 拡張子 37 | /// フォルダ名 38 | /// 保存するデータ群 39 | public DataSet(string aggregationName, string fileName, Elements elements) 40 | { 41 | this.AggregationName = aggregationName; 42 | this.FileName = FileUtils.AdjustAsFileName(fileName, XmlStorageConsts.Extension); 43 | this.Elements = (elements ?? new Elements()); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Data/DataSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf4a23dddeca76249af1587694df38c0 3 | timeCreated: 1470047178 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3cfab842bf2f1b45b06734f32ee70bd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Utilities/Converter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 086f05ccd944f444c85e4975f3dc2bc0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Scripts/Systems/Utilities/FileUtils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae634da429418e641850bc98b645a851 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Version.txt: -------------------------------------------------------------------------------- 1 | 7.1.2 2 | -------------------------------------------------------------------------------- /Assets/Packages/XmlStorage/Version.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78c7373b95823ab4bb6d9d6b2028e902 3 | timeCreated: 1482812879 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4dbaa317a6c80b4d8969f20751b32ab 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 529c92f2d9038e64baea7d142d13a1a4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/PrefsUGUI.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eff7f81bc88eb7b4d851fa584101eadb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Scripts/Classes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cc083c891364bc4bbec1be80f643d5b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Scripts/Example.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21f00f1ac44a51645b3a62679bbcb467 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Scripts/Structs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PrefsUGUI.Examples 4 | { 5 | public static class GuiHierarchies 6 | { 7 | public static readonly Hierarchy Test1Gui = new Hierarchy("Test1", 1); 8 | public static readonly Hierarchy Test1Ex2Gui = new Hierarchy("Ex2", 0, Test1Gui, 9 | onCreatedGui: prefs => prefs.BottomMargin = 25f 10 | ); 11 | public static readonly Hierarchy Test1Ex1Gui = new Hierarchy("Ex1", 0, Test1Gui); 12 | 13 | public static readonly LinkedHierarchy LinkedTest1Gui = new LinkedHierarchy("Linked Test1", Test1Gui, 3, null, 14 | onCreatedGui: hierarchy => hierarchy.VisibleGUI = true 15 | ); 16 | 17 | public static readonly Hierarchy Test0Gui = new Hierarchy("Test0", 0); 18 | public static readonly Hierarchy Test2Gui = new Hierarchy("Test2", 2); 19 | } 20 | 21 | [Serializable] 22 | public enum TestEnum 23 | { 24 | MinusOne = -1, Zero = 0, Four = 4 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Scripts/Structs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209083fcf77675c4d90552038f994cc9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b2b2b9b85dd2aa4094001d5ecbe1132 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Examples/Textures/PrefsImage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a3geek/PrefsUGUI/3a844a3ba0708a25b04ee3b127adf25a0d91a800/Assets/PrefsUGUI/Examples/Textures/PrefsImage.jpg -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca6e98876b6f6334db08325ead1c75f0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/EventSystem.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1247960404928532} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1247960404928532 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4813698143209692} 22 | - component: {fileID: 114878988391101584} 23 | - component: {fileID: 114587874322213918} 24 | m_Layer: 0 25 | m_Name: EventSystem 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4813698143209692 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1247960404928532} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!114 &114587874322213918 45 | MonoBehaviour: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1247960404928532} 50 | m_Enabled: 1 51 | m_EditorHideFlags: 0 52 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} 53 | m_Name: 54 | m_EditorClassIdentifier: 55 | m_HorizontalAxis: Horizontal 56 | m_VerticalAxis: Vertical 57 | m_SubmitButton: Submit 58 | m_CancelButton: Cancel 59 | m_InputActionsPerSecond: 10 60 | m_RepeatDelay: 0.5 61 | m_ForceModuleActive: 0 62 | --- !u!114 &114878988391101584 63 | MonoBehaviour: 64 | m_ObjectHideFlags: 1 65 | m_PrefabParentObject: {fileID: 0} 66 | m_PrefabInternal: {fileID: 100100000} 67 | m_GameObject: {fileID: 1247960404928532} 68 | m_Enabled: 1 69 | m_EditorHideFlags: 0 70 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} 71 | m_Name: 72 | m_EditorClassIdentifier: 73 | m_FirstSelected: {fileID: 0} 74 | m_sendNavigationEvents: 1 75 | m_DragThreshold: 10 76 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/EventSystem.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fffc46b307ac75440a4f5b453db713ed 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e14d75419daabc41af5f07fa556c36d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38b36f8f766d54345a8dcf780cdeff81 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsBool.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04bfdbbbd6bf889488aa766483ee579d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsColor.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be7acb095ec35b649bfe5cf6a71599c3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsColorSlider.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbe501a7a3fd978408beaaddac6b88c1 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsEnum.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5d5ffeadaa98814d896f26642d7c8b5 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsImage.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 706e8581b4d6c164ca7a2666434d0f8d 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsImageLabel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bdce11f31a54e641838985d763d817f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsLabel.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e1ca0b8eeedc604581a9743e958c359 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsNumericDecimal.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4e1e805f3bb2d84081b033c7f4a1676 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsNumericInteger.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 19ede43413eb24e41b30a31589408401 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsNumericSliderDecimal.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7183933936d666d48b0cedf7b96060bc 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsNumericSliderInteger.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77c6e819119400941ab8a138588bdf9a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsRect.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75845da7f46e1834ca906a08c41bfc2a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsSelector.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1718a7bf22f0af4ab0c503e29cdf666 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsString.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e079881dbfd2624da12272d40764b70 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsVector2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08b134b2a66194b4daa16fa942dc773c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsVector2Int.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e097baa398c0db74b89e5ce46818e4c3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsVector3.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09a3fca986ffeb042aff99bd0a425c3a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsVector3Int.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0852f042bcb6e1d4cbaab16def458036 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/Prefs/PrefsVector4.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 644c64d084286164a9b4ab3fa51fa776 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/PrefsButton.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a15efa66ad6781b42b470f02e578f1f8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/Guis/PrefsRemovableButton.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c782700466001b4ebb3ea66b76bf518 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Prefabs/PrefsCanvas.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8405a20cf6c799048b4e0cf9ec3bce1b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c69be0bfea66a3549a629fd203daccfa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Resources/PrefsGuis.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1841957839037182 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4561566469360706} 12 | - component: {fileID: 114549648357048676} 13 | m_Layer: 0 14 | m_Name: PrefsGuis 15 | m_TagString: Untagged 16 | m_Icon: {fileID: 0} 17 | m_NavMeshLayer: 0 18 | m_StaticEditorFlags: 0 19 | m_IsActive: 1 20 | --- !u!4 &4561566469360706 21 | Transform: 22 | m_ObjectHideFlags: 0 23 | m_CorrespondingSourceObject: {fileID: 0} 24 | m_PrefabInstance: {fileID: 0} 25 | m_PrefabAsset: {fileID: 0} 26 | m_GameObject: {fileID: 1841957839037182} 27 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 28 | m_LocalPosition: {x: 0, y: 0, z: 0} 29 | m_LocalScale: {x: 1, y: 1, z: 1} 30 | m_Children: [] 31 | m_Father: {fileID: 0} 32 | m_RootOrder: 0 33 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 34 | --- !u!114 &114549648357048676 35 | MonoBehaviour: 36 | m_ObjectHideFlags: 0 37 | m_CorrespondingSourceObject: {fileID: 0} 38 | m_PrefabInstance: {fileID: 0} 39 | m_PrefabAsset: {fileID: 0} 40 | m_GameObject: {fileID: 1841957839037182} 41 | m_Enabled: 1 42 | m_EditorHideFlags: 0 43 | m_Script: {fileID: 11500000, guid: f9d89f7ceaeb9a34eba02a7d7ec67527, type: 3} 44 | m_Name: 45 | m_EditorClassIdentifier: 46 | prefsCanvasPrefab: {fileID: 114725242622083018, guid: 8405a20cf6c799048b4e0cf9ec3bce1b, 47 | type: 3} 48 | eventSystemPrefab: {fileID: 114878988391101584, guid: fffc46b307ac75440a4f5b453db713ed, 49 | type: 3} 50 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Resources/PrefsGuis.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26c919b9ea3ff314f9ffbe6200f6e541 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbca7d7e910505b40af336905be80bbd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 855425b325ea18441ae5a11ed47910b5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/MultikeyDictionary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PrefsUGUI.Commons 5 | { 6 | public class MultikeyDictionary where T1 : IComparable 7 | { 8 | public IReadOnlyDictionary Dictionary => this.dictionary; 9 | 10 | private Dictionary dictionary = new Dictionary(); 11 | private Dictionary secondKey = new Dictionary(); 12 | 13 | 14 | public bool TryGetValue(T1 key, out TValue value) 15 | => this.dictionary.TryGetValue(key, out value); 16 | 17 | public bool TryGetValue(T2 key, out TValue value) 18 | { 19 | if(this.secondKey.TryGetValue(key, out var key1) == true) 20 | { 21 | return this.dictionary.TryGetValue(key1, out value); 22 | } 23 | 24 | value = default; 25 | return false; 26 | } 27 | 28 | public bool TryGetKeyPair(T2 key2, out T1 key1) 29 | => this.secondKey.TryGetValue(key2, out key1); 30 | 31 | public bool TryGetKeyPair(T1 key1, out T2 key2) 32 | { 33 | foreach(var pair in this.secondKey) 34 | { 35 | if(pair.Value.CompareTo(key1) == 0) 36 | { 37 | key2 = pair.Key; 38 | return true; 39 | } 40 | } 41 | 42 | key2 = default; 43 | return false; 44 | } 45 | 46 | public TValue GetOrAdd(T1 key1, T2 key2, Func creator) 47 | { 48 | if(this.dictionary.TryGetValue(key1, out var value) == true) 49 | { 50 | return value; 51 | } 52 | 53 | value = creator(); 54 | this.dictionary[key1] = value; 55 | this.secondKey[key2] = key1; 56 | 57 | return value; 58 | } 59 | 60 | public bool Remove(T1 key1) 61 | => this.dictionary.Remove(key1); 62 | 63 | public bool Remove(T2 key2) 64 | => this.TryGetKeyPair(key2, out var key1) == true && this.dictionary.Remove(key1); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/MultikeyDictionary.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30a7b73ae21988e4e9d290a24a6b8f42 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/MultistageSortedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | namespace PrefsUGUI.Commons 6 | { 7 | public sealed class MultistageSortedList : SortedList, IEnumerable where T : class 8 | { 9 | private static readonly Func DefaultSorter = (e1, e2) => 0; 10 | 11 | private Func sorter = null; 12 | 13 | 14 | public MultistageSortedList() : this(DefaultSorter) 15 | { 16 | } 17 | 18 | public MultistageSortedList(Func equalSorter) 19 | { 20 | this.sorter = equalSorter ?? DefaultSorter; 21 | } 22 | 23 | public override int Add(T item, int order) 24 | { 25 | for(var i = 0; i < this.list.Count; i++) 26 | { 27 | if(this.list[i].order == order) 28 | { 29 | var e = this.list[i].item; 30 | var sorted = this.sorter(e, item); 31 | 32 | this.list[i] = (sorted <= 0 ? e : item, order); 33 | item = sorted <= 0 ? item : e; 34 | } 35 | 36 | if(this.list[i].order > order) 37 | { 38 | this.list.Insert(i, (item, order)); 39 | return i; 40 | } 41 | } 42 | 43 | this.list.Add((item, order)); 44 | return this.list.Count - 1; 45 | } 46 | 47 | IEnumerator IEnumerable.GetEnumerator() 48 | => this.GetEnumerator(); 49 | 50 | public static explicit operator List(MultistageSortedList sortedList) 51 | => new List(sortedList.Items); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/MultistageSortedList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 530e8f9a4c7fb95439ff7aba0e951fb3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/NumericUpDownInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace PrefsUGUI.Commons 6 | { 7 | [Serializable] 8 | public class NumericUpDownInput 9 | { 10 | public float UpDownStep 11 | { 12 | get => this.upDownStep; 13 | set => this.upDownStep = value; 14 | } 15 | public float StepDelay 16 | { 17 | get => this.stepDelay; 18 | set => this.stepDelay = value; 19 | } 20 | 21 | [SerializeField, Range(0f, 10f)] 22 | protected float upDownStep = 0.01f; 23 | [SerializeField, Range(0f, 5f)] 24 | protected float stepDelay = 0.05f; 25 | 26 | protected float stepTime = -1f; 27 | 28 | 29 | public bool Update(InputField field, out float deltaValue) 30 | { 31 | deltaValue = 0f; 32 | 33 | if(field == null || field.isFocused == false || this.IsNumericType(field) == false) 34 | { 35 | return false; 36 | } 37 | if(this.stepTime >= 0f) 38 | { 39 | this.stepTime += Time.deltaTime; 40 | if(this.stepTime < this.stepDelay) 41 | { 42 | return false; 43 | } 44 | 45 | this.stepTime = -1f; 46 | } 47 | 48 | int dir; 49 | if(Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKey(KeyCode.UpArrow)) 50 | { 51 | dir = 1; 52 | } 53 | else if(Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKey(KeyCode.DownArrow)) 54 | { 55 | dir = -1; 56 | } 57 | else 58 | { 59 | return false; 60 | } 61 | 62 | deltaValue = dir * this.upDownStep; 63 | this.stepTime = 0f; 64 | 65 | return true; 66 | } 67 | 68 | protected virtual bool IsNumericType(InputField field) 69 | => field.contentType == InputField.ContentType.DecimalNumber || field.contentType == InputField.ContentType.IntegerNumber; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/NumericUpDownInput.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84dd2be50e360f746a838a42b654cfe2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/OrderableConcurrentCache.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | 4 | namespace PrefsUGUI.Commons 5 | { 6 | public class OrderableConcurrentCache 7 | { 8 | public interface ITaker 9 | { 10 | void Take(Value value); 11 | } 12 | 13 | private ConcurrentDictionary caches = new ConcurrentDictionary(); 14 | private ConcurrentQueue orders = new ConcurrentQueue(); 15 | 16 | 17 | public void Add(Key key, Value value) 18 | { 19 | this.caches[key] = value; 20 | this.orders.Enqueue(key); 21 | } 22 | 23 | public void Remove(Key key) 24 | { 25 | this.caches.TryRemove(key, out var _); 26 | } 27 | 28 | public void TakeEach(ITaker taker) 29 | { 30 | while(this.orders.TryDequeue(out var key) == true) 31 | { 32 | if(this.caches.TryRemove(key, out var value) == true) 33 | { 34 | taker.Take(value); 35 | } 36 | } 37 | 38 | this.caches.Clear(); 39 | } 40 | 41 | public void TakeEach(Action action) 42 | { 43 | while(this.orders.TryDequeue(out var key) == true) 44 | { 45 | if(this.caches.TryRemove(key, out var value) == true) 46 | { 47 | action?.Invoke(value); 48 | } 49 | } 50 | 51 | this.caches.Clear(); 52 | } 53 | 54 | public static void AllTakeEach(ITaker taker, params OrderableConcurrentCache[] caches) 55 | { 56 | for(var i = 0; i < caches.Length; i++) 57 | { 58 | caches[i]?.TakeEach(taker); 59 | } 60 | } 61 | 62 | public static void AllTakeEach(Action action, params OrderableConcurrentCache[] caches) 63 | { 64 | for(var i = 0; i < caches.Length; i++) 65 | { 66 | caches[i]?.TakeEach(action); 67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/OrderableConcurrentCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0282c60f5a8636a40b527c86eb4c360a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/SortedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | namespace PrefsUGUI.Commons 6 | { 7 | public class SortedList : IEnumerable where T : class 8 | { 9 | public virtual T this[int index] => this.list[index].item; 10 | 11 | public virtual int Count => this.list.Count; 12 | public virtual IReadOnlyList Items => this.list.ConvertAll(t => t.item); 13 | public virtual IReadOnlyList Orders => this.list.ConvertAll(t => t.order); 14 | 15 | protected List<(T item, int order)> list = new List<(T item, int order)>(); 16 | 17 | 18 | public virtual int Add(T item, int order) 19 | { 20 | for(var i = 0; i < this.list.Count; i++) 21 | { 22 | if(this.list[i].order > order) 23 | { 24 | this.list.Insert(i, (item, order)); 25 | return i; 26 | } 27 | } 28 | 29 | this.list.Add((item, order)); 30 | return this.list.Count - 1; 31 | } 32 | 33 | public virtual bool Remove(T item) 34 | { 35 | for(var i = 0; i < this.list.Count; i++) 36 | { 37 | if(this.list[i].item == item) 38 | { 39 | this.list.RemoveAt(i); 40 | return true; 41 | } 42 | } 43 | 44 | return false; 45 | } 46 | 47 | public virtual void Clear() 48 | => this.list.Clear(); 49 | 50 | public virtual IEnumerator GetEnumerator() 51 | { 52 | for(var i = 0; i < this.Count; i++) 53 | { 54 | yield return this.list[i].item; 55 | } 56 | } 57 | 58 | IEnumerator IEnumerable.GetEnumerator() 59 | => this.GetEnumerator(); 60 | 61 | public static explicit operator List(SortedList sortedList) 62 | => new List(sortedList.Items); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Commons/SortedList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02bdd3d065b06f94c937b7c760346856 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0bd14a6f459de0a4d8ef3ef8e74ee2d4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Components/Draggable.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.EventSystems; 3 | 4 | namespace PrefsUGUI.Components 5 | { 6 | [AddComponentMenu("")] 7 | [DisallowMultipleComponent] 8 | public class Draggable : MonoBehaviour, IBeginDragHandler, IDragHandler 9 | { 10 | protected Vector2 position = Vector2.zero; 11 | 12 | 13 | public virtual void OnBeginDrag(PointerEventData pointerEventData) 14 | { 15 | this.position = pointerEventData.position; 16 | } 17 | 18 | public virtual void OnDrag(PointerEventData pointerEventData) 19 | { 20 | var d = pointerEventData.position - this.position; 21 | var pos = this.transform.position; 22 | 23 | this.transform.position = d + new Vector2(pos.x, pos.y); 24 | this.position = pointerEventData.position; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Components/Draggable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce432a8068861a8459fe94361f727c3f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 324400932fcd4f8489f07a6cc8f66507 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Attributes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd8803ed037cee04cab3c35df88984bd 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Attributes/PrefsGuiTypeAttributes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PrefsUGUI.CustomExtensions.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)] 6 | public sealed class PrefsGuiComponentTypeAttribute : Attribute 7 | { 8 | public Type ComponentType { get; } = null; 9 | 10 | 11 | public PrefsGuiComponentTypeAttribute(Type type) 12 | { 13 | this.ComponentType = type; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Attributes/PrefsGuiTypeAttributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 889a119c0b0aaf14db38524fdc66c6ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06cb1f828f6c66248bbee0977c241925 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/EnumExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | 6 | namespace PrefsUGUI.CustomExtensions.Csharp 7 | { 8 | public static class EnumExtensions 9 | { 10 | public static AttributeType GetAttribute(this Enum enumKey) 11 | where AttributeType : Attribute 12 | => EnumAttributesCache 13 | .GetOrAdd(enumKey, e => enumKey.GetAttributes()?.FirstOrDefault()); 14 | 15 | private static IEnumerable GetAttributes(this Enum enumKey) 16 | where AttributeType : Attribute 17 | { 18 | var fieldInfo = enumKey.GetType().GetField(enumKey.ToString()); 19 | var attributes = fieldInfo.GetCustomAttributes(typeof(AttributeType), false).Cast(); 20 | 21 | return attributes ?? Enumerable.Empty(); 22 | } 23 | 24 | private static class EnumAttributesCache where AttributeType : Attribute 25 | { 26 | private static ConcurrentDictionary Dictionary { get; } 27 | = new ConcurrentDictionary(); 28 | 29 | 30 | internal static AttributeType GetOrAdd(Enum enumKey, Func valueFactory) 31 | => Dictionary.GetOrAdd(enumKey, valueFactory); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/EnumExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 667cf93f4837d5948975ec7feaa14cbc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/ListExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace PrefsUGUI.CustomExtensions.Csharp 7 | { 8 | public interface IListCreator 9 | { 10 | T Create(int index); 11 | } 12 | 13 | public interface IListDestoryer 14 | { 15 | void Destroy(int index, T item); 16 | } 17 | 18 | public static class ListExtensions 19 | { 20 | public static void SetCount(this List items, int count, IListCreator creator, IListDestoryer destroyer) 21 | { 22 | if(items.Count == count) 23 | { 24 | return; 25 | } 26 | 27 | for(var i = count; i < items.Count; i++) 28 | { 29 | destroyer?.Destroy(i, items[i]); 30 | } 31 | items.RemoveRange(Mathf.Min(count, items.Count), Mathf.Max(items.Count - count, 0)); 32 | 33 | for(var i = items.Count; i < count; i++) 34 | { 35 | items.Add(creator.Create(i)); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/ListExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3b9f31d4676fd949a6a42e2431ec168 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace PrefsUGUI.CustomExtensions.Csharp 2 | { 3 | public static class StringExtensions 4 | { 5 | public static int ToInt(this string str, int defaultValue = default) 6 | => int.TryParse(str, out var v) == true ? v : defaultValue; 7 | 8 | public static float ToFloat(this string str, float defaultValue = default) 9 | => float.TryParse(str, out var v) == true ? v : defaultValue; 10 | 11 | public static string ToLabelable(this string str) 12 | { 13 | var label = str.Length > 0 ? str[0].ToString() : ""; 14 | for(var i = 1; i < str.Length; i++) 15 | { 16 | var c = str[i]; 17 | var next = i + 1 < str.Length ? str[i + 1] : '\0'; 18 | var previous = i - 1 > 0 ? str[i - 1] : '\0'; 19 | var isNeedSpace = char.IsUpper(c) && (char.IsLower(previous) || char.IsLower(next)); 20 | 21 | label += (isNeedSpace ? " " : "") + c.ToString(); 22 | } 23 | 24 | return label; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/CustomExtensions/Csharp/StringExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65c5c3c21394ae545a300fbc4ecc02ff 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Guis.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f13d4c9a821f0924ba3ddc641e3c0579 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Guis/Factories.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef612a60c7968b248a6daece57d4ef7f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Guis/Factories/Classes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 845619bbc9208fa4f83026b66025287a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Guis/Factories/Classes/AbstractGuiHierarchy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18ace418b52691a4589c58b6c3d8dac4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/PrefsUGUI/Scripts/Guis/Factories/Classes/CanvasLinks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace PrefsUGUI.Guis.Factories.Classes 6 | { 7 | using Components; 8 | 9 | [Serializable] 10 | public sealed class CanvasLinks 11 | { 12 | public Canvas Canvas => this.canvas; 13 | public RectTransform Panel => this.panel; 14 | public Text Hierarchy => this.hierarchy; 15 | public ScrollRect Scroll => this.scrollrect; 16 | public RectTransform Viewport => this.viewport; 17 | public RectTransform Content => this.content; 18 | public Button Save => this.save; 19 | public Button Close => this.close; 20 | public Button Discard => this.discard; 21 | 22 | [SerializeField] 23 | private Canvas canvas = null; 24 | [SerializeField] 25 | private RectTransform panel = null; 26 | [SerializeField] 27 | private Text hierarchy = null; 28 | [SerializeField] 29 | private ScrollRect scrollrect = null; 30 | [SerializeField] 31 | private RectTransform viewport = null; 32 | [SerializeField] 33 | private RectTransform content = null; 34 | [SerializeField] 35 | private Button discard = null; 36 | [SerializeField] 37 | private Button save = null; 38 | [SerializeField] 39 | private Button close = null; 40 | 41 | 42 | public void Reset(GameObject obj) 43 | { 44 | this.canvas = obj.GetComponent(); 45 | this.scrollrect = obj.GetComponentInChildren(); 46 | this.hierarchy = obj.GetComponentInChildren(); 47 | 48 | var dra = obj.GetComponentInChildren(); 49 | this.panel = dra != null ? (RectTransform)dra.transform : null; 50 | 51 | var mask = obj.GetComponentInChildren(); 52 | this.viewport = mask != null ? (RectTransform)mask.transform : null; 53 | 54 | var content = obj.GetComponentInChildren(); 55 | this.content = content != null ? (RectTransform)content.transform : null; 56 | 57 | var buttons = obj.GetComponentsInChildren