├── .editorconfig ├── .gitattributes ├── .gitignore ├── Assets └── .gitkeep ├── LICENSE ├── Packages ├── .gitignore ├── com.vrchat.core.vpm-resolver │ ├── Editor.meta │ ├── Editor │ │ ├── Dependencies.meta │ │ ├── Dependencies │ │ │ ├── ICSharpCode.SharpZipLib.dll │ │ │ ├── ICSharpCode.SharpZipLib.dll.meta │ │ │ ├── SemanticVersioning.License.txt │ │ │ ├── SemanticVersioning.License.txt.meta │ │ │ ├── SemanticVersioning.dll │ │ │ ├── SemanticVersioning.dll.meta │ │ │ ├── Serilog.License.txt │ │ │ ├── Serilog.License.txt.meta │ │ │ ├── Serilog.Sinks.File.dll │ │ │ ├── Serilog.Sinks.File.dll.meta │ │ │ ├── Serilog.Sinks.File.txt │ │ │ ├── Serilog.Sinks.File.txt.meta │ │ │ ├── Serilog.Sinks.Unity3D.License.md │ │ │ ├── Serilog.Sinks.Unity3D.License.md.meta │ │ │ ├── Serilog.Sinks.Unity3D.dll │ │ │ ├── Serilog.Sinks.Unity3D.dll.meta │ │ │ ├── Serilog.dll │ │ │ ├── Serilog.dll.meta │ │ │ ├── YamlDotNet.License.txt │ │ │ ├── YamlDotNet.License.txt.meta │ │ │ ├── YamlDotNet.dll │ │ │ ├── YamlDotNet.dll.meta │ │ │ ├── vpm-core-lib.dll │ │ │ └── vpm-core-lib.dll.meta │ │ ├── PackageMaker.meta │ │ ├── PackageMaker │ │ │ ├── PackageMakerWindow.cs │ │ │ ├── PackageMakerWindow.cs.meta │ │ │ ├── PackageMakerWindowData.cs │ │ │ └── PackageMakerWindowData.cs.meta │ │ ├── Resolver.meta │ │ ├── Resolver │ │ │ ├── Resolver.cs │ │ │ ├── Resolver.cs.meta │ │ │ ├── ResolverWindow.cs │ │ │ └── ResolverWindow.cs.meta │ │ ├── Resources.meta │ │ ├── Resources │ │ │ ├── PackageMakerWindowStyle.uss │ │ │ ├── PackageMakerWindowStyle.uss.meta │ │ │ ├── ResolverWindowStyle.uss │ │ │ └── ResolverWindowStyle.uss.meta │ │ ├── com.vrchat.core.vpm-resolver.Editor.asmdef │ │ └── com.vrchat.core.vpm-resolver.Editor.asmdef.meta │ ├── License.md │ ├── License.md.meta │ ├── package.json │ └── package.json.meta ├── manifest.json ├── net.koyashiro.genericdatacontainer.tests │ ├── Test.unity │ ├── Test.unity.meta │ ├── Tests.meta │ ├── Tests │ │ ├── Runtime.meta │ │ └── Runtime │ │ │ ├── DataDictionaryTest.asset │ │ │ ├── DataDictionaryTest.asset.meta │ │ │ ├── DataDictionaryTest.cs │ │ │ ├── DataDictionaryTest.cs.meta │ │ │ ├── DataListAddRangeTest.asset │ │ │ ├── DataListAddRangeTest.asset.meta │ │ │ ├── DataListAddRangeTest.cs │ │ │ ├── DataListAddRangeTest.cs.meta │ │ │ ├── DataListAddTest.asset │ │ │ ├── DataListAddTest.asset.meta │ │ │ ├── DataListAddTest.cs │ │ │ ├── DataListAddTest.cs.meta │ │ │ ├── DataListGetValueTest.asset │ │ │ ├── DataListGetValueTest.asset.meta │ │ │ ├── DataListGetValueTest.cs │ │ │ ├── DataListGetValueTest.cs.meta │ │ │ ├── DataListInsertRangeTest.asset │ │ │ ├── DataListInsertRangeTest.asset.meta │ │ │ ├── DataListInsertRangeTest.cs │ │ │ ├── DataListInsertRangeTest.cs.meta │ │ │ ├── DataListInsertTest.asset │ │ │ ├── DataListInsertTest.asset.meta │ │ │ ├── DataListInsertTest.cs │ │ │ ├── DataListInsertTest.cs.meta │ │ │ ├── DataListNewTest.asset │ │ │ ├── DataListNewTest.asset.meta │ │ │ ├── DataListNewTest.cs │ │ │ ├── DataListNewTest.cs.meta │ │ │ ├── DataListRemoveAtTest.asset │ │ │ ├── DataListRemoveAtTest.asset.meta │ │ │ ├── DataListRemoveAtTest.cs │ │ │ ├── DataListRemoveAtTest.cs.meta │ │ │ ├── DataListRemoveRangeTest.asset │ │ │ ├── DataListRemoveRangeTest.asset.meta │ │ │ ├── DataListRemoveRangeTest.cs │ │ │ ├── DataListRemoveRangeTest.cs.meta │ │ │ ├── DataListRemoveTest.asset │ │ │ ├── DataListRemoveTest.asset.meta │ │ │ ├── DataListRemoveTest.cs │ │ │ ├── DataListRemoveTest.cs.meta │ │ │ ├── DataListToArrayTest.asset │ │ │ ├── DataListToArrayTest.asset.meta │ │ │ ├── DataListToArrayTest.cs │ │ │ ├── DataListToArrayTest.cs.meta │ │ │ ├── DataListToObjectArray.asset │ │ │ ├── DataListToObjectArray.asset.meta │ │ │ ├── DataListToObjectArrayTest.cs │ │ │ ├── DataListToObjectArrayTest.cs.meta │ │ │ ├── DataListTryGetValueTest.asset │ │ │ ├── DataListTryGetValueTest.asset.meta │ │ │ ├── DataListTryGetValueTest.cs │ │ │ ├── DataListTryGetValueTest.cs.meta │ │ │ ├── Koyashiro.GenericDataContainer.Tests.asmdef │ │ │ ├── Koyashiro.GenericDataContainer.Tests.asmdef.meta │ │ │ ├── Koyashiro.GenericDataContainer.asset │ │ │ ├── Koyashiro.GenericDataContainer.asset.meta │ │ │ ├── TestUserDefinedClass.asset │ │ │ ├── TestUserDefinedClass.asset.meta │ │ │ ├── UserDefinedClass.cs │ │ │ ├── UserDefinedClass.cs.meta │ │ │ ├── UserDefinedEnum.cs │ │ │ └── UserDefinedEnum.cs.meta │ ├── package.json │ └── package.json.meta ├── net.koyashiro.genericdatacontainer │ ├── LICENSE │ ├── LICENSE.meta │ ├── README.md │ ├── README.md.meta │ ├── Runtime.meta │ ├── Runtime │ │ ├── DataDictionary.cs │ │ ├── DataDictionary.cs.meta │ │ ├── DataDictionaryExt.cs │ │ ├── DataDictionaryExt.cs.meta │ │ ├── DataList.cs │ │ ├── DataList.cs.meta │ │ ├── DataListExt.cs │ │ ├── DataListExt.cs.meta │ │ ├── Internal.meta │ │ ├── Internal │ │ │ ├── DataTokenUtil.cs │ │ │ └── DataTokenUtil.cs.meta │ │ ├── Koyashiro.GenericDataContainer.asmdef │ │ ├── Koyashiro.GenericDataContainer.asmdef.meta │ │ ├── Koyashiro.GenericDataContainer.asset │ │ └── Koyashiro.GenericDataContainer.asset.meta │ ├── package.json │ └── package.json.meta ├── packages-lock.json └── vpm-manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Packages │ └── com.vrchat.base │ │ └── settings.json ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset └── XRSettings.asset └── README.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.md] 10 | indent_style = space 11 | indent_size = 2 12 | trim_trailing_whitespace = false 13 | 14 | [*.cs] 15 | indent_style = space 16 | indent_size = 4 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | 74 | # vscode 75 | .vscode/ 76 | 77 | # Assets 78 | Assets/ 79 | 80 | # Exports 81 | Exports/ 82 | -------------------------------------------------------------------------------- /Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Assets/.gitkeep -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 koyashiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/.gitignore: -------------------------------------------------------------------------------- 1 | /*/ 2 | !com.vrchat.core.*/ 3 | !net.koyashiro.genericdatacontainer/ 4 | !net.koyashiro.genericdatacontainer.tests/ 5 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1058b5946fb23674cad310b1f4bd5b61 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f4e8a9c940ed84943bb0433246ec42bb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/ICSharpCode.SharpZipLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/ICSharpCode.SharpZipLib.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/ICSharpCode.SharpZipLib.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec897c206a99abe41b093d5cc5ddc3fe 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/SemanticVersioning.License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Adam Reeve 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/SemanticVersioning.License.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1417544c34d9a4f4aacebf76247940a9 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/SemanticVersioning.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/SemanticVersioning.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/SemanticVersioning.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65d82c6541a90644390df2caa29c2209 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.License.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.License.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a7454bc513adb84d9ae85ed7e7268ba 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.File.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.File.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.File.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c56563958a156145b708466db0e35cc 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.File.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.File.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca344e99cdd379947ab3e8e5b346428c 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.Unity3D.License.md: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2020 Kurai András 5 | Copyright (c) 2022-Present VRChat Inc. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.Unity3D.License.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 598e678340a8c6e4e9a3debcdc6a9579 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.Unity3D.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.Unity3D.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.Sinks.Unity3D.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc1421f162f0354d8a64d569417d9c9 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/Serilog.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 702a5a2579f8edf43b5e7bfb2f52e2c6 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/YamlDotNet.License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/YamlDotNet.License.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3547422b181c5af49901e93c1122bbdd 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/YamlDotNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/YamlDotNet.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/YamlDotNet.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fd667e0ec0d1d84c9e17dad407f2272 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 0 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 1 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/vpm-core-lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koyashiro/generic-data-container/b8bcc980f316cda7ffc5aa3ccd718b3539c05806/Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/vpm-core-lib.dll -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Dependencies/vpm-core-lib.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 140aba2a5b760e94cb3ed9f39a52610a 3 | PluginImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | iconMap: {} 7 | executionOrder: {} 8 | defineConstraints: [] 9 | isPreloaded: 0 10 | isOverridable: 1 11 | isExplicitlyReferenced: 0 12 | validateReferences: 1 13 | platformData: 14 | - first: 15 | Any: 16 | second: 17 | enabled: 0 18 | settings: {} 19 | - first: 20 | Editor: Editor 21 | second: 22 | enabled: 1 23 | settings: 24 | DefaultValueInitialized: true 25 | - first: 26 | Windows Store Apps: WindowsStoreApps 27 | second: 28 | enabled: 0 29 | settings: 30 | CPU: AnyCPU 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/PackageMaker.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5da3ddd939264fc40a113d615f3ca77a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/PackageMaker/PackageMakerWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d75fcaecb8b9e7f4bbe783e5f4c9838a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/PackageMaker/PackageMakerWindowData.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using UnityEditor; 3 | using UnityEngine; 4 | using VRC.PackageManagement.PackageMaker; 5 | 6 | public class PackageMakerWindowData : ScriptableObject 7 | { 8 | public static string defaultAssetPath = Path.Combine("Assets", "PackageMakerWindowData.asset"); 9 | public string targetAssetFolder; 10 | public string packageID; 11 | public PackageMakerWindow.VRCPackageEnum relatedPackage; 12 | 13 | public static PackageMakerWindowData GetOrCreate() 14 | { 15 | var existingData = AssetDatabase.AssetPathToGUID(defaultAssetPath); 16 | if (string.IsNullOrWhiteSpace(existingData)) 17 | { 18 | return Create(); 19 | } 20 | else 21 | { 22 | var saveData = AssetDatabase.LoadAssetAtPath(defaultAssetPath); 23 | if (saveData == null) 24 | { 25 | Debug.LogError($"Could not load saved data but the save file exists. Resetting."); 26 | return Create(); 27 | } 28 | return saveData; 29 | } 30 | } 31 | 32 | public static PackageMakerWindowData Create() 33 | { 34 | var saveData = CreateInstance(); 35 | AssetDatabase.CreateAsset(saveData, defaultAssetPath); 36 | AssetDatabase.SaveAssets(); 37 | return saveData; 38 | } 39 | 40 | public void Save() 41 | { 42 | AssetDatabase.SaveAssets(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/PackageMaker/PackageMakerWindowData.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0adae93375f5d5840a30b6e47f324172 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resolver.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0aa72fa778aef5b4cb5fa177c19d3636 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/Resolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Reflection; 6 | using System.Threading.Tasks; 7 | using Serilog; 8 | using Serilog.Sinks.Unity3D; 9 | using UnityEditor; 10 | using UnityEngine; 11 | using VRC.PackageManagement.Core; 12 | using VRC.PackageManagement.Core.Types; 13 | using VRC.PackageManagement.Core.Types.Packages; 14 | using Version = VRC.PackageManagement.Core.Types.VPMVersion.Version; 15 | 16 | namespace VRC.PackageManagement.Resolver 17 | { 18 | 19 | [InitializeOnLoad] 20 | public class Resolver 21 | { 22 | private const string _projectLoadedKey = "PROJECT_LOADED"; 23 | 24 | private static string _projectDir; 25 | public static string ProjectDir 26 | { 27 | get 28 | { 29 | if (_projectDir != null) 30 | { 31 | return _projectDir; 32 | } 33 | 34 | try 35 | { 36 | _projectDir = new DirectoryInfo(Assembly.GetExecutingAssembly().Location).Parent.Parent.Parent 37 | .FullName; 38 | return _projectDir; 39 | } 40 | catch (Exception) 41 | { 42 | return ""; 43 | } 44 | } 45 | } 46 | 47 | static Resolver() 48 | { 49 | SetupLogging(); 50 | if (!SessionState.GetBool(_projectLoadedKey, false)) 51 | { 52 | #pragma warning disable 4014 53 | CheckResolveNeeded(); 54 | #pragma warning restore 4014 55 | } 56 | } 57 | 58 | private static void SetupLogging() 59 | { 60 | VRCLibLogger.SetLoggerDirectly( 61 | new LoggerConfiguration() 62 | .MinimumLevel.Information() 63 | .WriteTo.Unity3D() 64 | .CreateLogger() 65 | ); 66 | } 67 | 68 | private static async Task CheckResolveNeeded() 69 | { 70 | SessionState.SetBool(_projectLoadedKey, true); 71 | 72 | //Wait for project to finish compiling 73 | while (EditorApplication.isCompiling || EditorApplication.isUpdating) 74 | { 75 | await Task.Delay(250); 76 | } 77 | 78 | try 79 | { 80 | 81 | if (string.IsNullOrWhiteSpace(ProjectDir)) 82 | { 83 | return; 84 | } 85 | 86 | if (VPMProjectManifest.ResolveIsNeeded(ProjectDir)) 87 | { 88 | Debug.Log($"Resolve needed."); 89 | var result = EditorUtility.DisplayDialog("VRChat Package Management", 90 | $"This project requires some VRChat Packages which are not in the project yet.\n\nPress OK to download and install them.", 91 | "OK", "Show Me What's Missing"); 92 | if (result) 93 | { 94 | ResolveStatic(ProjectDir); 95 | } 96 | else 97 | { 98 | ResolverWindow.ShowWindow(); 99 | } 100 | } 101 | } 102 | catch (Exception) 103 | { 104 | // Unity says we can't open windows from this function so it throws an exception but also works fine. 105 | } 106 | } 107 | 108 | public static bool VPMManifestExists() 109 | { 110 | return VPMProjectManifest.Exists(ProjectDir, out _); 111 | } 112 | 113 | public static void CreateManifest() 114 | { 115 | VPMProjectManifest.Load(ProjectDir); 116 | ResolverWindow.Refresh(); 117 | } 118 | 119 | public static void ResolveManifest() 120 | { 121 | ResolveStatic(ProjectDir); 122 | } 123 | 124 | public static void ResolveStatic(string dir) 125 | { 126 | // Todo: calculate and show actual progress 127 | EditorUtility.DisplayProgressBar($"Getting all VRChat Packages", "Downloading and Installing...", 0.5f); 128 | VPMProjectManifest.Resolve(ProjectDir); 129 | EditorUtility.ClearProgressBar(); 130 | ForceRefresh(); 131 | } 132 | 133 | public static List GetAllVersionsOf(string id) 134 | { 135 | var project = new UnityProject(ProjectDir); 136 | 137 | var versions = new List(); 138 | foreach (var provider in Repos.GetAll) 139 | { 140 | var packagesWithVersions = provider.GetAllWithVersions(); 141 | 142 | foreach (var packageVersionList in packagesWithVersions) 143 | { 144 | foreach (var package in packageVersionList.Value.VersionsDescending) 145 | { 146 | if (package.Id != id) 147 | continue; 148 | if (Version.TryParse(package.Version, out var result)) 149 | { 150 | if (!versions.Contains(package.Version)) 151 | versions.Add(package.Version); 152 | } 153 | } 154 | } 155 | } 156 | 157 | // Sort packages in project to the top 158 | var sorted = from entry in versions orderby project.VPMProvider.HasPackage(entry) descending select entry; 159 | 160 | return sorted.ToList(); 161 | } 162 | 163 | public static List GetAffectedPackageList(IVRCPackage package) 164 | { 165 | List list = new List(); 166 | 167 | var project = new UnityProject(ProjectDir); 168 | 169 | if (Repos.GetAllDependencies(package, out Dictionary dependencies, null)) 170 | { 171 | foreach (KeyValuePair item in dependencies) 172 | { 173 | project.VPMProvider.Refresh(); 174 | if (project.VPMProvider.GetPackage(item.Key, item.Value) == null) 175 | { 176 | IVRCPackage d = Repos.GetPackageWithVersionMatch(item.Key, item.Value); 177 | if (d != null) 178 | { 179 | list.Add(d.Id + " " + d.Version + "\n"); 180 | } 181 | } 182 | } 183 | 184 | return list; 185 | } 186 | 187 | return null; 188 | } 189 | 190 | public static void ForceRefresh () 191 | { 192 | MethodInfo method = typeof( UnityEditor.PackageManager.Client ).GetMethod( "Resolve", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.DeclaredOnly ); 193 | if( method != null ) 194 | method.Invoke( null, null ); 195 | 196 | AssetDatabase.Refresh(); 197 | } 198 | 199 | } 200 | } -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/Resolver.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f872e3586f8b4f06bab3c9facd14f6e6 3 | timeCreated: 1659048476 -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/ResolverWindow.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Text; 3 | using System.Threading.Tasks; 4 | using UnityEditor; 5 | using UnityEditor.UIElements; 6 | using UnityEngine; 7 | using UnityEngine.UIElements; 8 | using VRC.PackageManagement.Core; 9 | using VRC.PackageManagement.Core.Types; 10 | using VRC.PackageManagement.Core.Types.Packages; 11 | using Version = VRC.PackageManagement.Core.Types.VPMVersion.Version; 12 | 13 | namespace VRC.PackageManagement.Resolver 14 | { 15 | public class ResolverWindow : EditorWindow 16 | { 17 | // VisualElements 18 | private static VisualElement _rootView; 19 | private static Button _refreshButton; 20 | private static Button _createButton; 21 | private static Button _resolveButton; 22 | private static Box _manifestInfo; 23 | private static Label _manifestLabel; 24 | private static bool _isUpdating; 25 | private static Color _colorPositive = Color.green; 26 | private static Color _colorNegative = new Color(1, 0.3f, 0.3f); 27 | 28 | 29 | [MenuItem("VRChat SDK/Utilities/Package Resolver")] 30 | public static void ShowWindow() 31 | { 32 | ResolverWindow wnd = GetWindow(); 33 | wnd.titleContent = new GUIContent("Package Resolver"); 34 | } 35 | 36 | public static void Refresh() 37 | { 38 | if (_rootView == null || string.IsNullOrWhiteSpace(Resolver.ProjectDir)) return; 39 | 40 | _manifestInfo.SetEnabled(!_isUpdating); 41 | _refreshButton.SetEnabled(!_isUpdating); 42 | _manifestLabel.text = (_isUpdating ? "Working ..." : "Required Packages"); 43 | _manifestInfo.Clear(); 44 | _manifestInfo.Add(_manifestLabel); 45 | 46 | bool needsResolve = VPMProjectManifest.ResolveIsNeeded(Resolver.ProjectDir); 47 | string resolveStatus = needsResolve ? "Please press \"Resolve\" to Download them." : "All of them are in the project."; 48 | 49 | // check for vpm dependencies 50 | if (!Resolver.VPMManifestExists()) 51 | { 52 | TextElement noManifestText = new TextElement(); 53 | noManifestText.text = "No VPM Manifest"; 54 | noManifestText.style.color = _colorNegative; 55 | _manifestInfo.Add(noManifestText); 56 | } 57 | else 58 | { 59 | var manifest = VPMProjectManifest.Load(Resolver.ProjectDir); 60 | var project = new UnityProject(Resolver.ProjectDir); 61 | 62 | // Here is where we detect if all dependencies are installed 63 | var allDependencies = (manifest.locked != null && manifest.locked.Count > 0) 64 | ? manifest.locked 65 | : manifest.dependencies; 66 | 67 | foreach (var pair in allDependencies) 68 | { 69 | var id = pair.Key; 70 | var version = pair.Value.version; 71 | IVRCPackage package = project.VPMProvider.GetPackage(id, version); 72 | _manifestInfo.Add(CreateDependencyRow(id, version, project, (package != null))); 73 | } 74 | 75 | } 76 | _resolveButton.SetEnabled(needsResolve); 77 | Resolver.ForceRefresh(); 78 | } 79 | 80 | /// 81 | /// Unity calls the CreateGUI method automatically when the window needs to display 82 | /// 83 | private void CreateGUI() 84 | { 85 | _rootView = rootVisualElement; 86 | _rootView.name = "root-view"; 87 | _rootView.styleSheets.Add((StyleSheet)Resources.Load("ResolverWindowStyle")); 88 | 89 | // Main Container 90 | var container = new Box() 91 | { 92 | name = "buttons" 93 | }; 94 | _rootView.Add(container); 95 | 96 | // Create Button 97 | if (!Resolver.VPMManifestExists()) 98 | { 99 | _createButton = new Button(Resolver.CreateManifest) 100 | { 101 | text = "Create", 102 | name = "create-button-base" 103 | }; 104 | container.Add(_createButton); 105 | } 106 | else 107 | { 108 | _resolveButton = new Button(Resolver.ResolveManifest) 109 | { 110 | text = "Resolve All", 111 | name = "resolve-button-base" 112 | }; 113 | container.Add(_resolveButton); 114 | } 115 | 116 | // Manifest Info 117 | _manifestInfo = new Box() 118 | { 119 | name = "manifest-info", 120 | }; 121 | _manifestLabel = (new Label("Required Packages") { name = "manifest-header" }); 122 | 123 | _rootView.Add(_manifestInfo); 124 | 125 | // Refresh Button 126 | var refreshBox = new Box(); 127 | _refreshButton = new Button(Refresh) 128 | { 129 | text = "Refresh", 130 | name = "refresh-button-base" 131 | }; 132 | refreshBox.Add(_refreshButton); 133 | _rootView.Add(refreshBox); 134 | 135 | Refresh(); 136 | } 137 | 138 | private static VisualElement CreateDependencyRow(string id, string version, UnityProject project, bool havePackage) 139 | { 140 | // Table 141 | 142 | VisualElement row = new Box() { name = "package-box" }; 143 | VisualElement column1 = new Box() { name = "package-box" }; 144 | VisualElement column2 = new Box() { name = "package-box" }; 145 | VisualElement column3 = new Box() { name = "package-box" }; 146 | VisualElement column4 = new Box() { name = "package-box" }; 147 | 148 | column1.style.minWidth = 200; 149 | column2.style.minWidth = 100; 150 | column3.style.minWidth = 100; 151 | column4.style.minWidth = 100; 152 | 153 | row.Add(column1); 154 | row.Add(column2); 155 | row.Add(column3); 156 | row.Add(column4); 157 | 158 | // Package Name + Status 159 | 160 | TextElement text = new TextElement { text = $"{id} {version} " }; 161 | 162 | column1.Add(text); 163 | 164 | if (!havePackage) 165 | { 166 | TextElement missingText = new TextElement { text = "MISSING" }; 167 | missingText.style.color = _colorNegative; 168 | missingText.style.display = (_isUpdating ? DisplayStyle.None : DisplayStyle.Flex); 169 | column2.Add(missingText); 170 | } 171 | 172 | // Version Popup 173 | 174 | var choices = new List(); 175 | foreach (string n in Resolver.GetAllVersionsOf(id)) 176 | { 177 | choices.Add(n); 178 | } 179 | 180 | var popupField = new PopupField(choices, 0); 181 | popupField.value = choices[0]; 182 | popupField.style.display = (_isUpdating ? DisplayStyle.None : DisplayStyle.Flex); 183 | 184 | column3.Add(popupField); 185 | 186 | // Button 187 | 188 | Button updateButton = new Button() { text = "Update" }; 189 | if (havePackage) 190 | RefreshUpdateButton(updateButton, version, choices[0]); 191 | else 192 | RefreshMissingButton(updateButton); 193 | 194 | updateButton.clicked += (() => 195 | { 196 | IVRCPackage package = Repos.GetPackageWithVersionMatch(id, popupField.value); 197 | 198 | // Check and warn on Dependencies if Updating or Downgrading 199 | if (Version.TryParse(version, out var currentVersion) && 200 | Version.TryParse(popupField.value, out var newVersion)) 201 | { 202 | Dictionary dependencies = new Dictionary(); 203 | StringBuilder dialogMsg = new StringBuilder(); 204 | List affectedPackages = Resolver.GetAffectedPackageList(package); 205 | for (int v = 0; v < affectedPackages.Count; v++) 206 | { 207 | dialogMsg.Append(affectedPackages[v]); 208 | } 209 | 210 | if (affectedPackages.Count > 1) 211 | { 212 | dialogMsg.Insert(0, "This will update multiple packages:\n\n"); 213 | dialogMsg.AppendLine("\nAre you sure?"); 214 | if (EditorUtility.DisplayDialog("Package Has Dependencies", dialogMsg.ToString(), "OK", "Cancel")) 215 | OnUpdatePackageClicked(project, package); 216 | } 217 | else 218 | { 219 | OnUpdatePackageClicked(project, package); 220 | } 221 | } 222 | 223 | }); 224 | column4.Add(updateButton); 225 | 226 | popupField.RegisterCallback>((evt) => 227 | { 228 | if (havePackage) 229 | RefreshUpdateButton(updateButton, version, evt.newValue); 230 | else 231 | RefreshMissingButton(updateButton); 232 | }); 233 | 234 | return row; 235 | } 236 | 237 | private static void RefreshUpdateButton(Button button, string currentVersion, string highestAvailableVersion) 238 | { 239 | if (currentVersion == highestAvailableVersion) 240 | { 241 | button.style.display = DisplayStyle.None; 242 | } 243 | else 244 | { 245 | button.style.display = (_isUpdating ? DisplayStyle.None : DisplayStyle.Flex); 246 | if (Version.TryParse(currentVersion, out var currentVersionObject) && 247 | Version.TryParse(highestAvailableVersion, out var highestAvailableVersionObject)) 248 | { 249 | if (currentVersionObject < highestAvailableVersionObject) 250 | { 251 | SetButtonColor(button, _colorPositive); 252 | button.text = "Update"; 253 | } 254 | else 255 | { 256 | SetButtonColor(button, _colorNegative); 257 | button.text = "Downgrade"; 258 | } 259 | } 260 | } 261 | } 262 | 263 | private static void RefreshMissingButton(Button button) 264 | { 265 | button.text = "Resolve"; 266 | SetButtonColor(button, Color.white); 267 | button.style.display = (_isUpdating ? DisplayStyle.None : DisplayStyle.Flex); 268 | } 269 | 270 | private static void SetButtonColor(Button button, Color color) 271 | { 272 | button.style.color = color; 273 | color.a = 0.25f; 274 | button.style.borderRightColor = 275 | button.style.borderLeftColor = 276 | button.style.borderTopColor = 277 | button.style.borderBottomColor = 278 | color; 279 | } 280 | 281 | private static async void OnUpdatePackageClicked(UnityProject project, IVRCPackage package) 282 | { 283 | _isUpdating = true; 284 | Refresh(); 285 | await Task.Delay(500); 286 | await Task.Run(() => project.UpdateVPMPackage(package)); 287 | _isUpdating = false; 288 | Refresh(); 289 | } 290 | 291 | } 292 | } -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resolver/ResolverWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 32d2636186ee0834fa1dc2287750dd32 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8700b619eebc09545b4aaf4f69a2bf79 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resources/PackageMakerWindowStyle.uss: -------------------------------------------------------------------------------- 1 | .unity-box { 2 | margin: 10px; 3 | padding:10px; 4 | } 5 | 6 | .unity-box #description { 7 | margin: 10px 0 10px 0; 8 | white-space: normal; 9 | } 10 | 11 | #action-button { 12 | font-size: 20px; 13 | -unity-font-style: bold; 14 | padding: 10px; 15 | margin:10px; 16 | } -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resources/PackageMakerWindowStyle.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dfe8fb3b6d0f3e4693553ecc1cb23dd 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resources/ResolverWindowStyle.uss: -------------------------------------------------------------------------------- 1 | .unity-box { 2 | margin:2px; 3 | padding:10px; 4 | border-width:0px; 5 | } 6 | 7 | #package-box { 8 | margin:2px; 9 | padding:10px; 10 | border-width:0px; 11 | flex-direction:row; 12 | max-height:20px; 13 | min-height:20px; 14 | height:20px; 15 | padding-top:0px; 16 | padding-bottom:0px; 17 | margin-top:0px; 18 | margin-bottom:0px; 19 | align-items:center; 20 | } 21 | 22 | #manifest-header { 23 | font-size: 20px; 24 | margin-bottom: 10px; 25 | } -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/Resources/ResolverWindowStyle.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 346f7a547766ecb4396d15f585a15133 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/com.vrchat.core.vpm-resolver.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.vrchat.core.vpm-resolver.Editor", 3 | "references": [], 4 | "includePlatforms": [ 5 | "Editor" 6 | ], 7 | "excludePlatforms": [], 8 | "allowUnsafeCode": false, 9 | "overrideReferences": false, 10 | "precompiledReferences": [], 11 | "autoReferenced": true, 12 | "defineConstraints": [], 13 | "versionDefines": [], 14 | "noEngineReferences": false 15 | } -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/Editor/com.vrchat.core.vpm-resolver.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1e8c2ba944807d4a9213e2de6930a0b 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/License.md: -------------------------------------------------------------------------------- 1 | # VRCHAT INC. 2 | ### VRCHAT DISTRO LICENSE FILE 3 | Version: February 24, 2022 4 | 5 | **SUMMARY OF TERMS:** Any materials subject to this Distro Asset License may be distributed by you, with or without modifications, on a non-commercial basis (i.e., at no charge), in accordance with the full terms of the Materials License Agreement. 6 | 7 | This Distro License File is a "License File" as defined in the VRChat Materials License Agreement, found at https://hello.vrchat.com/legal/sdk (or any successor link designated by VRChat) (as may be revised from time to time, the "Materials License Agreement"). 8 | 9 | This Distro License File applies to all the files in the Folder containing this Distro License File and those in all Child Folders within that Folder (except with respect to files in any Child Folder that contains a different License File) (such files, other than this Distro License File, the "Covered Files"). All capitalized terms used but not otherwise defined in this Distro License File have the meanings provided in the Materials License Agreement. 10 | 11 | This Distro License File only provides a summary of the terms applicable to the Covered Files. To understand your rights and obligations and the full set of terms that apply to use of the Covered Files, please see the relevant sections of the Materials License Agreement, including terms applicable to Distro Materials. -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/License.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7727f888edf4714448d5a0287deec6dd 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "com.vrchat.core.vpm-resolver", 3 | "displayName" : "VRChat Package Resolver Tool", 4 | "version" : "0.1.19", 5 | "unity" : "2019.4", 6 | "description" : "Tool to Download VPM Packages", 7 | "vrchatVersion" : "2022.1.1", 8 | "author" : { 9 | "name" : "VRChat", 10 | "email" : "developer@vrchat.com", 11 | "url" : "https://github.com/vrchat/packages" 12 | }, 13 | "url" : "", 14 | "dependencies" : { 15 | "com.unity.nuget.newtonsoft-json" : "2.0.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Packages/com.vrchat.core.vpm-resolver/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b02e2915ebf04e4ea94e503d73e7411 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies" : { 3 | "com.unity.collab-proxy" : "1.6.0", 4 | "com.unity.ide.rider" : "1.2.1", 5 | "com.unity.ide.visualstudio" : "2.0.9", 6 | "com.unity.ide.vscode" : "1.2.3", 7 | "com.unity.test-framework" : "1.1.27", 8 | "com.unity.textmeshpro" : "2.1.6", 9 | "com.unity.timeline" : "1.2.18", 10 | "com.unity.ugui" : "1.0.0", 11 | "com.unity.xr.oculus.standalone" : "2.38.4", 12 | "com.unity.xr.openvr.standalone" : "2.0.5", 13 | "com.unity.modules.ai" : "1.0.0", 14 | "com.unity.modules.androidjni" : "1.0.0", 15 | "com.unity.modules.animation" : "1.0.0", 16 | "com.unity.modules.assetbundle" : "1.0.0", 17 | "com.unity.modules.audio" : "1.0.0", 18 | "com.unity.modules.cloth" : "1.0.0", 19 | "com.unity.modules.director" : "1.0.0", 20 | "com.unity.modules.imageconversion" : "1.0.0", 21 | "com.unity.modules.imgui" : "1.0.0", 22 | "com.unity.modules.jsonserialize" : "1.0.0", 23 | "com.unity.modules.particlesystem" : "1.0.0", 24 | "com.unity.modules.physics" : "1.0.0", 25 | "com.unity.modules.physics2d" : "1.0.0", 26 | "com.unity.modules.screencapture" : "1.0.0", 27 | "com.unity.modules.terrain" : "1.0.0", 28 | "com.unity.modules.terrainphysics" : "1.0.0", 29 | "com.unity.modules.tilemap" : "1.0.0", 30 | "com.unity.modules.ui" : "1.0.0", 31 | "com.unity.modules.uielements" : "1.0.0", 32 | "com.unity.modules.umbra" : "1.0.0", 33 | "com.unity.modules.unityanalytics" : "1.0.0", 34 | "com.unity.modules.unitywebrequest" : "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle" : "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio" : "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture" : "1.0.0", 38 | "com.unity.modules.unitywebrequestwww" : "1.0.0", 39 | "com.unity.modules.vehicles" : "1.0.0", 40 | "com.unity.modules.video" : "1.0.0", 41 | "com.unity.modules.vr" : "1.0.0", 42 | "com.unity.modules.wind" : "1.0.0", 43 | "com.unity.modules.xr" : "1.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Test.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4ea01c82ece80924ba56ede6421ff6cb 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0cb0665c43edd44d9e1306a1fb3a7d3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 893948e5690fa7449a7f77ce7ea888f5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataDictionaryTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataDictionaryTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 32a6db356fa7af94cb38b835f8c0f404, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 1301e5f431e0dd945844e3f6e613bed3, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 5533087578493064888 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataDictionaryTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02285095d7cc42245ade1f50b76688fe 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataDictionaryTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataDictionaryTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var dic = DataDictionary.New(); 14 | dic.SetValue(UserDefinedEnum.A, 100); 15 | dic.SetValue(UserDefinedEnum.B, 200); 16 | dic.SetValue(UserDefinedEnum.C, 300); 17 | 18 | Assert.Equal(100, dic.GetValue(UserDefinedEnum.A), this); 19 | Assert.Equal(200, dic.GetValue(UserDefinedEnum.B), this); 20 | Assert.Equal(300, dic.GetValue(UserDefinedEnum.C), this); 21 | 22 | var keys = dic.GetKeys(); 23 | Assert.Equal(UserDefinedEnum.A, keys.GetValue(0), this); 24 | Assert.Equal(UserDefinedEnum.B, keys.GetValue(1), this); 25 | Assert.Equal(UserDefinedEnum.C, keys.GetValue(2), this); 26 | 27 | Assert.Equal(new UserDefinedEnum[] { UserDefinedEnum.A, UserDefinedEnum.B, UserDefinedEnum.C }, keys.ToArray()); 28 | Assert.Equal(new object[] { UserDefinedEnum.A, UserDefinedEnum.B, UserDefinedEnum.C }, keys.ToObjectArray()); 29 | 30 | var values = dic.GetValues(); 31 | Assert.Equal(100, values.GetValue(0), this); 32 | Assert.Equal(200, values.GetValue(1), this); 33 | Assert.Equal(300, values.GetValue(2), this); 34 | 35 | Assert.Equal(new int[] { 100, 200, 300 }, values.ToArray()); 36 | Assert.Equal(new object[] { 100, 200, 300 }, values.ToObjectArray()); 37 | 38 | int output; 39 | Assert.True(dic.Remove(UserDefinedEnum.A, out output), this); 40 | Assert.Equal(100, output, this); 41 | Assert.True(dic.Remove(UserDefinedEnum.B, out output), this); 42 | Assert.Equal(200, output, this); 43 | Assert.True(dic.Remove(UserDefinedEnum.C, out output), this); 44 | Assert.Equal(300, output, this); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataDictionaryTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1301e5f431e0dd945844e3f6e613bed3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddRangeTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListAddRangeTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 66a480af750d1fc408149bc4901d8450, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 8ad2f8def524d0e4e8935cb6a497cc23, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 4817369918637059990 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddRangeTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6024648df91951545a3c3a0c6ca27a34 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddRangeTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListAddRangeTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(); 14 | Assert.Equal(new DataList(), list, this); 15 | 16 | list.AddRange(new int[] { 100, 200, 300, 400 }); 17 | Assert.Equal( 18 | new DataList( 19 | new DataToken[] 20 | { 21 | new DataToken(100), 22 | new DataToken(200), 23 | new DataToken(300), 24 | new DataToken(400) 25 | } 26 | ), 27 | list, 28 | this 29 | ); 30 | 31 | list.AddRange(DataList.New(new int[] { 500, 600, 700, 800 })); 32 | Assert.Equal( 33 | new DataList( 34 | new DataToken[] 35 | { 36 | new DataToken(100), 37 | new DataToken(200), 38 | new DataToken(300), 39 | new DataToken(400), 40 | new DataToken(500), 41 | new DataToken(600), 42 | new DataToken(700), 43 | new DataToken(800) 44 | } 45 | ), 46 | list, 47 | this 48 | ); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddRangeTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ad2f8def524d0e4e8935cb6a497cc23 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListAddTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: d3ca13978c839064186ccf35156760fb, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 38656eed8ecf550478189a843b2a8384, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 7382298047982584777 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 526951d6e060cfd4ba8887d1ee4f09d6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListAddTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(); 14 | Assert.Equal(new DataList(), list, this); 15 | 16 | list.Add(100); 17 | Assert.Equal(new DataList(new DataToken[] { new DataToken(100) }), list, this); 18 | 19 | list.Add(200); 20 | Assert.Equal(new DataList(new DataToken[] { new DataToken(100), new DataToken(200) }), list, this); 21 | 22 | list.Add(300); 23 | Assert.Equal(new DataList(new DataToken[] { new DataToken(100), new DataToken(200), new DataToken(300) }), list, this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListAddTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38656eed8ecf550478189a843b2a8384 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListGetValueTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListGetValueTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 9ce05a0bec3b3994f8a9d46d84d00292, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 0c6c9dafb96ef344e8210c5868a78fe0, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -6939063208360491226 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 1 48 | - Name: 49 | Entry: 7 50 | Data: 51 | - Name: $k 52 | Entry: 1 53 | Data: userDefinedClassInstance 54 | - Name: $v 55 | Entry: 7 56 | Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor 57 | - Name: k__BackingField 58 | Entry: 1 59 | Data: userDefinedClassInstance 60 | - Name: k__BackingField 61 | Entry: 7 62 | Data: 3|System.RuntimeType, mscorlib 63 | - Name: 64 | Entry: 1 65 | Data: Koyashiro.GenericDataContainer.Tests.UserDefinedClass, Koyashiro.GenericDataContainer.Tests 66 | - Name: 67 | Entry: 8 68 | Data: 69 | - Name: k__BackingField 70 | Entry: 7 71 | Data: 4|System.RuntimeType, mscorlib 72 | - Name: 73 | Entry: 1 74 | Data: VRC.Udon.UdonBehaviour, VRC.Udon 75 | - Name: 76 | Entry: 8 77 | Data: 78 | - Name: k__BackingField 79 | Entry: 7 80 | Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib 81 | - Name: 82 | Entry: 6 83 | Data: 84 | - Name: 85 | Entry: 8 86 | Data: 87 | - Name: k__BackingField 88 | Entry: 5 89 | Data: true 90 | - Name: _fieldAttributes 91 | Entry: 7 92 | Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib 93 | - Name: 94 | Entry: 12 95 | Data: 0 96 | - Name: 97 | Entry: 13 98 | Data: 99 | - Name: 100 | Entry: 8 101 | Data: 102 | - Name: 103 | Entry: 8 104 | Data: 105 | - Name: 106 | Entry: 8 107 | Data: 108 | - Name: 109 | Entry: 13 110 | Data: 111 | - Name: 112 | Entry: 8 113 | Data: 114 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListGetValueTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4788443198ecfc74bba1bbc25705582a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListGetValueTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UdonSharp; 3 | using VRC.SDK3.Data; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListGetValueTest : UdonSharpBehaviour 10 | { 11 | public UserDefinedClass userDefinedClassInstance; 12 | 13 | public void Start() 14 | { 15 | // int 16 | { 17 | var intList = DataList.New(new int[] { 100, 200, 300, 400 }); 18 | 19 | Assert.Equal(100, intList.GetValue(0), this); 20 | Assert.Equal(200, intList.GetValue(1), this); 21 | Assert.Equal(300, intList.GetValue(2), this); 22 | Assert.Equal(400, intList.GetValue(3), this); 23 | } 24 | 25 | // User defined class 26 | { 27 | var userDefinedClassList = DataList.New(); 28 | userDefinedClassList.Add(userDefinedClassInstance); 29 | Assert.Equal(userDefinedClassInstance, userDefinedClassList.GetValue(0), this); 30 | Assert.Equal(userDefinedClassInstance.field, userDefinedClassList.GetValue(0).field, this); 31 | } 32 | 33 | // User defined enum 34 | { 35 | var userDefinedEnumList = DataList.New(); 36 | userDefinedEnumList.Add(UserDefinedEnum.A); 37 | Assert.Equal(UserDefinedEnum.A, userDefinedEnumList.GetValue(0), this); 38 | } 39 | 40 | // DataList 41 | { 42 | var dataListList = DataList.New(); 43 | var dataList = new DataList(); 44 | dataListList.Add(dataList); 45 | Assert.Equal(dataList, dataListList.GetValue(0), this); 46 | } 47 | 48 | // DataList 49 | { 50 | var genericDataListList = DataList>.New(); 51 | var genericDataList = DataList.New(); 52 | genericDataListList.Add(genericDataList); 53 | Assert.Equal(genericDataList, genericDataListList.GetValue(0), this); 54 | } 55 | 56 | // DataDictionary 57 | { 58 | var dataDictionaryList = DataList.New(); 59 | var dataDictionary = new DataDictionary(); 60 | dataDictionaryList.Add(dataDictionary); 61 | Assert.Equal(dataDictionary, dataDictionaryList.GetValue(0), this); 62 | } 63 | 64 | // DataDictionary 65 | { 66 | var genericDataDictionaryList = DataList>.New(); 67 | var genericDataDictionary = DataDictionary.New(); 68 | genericDataDictionaryList.Add(genericDataDictionary); 69 | Assert.Equal(genericDataDictionary, genericDataDictionaryList.GetValue(0), this); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListGetValueTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c6c9dafb96ef344e8210c5868a78fe0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertRangeTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListInsertRangeTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: b63f3ced1dc9133478ea15a7a0ca176b, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 096cc9dfe96bd48419110c25bdabec52, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -316667527818287802 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertRangeTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dcf1bd4019d0654c9e8238c733c133f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertRangeTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListInsertRangeTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(); 14 | Assert.Equal(new DataList(), list, this); 15 | 16 | list.InsertRange(0, new int[] { 100, 200, 300, 400 }); 17 | Assert.Equal( 18 | new DataList( 19 | new DataToken[] 20 | { 21 | new DataToken(100), 22 | new DataToken(200), 23 | new DataToken(300), 24 | new DataToken(400) 25 | } 26 | ), 27 | list, 28 | this 29 | ); 30 | 31 | list.InsertRange(2, DataList.New(new int[] { 500, 600, 700, 800 })); 32 | Assert.Equal( 33 | new DataList( 34 | new DataToken[] 35 | { 36 | new DataToken(100), 37 | new DataToken(200), 38 | new DataToken(500), 39 | new DataToken(600), 40 | new DataToken(700), 41 | new DataToken(800), 42 | new DataToken(300), 43 | new DataToken(400) 44 | } 45 | ), 46 | list, 47 | this 48 | ); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertRangeTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 096cc9dfe96bd48419110c25bdabec52 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListInsertTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 590f9a4ae9d19c341a1dfba4dab1e7d8, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 93df864b87d1d89448284841d85cb226, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 5846349444021834678 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ef02642fc8462d4397c42bbfcf37847 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListInsertTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(); 14 | Assert.Equal(new DataList(), list, this); 15 | 16 | list.Insert(0, 100); 17 | Assert.Equal(new DataList(new DataToken[] { new DataToken(100), }), list, this); 18 | 19 | list.Insert(1, 200); 20 | Assert.Equal(new DataList(new DataToken[] { new DataToken(100), new DataToken(200), }), list, this); 21 | 22 | list.Insert(0, 300); 23 | Assert.Equal(new DataList(new DataToken[] { new DataToken(300), new DataToken(100), new DataToken(200), }), list, this); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListInsertTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93df864b87d1d89448284841d85cb226 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListNewTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListNewTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 65163c235e8f8b94382f8350c235a956, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: af9f956a6c44c7a4796ffe21a383308c, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 137470817354433012 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListNewTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6a3ba45c59a2654589185b5f6a3bc56 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListNewTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using VRC.SDK3.Data; 4 | using UdonSharp; 5 | using Koyashiro.UdonTest; 6 | 7 | namespace Koyashiro.GenericDataContainer.Tests 8 | { 9 | [AddComponentMenu("")] 10 | public class DataListNewTest : UdonSharpBehaviour 11 | { 12 | public void Start() 13 | { 14 | Assert.Equal(new DataList(), DataList.New(), this); 15 | Assert.Equal( 16 | new DataList(new DataToken[] { new DataToken(false), new DataToken(true) }), 17 | DataList.New(new bool[] { false, true }), 18 | this 19 | ); 20 | Assert.Equal( 21 | new DataList(new DataToken[] { new DataToken((sbyte)0), new DataToken((sbyte)1) }), 22 | DataList.New(new sbyte[] { (sbyte)0, (sbyte)1 }), 23 | this 24 | ); 25 | Assert.Equal( 26 | new DataList(new DataToken[] { new DataToken((byte)0), new DataToken((byte)1) }), 27 | DataList.New(new byte[] { (byte)0, (byte)1 }), 28 | this 29 | ); 30 | Assert.Equal( 31 | new DataList(new DataToken[] { new DataToken((short)0), new DataToken((short)1) }), 32 | DataList.New(new short[] { (short)0, (short)1 }), 33 | this 34 | ); 35 | Assert.Equal( 36 | new DataList(new DataToken[] { new DataToken((ushort)0), new DataToken((ushort)1) }), 37 | DataList.New(new ushort[] { (ushort)0, (ushort)1 }), 38 | this 39 | ); 40 | Assert.Equal( 41 | new DataList(new DataToken[] { new DataToken(0), new DataToken(1) }), 42 | DataList.New(new int[] { 0, 1 }), 43 | this 44 | ); 45 | Assert.Equal( 46 | new DataList(new DataToken[] { new DataToken(0U), new DataToken(1U) }), 47 | DataList.New(new uint[] { 0, 1 }), 48 | this 49 | ); 50 | Assert.Equal( 51 | new DataList(new DataToken[] { new DataToken(0L), new DataToken(1L) }), 52 | DataList.New(new long[] { 0L, 1L }), 53 | this 54 | ); 55 | Assert.Equal( 56 | new DataList(new DataToken[] { new DataToken(0UL), new DataToken(1UL) }), 57 | DataList.New(new ulong[] { 0UL, 1UL }), 58 | this 59 | ); 60 | Assert.Equal( 61 | new DataList(new DataToken[] { new DataToken(0F), new DataToken(1F) }), 62 | DataList.New(new float[] { 0F, 1F }), 63 | this 64 | ); 65 | Assert.Equal( 66 | new DataList(new DataToken[] { new DataToken(0D), new DataToken(1D) }), 67 | DataList.New(new double[] { 0D, 1D }), 68 | this 69 | ); 70 | Assert.Equal( 71 | new DataList(new DataToken[] { new DataToken("aaa"), new DataToken("bbb") }), 72 | DataList.New(new string[] { "aaa", "bbb" }), 73 | this 74 | ); 75 | Assert.Equal( 76 | new DataList(new DataToken[] { new DataToken(new DataList()) }), 77 | DataList.New(new DataList[] { new DataList() }), 78 | this 79 | ); 80 | Assert.Equal( 81 | new DataList(new DataToken[] { new DataToken(new DataDictionary()) }), 82 | DataList.New(new DataDictionary[] { new DataDictionary() }), 83 | this 84 | ); 85 | Assert.Equal( 86 | new DataList(new DataToken[] { new DataToken(new DateTime(2023, 01, 01, 0, 0, 0)), new DataToken(new DateTime(2023, 01, 02, 0, 0, 0)) }), 87 | DataList.New(new DateTime[] { new DateTime(2023, 01, 01, 0, 0, 0), new DateTime(2023, 01, 02, 0, 0, 0) }), 88 | this 89 | ); 90 | Assert.Equal( 91 | new DataList(new DataToken[] { new DataToken(DataError.None), new DataToken(DataError.KeyDoesNotExist) }), 92 | DataList.New(new DataError[] { DataError.None, DataError.KeyDoesNotExist }), 93 | this 94 | ); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListNewTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af9f956a6c44c7a4796ffe21a383308c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveAtTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListRemoveAtTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 0f79b221760d91748adcab2349a1dc51, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 50d28fd60f0693b49b60877aa35f46bb, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 8195932938473516876 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveAtTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dd0a7bd1c8d593479e0d88839caed2b 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveAtTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListRemoveAtTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(new int[] { 100, 200, 300, 400 }); 14 | Assert.Equal( 15 | new DataList( 16 | new DataToken[] 17 | { 18 | new DataToken(100), 19 | new DataToken(200), 20 | new DataToken(300), 21 | new DataToken(400) 22 | } 23 | ), 24 | list, 25 | this 26 | ); 27 | 28 | list.RemoveAt(0); 29 | Assert.Equal( 30 | new DataList( 31 | new DataToken[] 32 | { 33 | new DataToken(200), 34 | new DataToken(300), 35 | new DataToken(400) 36 | } 37 | ), 38 | list, 39 | this 40 | ); 41 | 42 | list.RemoveAt(2); 43 | Assert.Equal( 44 | new DataList( 45 | new DataToken[] 46 | { 47 | new DataToken(200), 48 | new DataToken(300) 49 | } 50 | ), 51 | list, 52 | this 53 | ); 54 | 55 | list.RemoveAt(1); 56 | Assert.Equal(new DataList(new DataToken[] { new DataToken(200) }), list, this); 57 | 58 | list.RemoveAt(0); 59 | Assert.Equal(new DataList(), list, this); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveAtTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50d28fd60f0693b49b60877aa35f46bb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveRangeTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListRemoveRangeTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 588093a172bb60c4d854611052400acf, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 3adc796fe3cd609478af7625c99be9ea, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -2329082695948814544 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveRangeTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37949ca912dfa5441824bfd10651414e 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveRangeTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListRemoveRangeTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(new int[] { 100, 200, 300, 400 }); 14 | Assert.Equal( 15 | new DataList( 16 | new DataToken[] 17 | { 18 | new DataToken(100), 19 | new DataToken(200), 20 | new DataToken(300), 21 | new DataToken(400) 22 | } 23 | ), 24 | list, 25 | this 26 | ); 27 | 28 | list.RemoveAt(0); 29 | Assert.Equal( 30 | new DataList( 31 | new DataToken[] 32 | { 33 | new DataToken(200), 34 | new DataToken(300), 35 | new DataToken(400) 36 | } 37 | ), 38 | list, 39 | this 40 | ); 41 | 42 | list.RemoveAt(2); 43 | Assert.Equal( 44 | new DataList( 45 | new DataToken[] 46 | { 47 | new DataToken(200), 48 | new DataToken(300) 49 | } 50 | ), 51 | list, 52 | this 53 | ); 54 | 55 | list.RemoveAt(1); 56 | Assert.Equal(new DataList(new DataToken[] { new DataToken(200) }), list, this); 57 | 58 | list.RemoveAt(0); 59 | Assert.Equal(new DataList(), list, this); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveRangeTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3adc796fe3cd609478af7625c99be9ea 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListRemoveTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 2d65a30c2a897ea43943e2d30bf0dc46, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: 55031639b861dac4e8cc229569df4999, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 691331817984343008 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 0 48 | - Name: 49 | Entry: 13 50 | Data: 51 | - Name: 52 | Entry: 8 53 | Data: 54 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5759c182cf5b624ea46860ed84f35dd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListRemoveTest : UdonSharpBehaviour 10 | { 11 | public void Start() 12 | { 13 | var list = DataList.New(new int[] { 100, 200, 300, 400 }); 14 | 15 | Assert.Equal( 16 | new DataList( 17 | new DataToken[] 18 | { 19 | new DataToken(100), 20 | new DataToken(200), 21 | new DataToken(300), 22 | new DataToken(400) 23 | } 24 | ), 25 | list, 26 | this 27 | ); 28 | 29 | list.Remove(100); 30 | Assert.Equal( 31 | new DataList( 32 | new DataToken[] 33 | { 34 | new DataToken(200), 35 | new DataToken(300), 36 | new DataToken(400) 37 | } 38 | ), 39 | list, 40 | this 41 | ); 42 | 43 | list.Remove(400); 44 | Assert.Equal( 45 | new DataList( 46 | new DataToken[] 47 | { 48 | new DataToken(200), 49 | new DataToken(300) 50 | } 51 | ), 52 | list, 53 | this 54 | ); 55 | 56 | list.Remove(300); 57 | Assert.Equal(new DataList(new DataToken[] { new DataToken(200) }), list, this); 58 | 59 | list.Remove(200); 60 | Assert.Equal(new DataList(), list, this); 61 | 62 | list.Remove(0); 63 | Assert.Equal(new DataList(), list, this); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListRemoveTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55031639b861dac4e8cc229569df4999 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToArrayTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListToArrayTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 7d3f4ad7b0a326c48b28a32fdd712440, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: f221fd0cde926cf449dca438d119d764, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -4792159292266274320 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 1 48 | - Name: 49 | Entry: 7 50 | Data: 51 | - Name: $k 52 | Entry: 1 53 | Data: userDefinedClassInstance 54 | - Name: $v 55 | Entry: 7 56 | Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor 57 | - Name: k__BackingField 58 | Entry: 1 59 | Data: userDefinedClassInstance 60 | - Name: k__BackingField 61 | Entry: 7 62 | Data: 3|System.RuntimeType, mscorlib 63 | - Name: 64 | Entry: 1 65 | Data: Koyashiro.GenericDataContainer.Tests.UserDefinedClass, Koyashiro.GenericDataContainer.Tests 66 | - Name: 67 | Entry: 8 68 | Data: 69 | - Name: k__BackingField 70 | Entry: 7 71 | Data: 4|System.RuntimeType, mscorlib 72 | - Name: 73 | Entry: 1 74 | Data: VRC.Udon.UdonBehaviour, VRC.Udon 75 | - Name: 76 | Entry: 8 77 | Data: 78 | - Name: k__BackingField 79 | Entry: 7 80 | Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib 81 | - Name: 82 | Entry: 6 83 | Data: 84 | - Name: 85 | Entry: 8 86 | Data: 87 | - Name: k__BackingField 88 | Entry: 5 89 | Data: true 90 | - Name: _fieldAttributes 91 | Entry: 7 92 | Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib 93 | - Name: 94 | Entry: 12 95 | Data: 0 96 | - Name: 97 | Entry: 13 98 | Data: 99 | - Name: 100 | Entry: 8 101 | Data: 102 | - Name: 103 | Entry: 8 104 | Data: 105 | - Name: 106 | Entry: 8 107 | Data: 108 | - Name: 109 | Entry: 13 110 | Data: 111 | - Name: 112 | Entry: 8 113 | Data: 114 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToArrayTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 980ce2325d34d434793ed1821961b6c3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToArrayTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UdonSharp; 3 | using Koyashiro.UdonTest; 4 | 5 | namespace Koyashiro.GenericDataContainer.Tests 6 | { 7 | [AddComponentMenu("")] 8 | public class DataListToArrayTest : UdonSharpBehaviour 9 | { 10 | public UserDefinedClass userDefinedClassInstance; 11 | 12 | public void Start() 13 | { 14 | var list = DataList.New(new int[] { 0, 1, 2, 3 }); 15 | Assert.Equal(new int[] { 0, 1, 2, 3 }, list.ToArray(), this); 16 | 17 | var list2 = DataList.New(); 18 | Assert.Equal(new UserDefinedClass[] { }, list2.ToArray(), this); 19 | 20 | var list3 = DataList.New(new UserDefinedClass[] { userDefinedClassInstance }); 21 | Assert.Equal(new UserDefinedClass[] { userDefinedClassInstance }, list3.ToArray(), this); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToArrayTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f221fd0cde926cf449dca438d119d764 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToObjectArray.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListToObjectArray 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: fdd119cc3f2d8084a86e423be28c2ba9, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: a28bd9056bad84a4a8ef289f4d9fce22, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: 1902517324228788460 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 1 48 | - Name: 49 | Entry: 7 50 | Data: 51 | - Name: $k 52 | Entry: 1 53 | Data: userDefinedClassInstance 54 | - Name: $v 55 | Entry: 7 56 | Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor 57 | - Name: k__BackingField 58 | Entry: 1 59 | Data: userDefinedClassInstance 60 | - Name: k__BackingField 61 | Entry: 7 62 | Data: 3|System.RuntimeType, mscorlib 63 | - Name: 64 | Entry: 1 65 | Data: Koyashiro.GenericDataContainer.Tests.UserDefinedClass, Koyashiro.GenericDataContainer.Tests 66 | - Name: 67 | Entry: 8 68 | Data: 69 | - Name: k__BackingField 70 | Entry: 7 71 | Data: 4|System.RuntimeType, mscorlib 72 | - Name: 73 | Entry: 1 74 | Data: VRC.Udon.UdonBehaviour, VRC.Udon 75 | - Name: 76 | Entry: 8 77 | Data: 78 | - Name: k__BackingField 79 | Entry: 7 80 | Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib 81 | - Name: 82 | Entry: 6 83 | Data: 84 | - Name: 85 | Entry: 8 86 | Data: 87 | - Name: k__BackingField 88 | Entry: 5 89 | Data: true 90 | - Name: _fieldAttributes 91 | Entry: 7 92 | Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib 93 | - Name: 94 | Entry: 12 95 | Data: 0 96 | - Name: 97 | Entry: 13 98 | Data: 99 | - Name: 100 | Entry: 8 101 | Data: 102 | - Name: 103 | Entry: 8 104 | Data: 105 | - Name: 106 | Entry: 8 107 | Data: 108 | - Name: 109 | Entry: 13 110 | Data: 111 | - Name: 112 | Entry: 8 113 | Data: 114 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToObjectArray.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f571fe11ccd329c479d5bf2bfeecee3f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToObjectArrayTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UdonSharp; 3 | using Koyashiro.UdonTest; 4 | 5 | namespace Koyashiro.GenericDataContainer.Tests 6 | { 7 | [AddComponentMenu("")] 8 | public class DataListToObjectArrayTest : UdonSharpBehaviour 9 | { 10 | public UserDefinedClass userDefinedClassInstance; 11 | 12 | public void Start() 13 | { 14 | var list = DataList.New(new int[] { 0, 1, 2, 3 }); 15 | Assert.Equal(new object[] { 0, 1, 2, 3 }, list.ToObjectArray(), this); 16 | 17 | var list2 = DataList.New(); 18 | Assert.Equal(new object[] { }, list2.ToObjectArray(), this); 19 | 20 | var list3 = DataList.New(new UserDefinedClass[] { userDefinedClassInstance }); 21 | Assert.Equal(new object[] { userDefinedClassInstance }, list3.ToObjectArray(), this); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListToObjectArrayTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a28bd9056bad84a4a8ef289f4d9fce22 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListTryGetValueTest.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: DataListTryGetValueTest 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: f497f68b7515e40458fd73f86d9b5575, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: f47a85b913c370544b1c9bbd501598c1, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -6831870614180437377 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 1 48 | - Name: 49 | Entry: 7 50 | Data: 51 | - Name: $k 52 | Entry: 1 53 | Data: userDefinedClassInstance 54 | - Name: $v 55 | Entry: 7 56 | Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor 57 | - Name: k__BackingField 58 | Entry: 1 59 | Data: userDefinedClassInstance 60 | - Name: k__BackingField 61 | Entry: 7 62 | Data: 3|System.RuntimeType, mscorlib 63 | - Name: 64 | Entry: 1 65 | Data: Koyashiro.GenericDataContainer.Tests.UserDefinedClass, Koyashiro.GenericDataContainer.Tests 66 | - Name: 67 | Entry: 8 68 | Data: 69 | - Name: k__BackingField 70 | Entry: 7 71 | Data: 4|System.RuntimeType, mscorlib 72 | - Name: 73 | Entry: 1 74 | Data: VRC.Udon.UdonBehaviour, VRC.Udon 75 | - Name: 76 | Entry: 8 77 | Data: 78 | - Name: k__BackingField 79 | Entry: 7 80 | Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib 81 | - Name: 82 | Entry: 6 83 | Data: 84 | - Name: 85 | Entry: 8 86 | Data: 87 | - Name: k__BackingField 88 | Entry: 5 89 | Data: true 90 | - Name: _fieldAttributes 91 | Entry: 7 92 | Data: 5|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib 93 | - Name: 94 | Entry: 12 95 | Data: 0 96 | - Name: 97 | Entry: 13 98 | Data: 99 | - Name: 100 | Entry: 8 101 | Data: 102 | - Name: 103 | Entry: 8 104 | Data: 105 | - Name: 106 | Entry: 8 107 | Data: 108 | - Name: 109 | Entry: 13 110 | Data: 111 | - Name: 112 | Entry: 8 113 | Data: 114 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListTryGetValueTest.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cd46c0851049684d8552ae115492590 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListTryGetValueTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UdonSharp; 3 | using VRC.SDK3.Data; 4 | using Koyashiro.UdonTest; 5 | 6 | namespace Koyashiro.GenericDataContainer.Tests 7 | { 8 | [AddComponentMenu("")] 9 | public class DataListTryGetValueTest : UdonSharpBehaviour 10 | { 11 | public UserDefinedClass userDefinedClassInstance; 12 | 13 | public void Start() 14 | { 15 | // int 16 | { 17 | var intList = DataList.New(new int[] { 100, 200, 300, 400 }); 18 | 19 | int output; 20 | Assert.True(intList.TryGetValue(0, out output)); 21 | Assert.Equal(100, output); 22 | 23 | Assert.True(intList.TryGetValue(1, out output)); 24 | Assert.Equal(200, output); 25 | 26 | Assert.True(intList.TryGetValue(2, out output)); 27 | Assert.Equal(300, output); 28 | 29 | Assert.True(intList.TryGetValue(3, out output)); 30 | Assert.Equal(400, output); 31 | 32 | Assert.False(intList.TryGetValue(4, out output)); 33 | Assert.Equal(default(int), output); 34 | } 35 | 36 | // User defined class 37 | { 38 | var userDefinedClassList = DataList.New(); 39 | userDefinedClassList.Add(userDefinedClassInstance); 40 | Assert.True(userDefinedClassList.TryGetValue(0, out var output)); 41 | Assert.Equal(userDefinedClassInstance, output, this); 42 | Assert.Equal(userDefinedClassInstance.field, output.field, this); 43 | } 44 | 45 | // User defined enum 46 | { 47 | var userDefinedEnumList = DataList.New(); 48 | userDefinedEnumList.Add(UserDefinedEnum.A); 49 | Assert.True(userDefinedEnumList.TryGetValue(0, out var output)); 50 | Assert.Equal(UserDefinedEnum.A, output, this); 51 | } 52 | 53 | // DataList 54 | { 55 | var dataListList = DataList.New(); 56 | var dataList = new DataList(); 57 | dataListList.Add(dataList); 58 | Assert.True(dataListList.TryGetValue(0, out var output)); 59 | Assert.Equal(dataList, output, this); 60 | } 61 | 62 | // DataList 63 | { 64 | var genericDataListList = DataList>.New(); 65 | var genericDataList = DataList.New(); 66 | genericDataListList.Add(genericDataList); 67 | Assert.True(genericDataListList.TryGetValue(0, out var output)); 68 | Assert.Equal(genericDataList, output, this); 69 | } 70 | 71 | // DataDictionary 72 | { 73 | var dataDictionaryList = DataList.New(); 74 | var dataDictionary = new DataDictionary(); 75 | dataDictionaryList.Add(dataDictionary); 76 | Assert.True(dataDictionaryList.TryGetValue(0, out var output)); 77 | Assert.Equal(dataDictionary, output, this); 78 | } 79 | 80 | // DataDictionary 81 | { 82 | var genericDataDictionaryList = DataList>.New(); 83 | var genericDataDictionary = DataDictionary.New(); 84 | genericDataDictionaryList.Add(genericDataDictionary); 85 | Assert.True(genericDataDictionaryList.TryGetValue(0, out var output)); 86 | Assert.Equal(genericDataDictionary, output, this); 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/DataListTryGetValueTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f47a85b913c370544b1c9bbd501598c1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/Koyashiro.GenericDataContainer.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Koyashiro.GenericDataContainer.Tests", 3 | "references": [ 4 | "VRC.SDKBase", 5 | "UdonSharp.Runtime", 6 | "Koyashiro.UdonTest", 7 | "Koyashiro.GenericDataContainer" 8 | ], 9 | "includePlatforms": [], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/Koyashiro.GenericDataContainer.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70790cc8641b5824fbeafcbfd8547526 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/Koyashiro.GenericDataContainer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 5136146375e9a0a498a72a0091b40cc1, type: 3} 13 | m_Name: Koyashiro.GenericDataContainer 14 | m_EditorClassIdentifier: 15 | sourceAssembly: {fileID: 5897886265953266890, guid: 70790cc8641b5824fbeafcbfd8547526, 16 | type: 3} 17 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/Koyashiro.GenericDataContainer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de33b19aafa517044af2d307490197bf 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/TestUserDefinedClass.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} 13 | m_Name: TestUserDefinedClass 14 | m_EditorClassIdentifier: 15 | serializedUdonProgramAsset: {fileID: 11400000, guid: 8cfe1d51f0c0de142a0f57b70f9c18ff, 16 | type: 2} 17 | udonAssembly: 18 | assemblyError: 19 | sourceCsScript: {fileID: 11500000, guid: ba64507c0dde5b34080831f5a93da220, type: 3} 20 | scriptVersion: 2 21 | compiledVersion: 2 22 | behaviourSyncMode: 0 23 | hasInteractEvent: 0 24 | scriptID: -4857528659911790142 25 | serializationData: 26 | SerializedFormat: 2 27 | SerializedBytes: 28 | ReferencedUnityObjects: [] 29 | SerializedBytesString: 30 | Prefab: {fileID: 0} 31 | PrefabModificationsReferencedUnityObjects: [] 32 | PrefabModifications: [] 33 | SerializationNodes: 34 | - Name: fieldDefinitions 35 | Entry: 7 36 | Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, 37 | UdonSharp.Editor]], mscorlib 38 | - Name: comparer 39 | Entry: 7 40 | Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, 41 | mscorlib]], mscorlib 42 | - Name: 43 | Entry: 8 44 | Data: 45 | - Name: 46 | Entry: 12 47 | Data: 1 48 | - Name: 49 | Entry: 7 50 | Data: 51 | - Name: $k 52 | Entry: 1 53 | Data: field 54 | - Name: $v 55 | Entry: 7 56 | Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor 57 | - Name: k__BackingField 58 | Entry: 1 59 | Data: field 60 | - Name: k__BackingField 61 | Entry: 7 62 | Data: 3|System.RuntimeType, mscorlib 63 | - Name: 64 | Entry: 1 65 | Data: System.String, mscorlib 66 | - Name: 67 | Entry: 8 68 | Data: 69 | - Name: k__BackingField 70 | Entry: 9 71 | Data: 3 72 | - Name: k__BackingField 73 | Entry: 7 74 | Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib 75 | - Name: 76 | Entry: 6 77 | Data: 78 | - Name: 79 | Entry: 8 80 | Data: 81 | - Name: k__BackingField 82 | Entry: 5 83 | Data: true 84 | - Name: _fieldAttributes 85 | Entry: 7 86 | Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib 87 | - Name: 88 | Entry: 12 89 | Data: 0 90 | - Name: 91 | Entry: 13 92 | Data: 93 | - Name: 94 | Entry: 8 95 | Data: 96 | - Name: 97 | Entry: 8 98 | Data: 99 | - Name: 100 | Entry: 8 101 | Data: 102 | - Name: 103 | Entry: 13 104 | Data: 105 | - Name: 106 | Entry: 8 107 | Data: 108 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/TestUserDefinedClass.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f0a7efd75b8c924c93e45b4a8665fb8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/UserDefinedClass.cs: -------------------------------------------------------------------------------- 1 | using UdonSharp; 2 | 3 | namespace Koyashiro.GenericDataContainer.Tests 4 | { 5 | public class UserDefinedClass : UdonSharpBehaviour 6 | { 7 | public string field; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/UserDefinedClass.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba64507c0dde5b34080831f5a93da220 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/UserDefinedEnum.cs: -------------------------------------------------------------------------------- 1 | using UdonSharp; 2 | 3 | namespace Koyashiro.GenericDataContainer.Tests 4 | { 5 | public enum UserDefinedEnum 6 | { 7 | A, 8 | B, 9 | C, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/Tests/Runtime/UserDefinedEnum.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6e3ab63eb6568745ab0c67a8032847a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "net.koyashiro.genericdatacontainer.tests", 3 | "displayName": "GenericDataContainer.Tests", 4 | "version": "0.2.2", 5 | "vpmDependencies": { 6 | "com.vrchat.base": "3.2.0", 7 | "com.vrchat.udonsharp": "1.1.8", 8 | "net.koyashiro.genericdatacontainer": "0.2.2", 9 | "net.koyashiro.udontest": "0.5.2" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer.tests/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ab07f8be45dd714a86518d01cefd508 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 koyashiro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/LICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1dc0cfa0caedaee4f9fcfbf87e22eb1e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/README.md: -------------------------------------------------------------------------------- 1 | # GenericDataContainer 2 | 3 | A generic and type-safe wrapper for DataContainer. 4 | 5 | ## Installation 6 | 7 | To use this package, you need to add [my package repository](https://github.com/koyashiro/vpm-repos). 8 | Please read more details [here](https://github.com/koyashiro/vpm-repos#installation). 9 | 10 | Please install this package with [Creator Companion](https://vcc.docs.vrchat.com/) or [VPM CLI](https://vcc.docs.vrchat.com/vpm/cli/). 11 | 12 | ### Creator Companion 13 | 14 | 1. Enable the `koyashiro` package repository. 15 | 16 | ![image](https://user-images.githubusercontent.com/6698252/230629434-048cde39-a0ec-4c53-bfe2-46bde2e6a57a.png) 17 | 18 | 2. Find `GenericDataContainer` from the list of packages and install any version you want. 19 | 20 | ### VPM CLI 21 | 22 | 1. Execute the following command to install the package. 23 | 24 | ```sh 25 | vpm add package net.koyashiro.genericdatacontainer 26 | ``` 27 | 28 | ## `DataList` 29 | 30 | ### Example 31 | 32 | ```cs 33 | using UnityEngine; 34 | using UdonSharp; 35 | using Koyashiro.GenericDataContainer; 36 | 37 | public class DataListExample : UdonSharpBehaviour 38 | { 39 | public void Start() 40 | { 41 | DataList list = DataList.New(); 42 | 43 | list.Add(100); 44 | list.Add(200); 45 | list.Add(300); 46 | 47 | Debug.Log(list.GetValue(0)); // 100 48 | Debug.Log(list.GetValue(1)); // 200 49 | Debug.Log(list.GetValue(2)); // 300 50 | 51 | int[] array = list.ToArray(); 52 | } 53 | } 54 | ``` 55 | 56 | ## `DataDictionary` 57 | 58 | ### Example 59 | 60 | ```cs 61 | using UnityEngine; 62 | using UdonSharp; 63 | using Koyashiro.GenericDataContainer; 64 | 65 | public class DataDictionaryExample : UdonSharpBehaviour 66 | { 67 | public void Start() 68 | { 69 | DataDictionary dic = DataDictionary.New(); 70 | 71 | dic.SetValue("first", 100); 72 | dic.SetValue("second", 200); 73 | dic.SetValue("third", 300); 74 | 75 | Debug.Log(dic.GetValue("first")); // 100 76 | Debug.Log(dic.GetValue("second")); // 200 77 | Debug.Log(dic.GetValue("third")); // 300 78 | } 79 | } 80 | ``` 81 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 90aacc3a6baf2b647b6a3fb4255cb6d4 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1da904c9c8b03334990dd0070471e4c2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionary.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | 5 | namespace Koyashiro.GenericDataContainer 6 | { 7 | [AddComponentMenu("")] 8 | public class DataDictionary : UdonSharpBehaviour 9 | { 10 | public static DataDictionary New() 11 | { 12 | return (DataDictionary)(object)new DataDictionary(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionary.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18c1fc1e75f2aba46acc44c8461decad 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionaryExt.cs: -------------------------------------------------------------------------------- 1 | using VRC.SDK3.Data; 2 | using Koyashiro.GenericDataContainer.Internal; 3 | 4 | namespace Koyashiro.GenericDataContainer 5 | { 6 | public static class DataDictionaryExt 7 | { 8 | public static int Count(this DataDictionary dictionary) 9 | { 10 | var dataDictionary = (DataDictionary)(object)(dictionary); 11 | return dataDictionary.Count; 12 | } 13 | 14 | public static void Add(this DataDictionary dictionary, TKey key, TValue value) 15 | { 16 | var dataDictionary = (DataDictionary)(object)(dictionary); 17 | var keyToken = DataTokenUtil.NewDataToken(key); 18 | var valueToken = DataTokenUtil.NewDataToken(value); 19 | dataDictionary.Add(keyToken, valueToken); 20 | } 21 | 22 | public static void Clear(this DataDictionary dictionary) 23 | { 24 | var dataDictionary = (DataDictionary)(object)(dictionary); 25 | dataDictionary.Clear(); 26 | } 27 | 28 | public static bool ContainsKey(this DataDictionary dictionary, TKey key) 29 | { 30 | var dataDictionary = (DataDictionary)(object)(dictionary); 31 | var keyToken = DataTokenUtil.NewDataToken(key); 32 | return dataDictionary.ContainsKey(keyToken); 33 | } 34 | 35 | public static bool ContainsValue(this DataDictionary dictionary, TValue value) 36 | { 37 | var dataDictionary = (DataDictionary)(object)(dictionary); 38 | var keyValue = DataTokenUtil.NewDataToken(value); 39 | return dataDictionary.ContainsValue(keyValue); 40 | } 41 | 42 | public static DataDictionary DeepClohne(this DataDictionary dictionary) 43 | { 44 | var dataDictionary = (DataDictionary)(object)(dictionary); 45 | return (DataDictionary)(object)dataDictionary.DeepClone(); 46 | } 47 | 48 | public static DataList GetKeys(this DataDictionary dictionary) 49 | { 50 | var dataDictionary = (DataDictionary)(object)(dictionary); 51 | return (DataList)(object)dataDictionary.GetKeys(); 52 | } 53 | 54 | public static DataList GetValues(this DataDictionary dictionary) 55 | { 56 | var dataDictionary = (DataDictionary)(object)(dictionary); 57 | return (DataList)(object)dataDictionary.GetValues(); 58 | } 59 | 60 | public static bool Remove(this DataDictionary dictionary, TKey key) 61 | { 62 | var dataDictionary = (DataDictionary)(object)(dictionary); 63 | var keyToken = DataTokenUtil.NewDataToken(key); 64 | return dataDictionary.Remove(keyToken); 65 | } 66 | 67 | public static bool Remove(this DataDictionary dictionary, TKey key, out TValue value) 68 | { 69 | var dataDictionary = (DataDictionary)(object)(dictionary); 70 | var keyToken = DataTokenUtil.NewDataToken(key); 71 | var result = dataDictionary.Remove(keyToken, out var valueToken); 72 | switch (valueToken.TokenType) 73 | { 74 | case TokenType.Reference: 75 | value = (TValue)valueToken.Reference; 76 | break; 77 | case TokenType.DataList: 78 | value = (TValue)(object)valueToken.DataList; 79 | break; 80 | case TokenType.DataDictionary: 81 | value = (TValue)(object)valueToken.DataDictionary; 82 | break; 83 | case TokenType.Int: 84 | if (((TValue)(object)valueToken).GetType() == typeof(DataToken)) 85 | { 86 | value = (TValue)(object)valueToken.Int; 87 | } 88 | else 89 | { 90 | value = (TValue)(object)valueToken; 91 | } 92 | break; 93 | default: 94 | value = (TValue)(object)valueToken; 95 | break; 96 | } 97 | return result; 98 | } 99 | 100 | public static void SetValue(this DataDictionary dictionary, TKey key, TValue value) 101 | { 102 | var dataDictionary = (DataDictionary)(object)(dictionary); 103 | var keyToken = DataTokenUtil.NewDataToken(key); 104 | var keyValue = DataTokenUtil.NewDataToken(value); 105 | dataDictionary.SetValue(keyToken, keyValue); 106 | } 107 | 108 | public static DataDictionary ShallowClone(this DataDictionary dictionary) 109 | { 110 | var dataDictionary = (DataDictionary)(object)(dictionary); 111 | return (DataDictionary)(object)dataDictionary.ShallowClone(); 112 | } 113 | 114 | public static bool TryGetValue(this DataDictionary dictionary, TKey key, out TValue value) 115 | { 116 | var dataDictionary = (DataDictionary)(object)(dictionary); 117 | 118 | var keyToken = DataTokenUtil.NewDataToken(key); 119 | if (!dataDictionary.TryGetValue(keyToken, out var valueToken)) 120 | { 121 | value = default; 122 | return false; 123 | } 124 | 125 | switch (valueToken.TokenType) 126 | { 127 | case TokenType.Reference: 128 | value = (TValue)valueToken.Reference; 129 | break; 130 | case TokenType.DataList: 131 | value = (TValue)(object)valueToken.DataList; 132 | break; 133 | case TokenType.DataDictionary: 134 | value = (TValue)(object)valueToken.DataDictionary; 135 | break; 136 | case TokenType.Int: 137 | if (((TValue)(object)valueToken).GetType() == typeof(DataToken)) 138 | { 139 | value = (TValue)(object)valueToken.Int; 140 | } 141 | else 142 | { 143 | value = (TValue)(object)valueToken; 144 | } 145 | break; 146 | default: 147 | value = (TValue)(object)valueToken; 148 | break; 149 | } 150 | 151 | return true; 152 | } 153 | 154 | public static TValue GetValue(this DataDictionary dictionary, TKey key) 155 | { 156 | var dataDictionary = (DataDictionary)(object)(dictionary); 157 | 158 | var keyToken = DataTokenUtil.NewDataToken(key); 159 | 160 | var valueToken = dataDictionary[keyToken]; 161 | switch (valueToken.TokenType) 162 | { 163 | case TokenType.Reference: 164 | return (TValue)valueToken.Reference; 165 | case TokenType.DataList: 166 | return (TValue)(object)valueToken.DataList; 167 | case TokenType.DataDictionary: 168 | return (TValue)(object)valueToken.DataDictionary; 169 | case TokenType.Int: 170 | if (((TValue)(object)valueToken).GetType() == typeof(DataToken)) 171 | { 172 | return (TValue)(object)valueToken.Int; 173 | } 174 | else 175 | { 176 | return (TValue)(object)valueToken; 177 | } 178 | default: 179 | return (TValue)(object)valueToken; 180 | } 181 | } 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionaryExt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 030a39fc011834c44a3da6647aa35349 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataList.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using VRC.SDK3.Data; 3 | using UdonSharp; 4 | using Koyashiro.GenericDataContainer.Internal; 5 | 6 | namespace Koyashiro.GenericDataContainer 7 | { 8 | [AddComponentMenu("")] 9 | public class DataList : UdonSharpBehaviour 10 | { 11 | public static DataList New() 12 | { 13 | return (DataList)(object)new DataList(); 14 | } 15 | 16 | public static DataList New(params T[] array) 17 | { 18 | var tokens = DataTokenUtil.NewDataTokens(array); 19 | return (DataList)(object)new DataList(tokens); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c79bdae5f286c24897663ae8b73f8b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataListExt.cs: -------------------------------------------------------------------------------- 1 | using VRC.SDK3.Data; 2 | using Koyashiro.GenericDataContainer.Internal; 3 | 4 | namespace Koyashiro.GenericDataContainer 5 | { 6 | public static class DataListExt 7 | { 8 | public static int Capacity(this DataList list) 9 | { 10 | var dataList = (DataList)(object)(list); 11 | return dataList.Capacity; 12 | } 13 | 14 | public static int Count(this DataList list) 15 | { 16 | var dataList = (DataList)(object)(list); 17 | return dataList.Count; 18 | } 19 | 20 | public static void Add(this DataList list, T item) 21 | { 22 | var dataList = (DataList)(object)(list); 23 | var token = DataTokenUtil.NewDataToken(item); 24 | dataList.Add(token); 25 | } 26 | 27 | public static void AddRange(this DataList list, T[] collection) 28 | { 29 | foreach (var item in collection) 30 | { 31 | list.Add(item); 32 | } 33 | } 34 | 35 | public static void AddRange(this DataList list, DataList collection) 36 | { 37 | var dataList = (DataList)(object)(list); 38 | var tokens = (DataList)(object)collection; 39 | dataList.AddRange(tokens); 40 | } 41 | 42 | public static void BinarySearch(this DataList list, T item) 43 | { 44 | var dataList = (DataList)(object)(list); 45 | var token = DataTokenUtil.NewDataToken(item); 46 | dataList.BinarySearch(token); 47 | } 48 | 49 | public static void BinarySearch(this DataList list, int index, int count, T item) 50 | { 51 | var dataList = (DataList)(object)(list); 52 | var token = DataTokenUtil.NewDataToken(item); 53 | dataList.BinarySearch(index, count, token); 54 | } 55 | 56 | public static void Clear(this DataList list) 57 | { 58 | var dataList = (DataList)(object)(list); 59 | dataList.Clear(); 60 | } 61 | 62 | public static bool Contains(this DataList list, T item) 63 | { 64 | var dataList = (DataList)(object)(list); 65 | var token = DataTokenUtil.NewDataToken(item); 66 | return dataList.Contains(token); 67 | } 68 | 69 | public static DataList DeepClone(this DataList list) 70 | { 71 | var dataList = (DataList)(object)(list); 72 | return (DataList)(object)dataList.DeepClone(); 73 | } 74 | 75 | public static DataList GetRange(this DataList list, int index, int count) 76 | { 77 | var dataList = (DataList)(object)(list); 78 | return (DataList)(object)dataList.GetRange(index, count); 79 | } 80 | 81 | public static int IndexOf(this DataList list, T item) 82 | { 83 | var dataList = (DataList)(object)(list); 84 | var token = DataTokenUtil.NewDataToken(item); 85 | return dataList.IndexOf(token); 86 | } 87 | 88 | public static int IndexOf(this DataList list, T item, int index) 89 | { 90 | var dataList = (DataList)(object)(list); 91 | var token = DataTokenUtil.NewDataToken(item); 92 | return dataList.IndexOf(token, index); 93 | } 94 | 95 | public static int IndexOf(this DataList list, T item, int index, int count) 96 | { 97 | var dataList = (DataList)(object)(list); 98 | var token = DataTokenUtil.NewDataToken(item); 99 | return dataList.IndexOf(token, index, count); 100 | } 101 | 102 | public static void Insert(this DataList list, int index, T item) 103 | { 104 | var dataList = (DataList)(object)(list); 105 | var token = DataTokenUtil.NewDataToken(item); 106 | dataList.Insert(index, token); 107 | } 108 | 109 | public static void InsertRange(this DataList list, int index, T[] collection) 110 | { 111 | for (var i = index; i < collection.Length; i++) 112 | { 113 | list.Insert(i, collection[i]); 114 | } 115 | } 116 | 117 | public static void InsertRange(this DataList list, int index, DataList collection) 118 | { 119 | var dataList = (DataList)(object)(list); 120 | var tokens = (DataList)(object)collection; 121 | dataList.InsertRange(index, tokens); 122 | } 123 | 124 | public static int LastIndexOf(this DataList list, T item) 125 | { 126 | var dataList = (DataList)(object)(list); 127 | var token = DataTokenUtil.NewDataToken(item); 128 | return dataList.LastIndexOf(token); 129 | } 130 | 131 | public static int LastIndexOf(this DataList list, T item, int index) 132 | { 133 | var dataList = (DataList)(object)(list); 134 | var token = DataTokenUtil.NewDataToken(item); 135 | return dataList.LastIndexOf(token, index); 136 | } 137 | 138 | public static int LastIndexOf(this DataList list, T item, int index, int count) 139 | { 140 | var dataList = (DataList)(object)(list); 141 | var token = DataTokenUtil.NewDataToken(item); 142 | return dataList.LastIndexOf(token, index, count); 143 | } 144 | 145 | public static bool Remove(this DataList list, T item) 146 | { 147 | var dataList = (DataList)(object)(list); 148 | var token = DataTokenUtil.NewDataToken(item); 149 | return dataList.Remove(token); 150 | } 151 | 152 | public static bool RemoveAll(this DataList list, T item) 153 | { 154 | var dataList = (DataList)(object)(list); 155 | var token = DataTokenUtil.NewDataToken(item); 156 | return dataList.RemoveAll(token); 157 | } 158 | 159 | public static void RemoveAt(this DataList list, int index) 160 | { 161 | var dataList = (DataList)(object)(list); 162 | dataList.RemoveAt(index); 163 | } 164 | 165 | public static void RemoveRange(this DataList list, int index, int count) 166 | { 167 | var dataList = (DataList)(object)(list); 168 | dataList.RemoveRange(index, count); 169 | } 170 | 171 | public static void Reverse(this DataList list) 172 | { 173 | var dataList = (DataList)(object)(list); 174 | dataList.Reverse(); 175 | } 176 | 177 | public static void Reverse(this DataList list, int index, int count) 178 | { 179 | var dataList = (DataList)(object)(list); 180 | dataList.Reverse(index, count); 181 | } 182 | 183 | public static void SetValue(this DataList list, int index, T item) 184 | { 185 | var dataList = (DataList)(object)(list); 186 | var token = DataTokenUtil.NewDataToken(item); 187 | dataList.SetValue(index, token); 188 | } 189 | 190 | public static DataList ShallowClone(this DataList list) 191 | { 192 | var dataList = (DataList)(object)(list); 193 | return (DataList)(object)dataList.ShallowClone(); 194 | } 195 | 196 | public static void Sort(this DataList list) 197 | { 198 | var dataList = (DataList)(object)(list); 199 | dataList.Sort(); 200 | } 201 | 202 | public static void Sort(this DataList list, int index, int count) 203 | { 204 | var dataList = (DataList)(object)(list); 205 | dataList.Sort(index, count); 206 | } 207 | 208 | public static T[] ToArray(this DataList list) 209 | { 210 | var dataList = (DataList)(object)(list); 211 | var length = dataList.Count; 212 | var array = new T[length]; 213 | for (var i = 0; i < length; i++) 214 | { 215 | var token = dataList[i]; 216 | switch (token.TokenType) 217 | { 218 | case TokenType.Reference: 219 | array[i] = (T)token.Reference; 220 | break; 221 | case TokenType.DataList: 222 | array[i] = (T)(object)token.DataList; 223 | break; 224 | case TokenType.DataDictionary: 225 | array[i] = (T)(object)token.DataDictionary; 226 | break; 227 | case TokenType.Int: 228 | if (((T)(object)token).GetType() == typeof(DataToken)) 229 | { 230 | array[i] = (T)(object)token.Int; 231 | } 232 | else 233 | { 234 | array[i] = (T)(object)token; 235 | } 236 | break; 237 | default: 238 | array[i] = (T)(object)token; 239 | break; 240 | } 241 | } 242 | return array; 243 | } 244 | 245 | public static object[] ToObjectArray(this DataList list) 246 | { 247 | var dataList = (DataList)(object)(list); 248 | var length = dataList.Count; 249 | var array = new object[length]; 250 | for (var i = 0; i < length; i++) 251 | { 252 | var token = dataList[i]; 253 | switch (token.TokenType) 254 | { 255 | case TokenType.Reference: 256 | array[i] = (T)token.Reference; 257 | break; 258 | case TokenType.DataList: 259 | array[i] = (T)(object)token.DataList; 260 | break; 261 | case TokenType.DataDictionary: 262 | array[i] = (T)(object)token.DataDictionary; 263 | break; 264 | case TokenType.Int: 265 | if (((T)(object)token).GetType() == typeof(DataToken)) 266 | { 267 | array[i] = (T)(object)token.Int; 268 | } 269 | else 270 | { 271 | array[i] = (T)(object)token; 272 | } 273 | break; 274 | default: 275 | array[i] = (T)(object)token; 276 | break; 277 | } 278 | } 279 | return array; 280 | } 281 | 282 | public static void TrimExcess(this DataList list) 283 | { 284 | var dataList = (DataList)(object)(list); 285 | dataList.TrimExcess(); 286 | } 287 | 288 | public static bool TryGetValue(this DataList list, int index, out T value) 289 | { 290 | var dataList = (DataList)(object)(list); 291 | if (!dataList.TryGetValue(index, out var token)) 292 | { 293 | value = default; 294 | return false; 295 | } 296 | 297 | switch (token.TokenType) 298 | { 299 | case TokenType.Reference: 300 | value = (T)token.Reference; 301 | break; 302 | case TokenType.DataList: 303 | value = (T)(object)token.DataList; 304 | break; 305 | case TokenType.DataDictionary: 306 | value = (T)(object)token.DataDictionary; 307 | break; 308 | case TokenType.Int: 309 | if (((T)(object)token).GetType() == typeof(DataToken)) 310 | { 311 | value = (T)(object)token.Int; 312 | } 313 | else 314 | { 315 | value = (T)(object)token; 316 | } 317 | break; 318 | default: 319 | value = (T)(object)token; 320 | break; 321 | } 322 | 323 | return true; 324 | } 325 | 326 | public static T GetValue(this DataList list, int index) 327 | { 328 | var dataList = (DataList)(object)(list); 329 | 330 | var token = dataList[index]; 331 | switch (token.TokenType) 332 | { 333 | case TokenType.Reference: 334 | return (T)token.Reference; 335 | case TokenType.DataList: 336 | return (T)(object)token.DataList; 337 | case TokenType.DataDictionary: 338 | return (T)(object)token.DataDictionary; 339 | case TokenType.Int: 340 | if (((T)(object)token).GetType() == typeof(DataToken)) 341 | { 342 | return (T)(object)token.Int; 343 | } 344 | else 345 | { 346 | return (T)(object)token; 347 | } 348 | default: 349 | return (T)(object)token; 350 | } 351 | } 352 | } 353 | } 354 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/DataListExt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d52f9b47c04f7b4bb63882cfab62aad 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Internal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50805b03c765ad64abc62e73e259a817 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Internal/DataTokenUtil.cs: -------------------------------------------------------------------------------- 1 | using VRC.SDK3.Data; 2 | 3 | namespace Koyashiro.GenericDataContainer.Internal 4 | { 5 | public static class DataTokenUtil 6 | { 7 | public static DataToken NewDataToken(T obj) 8 | { 9 | var objType = obj.GetType(); 10 | 11 | // TokenType.Boolean 12 | if (objType == typeof(bool)) 13 | { 14 | return new DataToken((bool)(object)obj); 15 | } 16 | // TokenType.SByte 17 | else if (objType == typeof(sbyte)) 18 | { 19 | return new DataToken((sbyte)(object)obj); 20 | } 21 | // TokenType.Byte 22 | else if (objType == typeof(byte)) 23 | { 24 | return new DataToken((byte)(object)obj); 25 | } 26 | // TokenType.Short 27 | else if (objType == typeof(short)) 28 | { 29 | return new DataToken((short)(object)obj); 30 | } 31 | // TokenType.UShort 32 | else if (objType == typeof(ushort)) 33 | { 34 | return new DataToken((ushort)(object)obj); 35 | } 36 | // TokenType.Int 37 | else if (objType == typeof(int)) 38 | { 39 | return new DataToken((int)(object)obj); 40 | } 41 | // TokenType.UInt 42 | else if (objType == typeof(uint)) 43 | { 44 | return new DataToken((uint)(object)obj); 45 | } 46 | // TokenType.Long 47 | else if (objType == typeof(long)) 48 | { 49 | return new DataToken((long)(object)obj); 50 | } 51 | // TokenType.ULong 52 | else if (objType == typeof(ulong)) 53 | { 54 | return new DataToken((ulong)(object)obj); 55 | } 56 | // TokenType.Float 57 | else if (objType == typeof(float)) 58 | { 59 | return new DataToken((float)(object)obj); 60 | } 61 | // TokenType.Double 62 | else if (objType == typeof(double)) 63 | { 64 | return new DataToken((double)(object)obj); 65 | } 66 | // TokenType.String 67 | else if (objType == typeof(string)) 68 | { 69 | return new DataToken((string)(object)obj); 70 | } 71 | // TokenType.DataList 72 | else if (objType == typeof(DataList)) 73 | { 74 | return new DataToken((DataList)(object)obj); 75 | } 76 | // TokenType.DataDictionary 77 | else if (objType == typeof(DataDictionary)) 78 | { 79 | return new DataToken((DataDictionary)(object)obj); 80 | } 81 | // TokenType.Error 82 | else if (objType == typeof(DataError)) 83 | { 84 | return new DataToken((DataError)(object)obj); 85 | } 86 | // TokenType.Reference 87 | else 88 | { 89 | return new DataToken(obj); 90 | } 91 | } 92 | 93 | public static DataToken[] NewDataTokens(T[] array) 94 | { 95 | var length = array.Length; 96 | var tokens = new DataToken[length]; 97 | var arrayType = array.GetType(); 98 | 99 | // TokenType.Boolean 100 | if (arrayType == typeof(bool[])) 101 | { 102 | var boolArray = (bool[])(object)array; 103 | for (var i = 0; i < length; i++) 104 | { 105 | tokens[i] = new DataToken(boolArray[i]); 106 | } 107 | } 108 | // TokenType.SByte 109 | else if (arrayType == typeof(sbyte[])) 110 | { 111 | var sbyteArray = (sbyte[])(object)array; 112 | for (var i = 0; i < length; i++) 113 | { 114 | tokens[i] = new DataToken(sbyteArray[i]); 115 | } 116 | } 117 | // TokenType.Byte 118 | else if (arrayType == typeof(byte[])) 119 | { 120 | var byteArray = (byte[])(object)array; 121 | for (var i = 0; i < length; i++) 122 | { 123 | tokens[i] = new DataToken(byteArray[i]); 124 | } 125 | } 126 | // TokenType.Short 127 | else if (arrayType == typeof(short[])) 128 | { 129 | var shortArray = (short[])(object)array; 130 | for (var i = 0; i < length; i++) 131 | { 132 | tokens[i] = new DataToken(shortArray[i]); 133 | } 134 | } 135 | // TokenType.UShort 136 | else if (arrayType == typeof(ushort[])) 137 | { 138 | var ushortArray = (ushort[])(object)array; 139 | for (var i = 0; i < length; i++) 140 | { 141 | tokens[i] = new DataToken(ushortArray[i]); 142 | } 143 | } 144 | // TokenType.Int 145 | else if (arrayType == typeof(int[])) 146 | { 147 | var intArray = (int[])(object)array; 148 | for (var i = 0; i < length; i++) 149 | { 150 | tokens[i] = new DataToken(intArray[i]); 151 | } 152 | } 153 | // TokenType.UInt 154 | else if (arrayType == typeof(uint[])) 155 | { 156 | var uintArray = (uint[])(object)array; 157 | for (var i = 0; i < length; i++) 158 | { 159 | tokens[i] = new DataToken(uintArray[i]); 160 | } 161 | } 162 | // TokenType.Long 163 | else if (arrayType == typeof(long[])) 164 | { 165 | var longArray = (long[])(object)array; 166 | for (var i = 0; i < length; i++) 167 | { 168 | tokens[i] = new DataToken(longArray[i]); 169 | } 170 | } 171 | // TokenType.ULong 172 | else if (arrayType == typeof(ulong[])) 173 | { 174 | var ulongArray = (ulong[])(object)array; 175 | for (var i = 0; i < length; i++) 176 | { 177 | tokens[i] = new DataToken(ulongArray[i]); 178 | } 179 | } 180 | // TokenType.Float 181 | else if (arrayType == typeof(float[])) 182 | { 183 | var floatArray = (float[])(object)array; 184 | for (var i = 0; i < length; i++) 185 | { 186 | tokens[i] = new DataToken(floatArray[i]); 187 | } 188 | } 189 | // TokenType.Double 190 | else if (arrayType == typeof(double[])) 191 | { 192 | var doubleArray = (double[])(object)array; 193 | for (var i = 0; i < length; i++) 194 | { 195 | tokens[i] = new DataToken(doubleArray[i]); 196 | } 197 | } 198 | // TokenType.String 199 | else if (arrayType == typeof(string[])) 200 | { 201 | var stringArray = (string[])(object)array; 202 | for (var i = 0; i < length; i++) 203 | { 204 | tokens[i] = new DataToken(stringArray[i]); 205 | } 206 | } 207 | // TokenType.DataList 208 | else if (arrayType == typeof(DataList[])) 209 | { 210 | var dataListArray = (DataList[])(object)array; 211 | for (var i = 0; i < length; i++) 212 | { 213 | tokens[i] = new DataToken(dataListArray[i]); 214 | } 215 | } 216 | // TokenType.DataDictionary 217 | else if (arrayType == typeof(DataDictionary[])) 218 | { 219 | var dataDictionaryArray = (DataDictionary[])(object)array; 220 | for (var i = 0; i < length; i++) 221 | { 222 | tokens[i] = new DataToken(dataDictionaryArray[i]); 223 | } 224 | } 225 | // TokenType.Error 226 | else if (arrayType == typeof(DataError[])) 227 | { 228 | var errorArray = (DataError[])(object)array; 229 | for (var i = 0; i < length; i++) 230 | { 231 | tokens[i] = new DataToken(errorArray[i]); 232 | } 233 | } 234 | // TokenType.Reference 235 | else 236 | { 237 | for (var i = 0; i < length; i++) 238 | { 239 | tokens[i] = new DataToken(array[i]); 240 | } 241 | } 242 | 243 | return tokens; 244 | } 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Internal/DataTokenUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cd94ad189cd810479dc425393f8779e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Koyashiro.GenericDataContainer.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Koyashiro.GenericDataContainer", 3 | "references": [ 4 | "VRC.SDKBase", 5 | "UdonSharp.Runtime" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Koyashiro.GenericDataContainer.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4092cc158df05c5469d881a2ac84ec8a 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Koyashiro.GenericDataContainer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 5136146375e9a0a498a72a0091b40cc1, type: 3} 13 | m_Name: Koyashiro.GenericDataContainer 14 | m_EditorClassIdentifier: 15 | sourceAssembly: {fileID: 5897886265953266890, guid: 4092cc158df05c5469d881a2ac84ec8a, 16 | type: 3} 17 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/Runtime/Koyashiro.GenericDataContainer.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47aee74ee2949694eb18e41cb8f4cee7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "net.koyashiro.genericdatacontainer", 3 | "displayName": "GenericDataContainer", 4 | "version": "0.2.2", 5 | "description": "A generic and type-safe wrapper for DataContainer.", 6 | "homepage": "https://github.com/koyashiro/generic-data-container", 7 | "bugs": { 8 | "url": "https://github.com/koyashiro/generic-data-container/issues" 9 | }, 10 | "license": "MIT", 11 | "author": { 12 | "name": "koyashiro", 13 | "email": "develop@koyashi.ro", 14 | "url": "https://github.com/koyashiro" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/koyashiro/generic-data-container" 19 | }, 20 | "samples": [], 21 | "url": "https://github.com/koyashiro/generic-data-container/releases/download/v0.2.2/net.koyashiro.genericdatacontainer-0.2.2.zip", 22 | "vpmDependencies": { 23 | "com.vrchat.base": "^3.2.x", 24 | "com.vrchat.udonsharp": "^1.1.8" 25 | }, 26 | "repo": "https://vpm.koyashiro.net/index.json" 27 | } 28 | -------------------------------------------------------------------------------- /Packages/net.koyashiro.genericdatacontainer/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9c785aa684f0a744969117d93136d86 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/vpm-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.vrchat.udonsharp": { 4 | "version": "1.1.8" 5 | }, 6 | "com.vrchat.clientsim": { 7 | "version": "1.2.4" 8 | }, 9 | "com.vrchat.core.vpm-resolver": { 10 | "version": "0.1.19" 11 | }, 12 | "net.koyashiro.udontest": { 13 | "version": "0.5.2" 14 | } 15 | }, 16 | "locked": { 17 | "com.vrchat.udonsharp": { 18 | "version": "1.1.8", 19 | "dependencies": { 20 | "com.vrchat.worlds": "^3.1.x" 21 | } 22 | }, 23 | "com.vrchat.worlds": { 24 | "version": "3.2.0", 25 | "dependencies": { 26 | "com.vrchat.base": "3.2.0" 27 | } 28 | }, 29 | "com.vrchat.base": { 30 | "version": "3.2.0", 31 | "dependencies": {} 32 | }, 33 | "com.vrchat.clientsim": { 34 | "version": "1.2.4", 35 | "dependencies": { 36 | "com.vrchat.worlds": "^3.1.x" 37 | } 38 | }, 39 | "com.vrchat.core.vpm-resolver": { 40 | "version": "0.1.19", 41 | "dependencies": {} 42 | }, 43 | "net.koyashiro.udontest": { 44 | "version": "0.5.2", 45 | "dependencies": { 46 | "com.vrchat.base": "^3.2.x", 47 | "com.vrchat.udonsharp": "^1.1.8" 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 48000 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 64 14 | m_RealVoiceCount: 32 15 | m_EnableOutputSuspension: 1 16 | m_SpatializerPlugin: OculusSpatializer 17 | m_AmbisonicDecoderPlugin: OculusSpatializer 18 | m_DisableAudio: 0 19 | m_VirtualizeEffects: 1 20 | m_RequestedDSPBufferSize: 0 21 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: dfafffffdfafffffdfafffffffffffffdfafffffc800c0ffffffffffffffffffdfafffffdf09fcffdf09fcffdfafffffc800c0ffdfe9c3ffc820c0ffdfa9ffffdfa9ffffdfa9ffffdf8fffffdf8fffffdf8fffffdf8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 7 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: [] 32 | m_PreloadedShaders: [] 33 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 34 | type: 0} 35 | m_CustomRenderPipeline: {fileID: 0} 36 | m_TransparencySortMode: 0 37 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 38 | m_DefaultRenderingPath: 1 39 | m_DefaultMobileRenderingPath: 1 40 | m_TierSettings: [] 41 | m_LightmapStripping: 0 42 | m_FogStripping: 0 43 | m_InstancingStripping: 0 44 | m_LightmapKeepPlain: 1 45 | m_LightmapKeepDirCombined: 1 46 | m_LightmapKeepDynamicPlain: 1 47 | m_LightmapKeepDynamicDirCombined: 1 48 | m_LightmapKeepShadowMask: 1 49 | m_LightmapKeepSubtractive: 1 50 | m_FogKeepLinear: 1 51 | m_FogKeepExp: 1 52 | m_FogKeepExp2: 1 53 | m_AlbedoSwatchInfos: [] 54 | m_LightsUseLinearIntensity: 1 55 | m_LightsUseColorTemperature: 1 56 | m_LogWhenShaderIsCompiled: 0 57 | m_AllowEnlightenSupportForUpgradedProject: 0 58 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_ScopedRegistriesSettingsExpanded: 1 16 | oneTimeWarningShown: 0 17 | m_Registries: 18 | - m_Id: main 19 | m_Name: 20 | m_Url: https://packages.unity.com 21 | m_Scopes: [] 22 | m_IsDefault: 1 23 | m_UserSelectedRegistryName: 24 | m_UserAddingNewScopedRegistry: 0 25 | m_RegistryInfoDraft: 26 | m_ErrorMessage: 27 | m_Original: 28 | m_Id: 29 | m_Name: 30 | m_Url: 31 | m_Scopes: [] 32 | m_IsDefault: 0 33 | m_Modified: 0 34 | m_Name: 35 | m_Url: 36 | m_Scopes: 37 | - 38 | m_SelectedScopeIndex: 0 39 | -------------------------------------------------------------------------------- /ProjectSettings/Packages/com.vrchat.base/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplesImported": false, 3 | "allowVRCPackageChanges": false, 4 | "samplesHintCreated": true, 5 | "debugVCCConnection": false 6 | } -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.4.31f1 2 | m_EditorVersionWithRevision: 2019.4.31f1 (bd5abf232a62) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: VRC Low 11 | pixelLightCount: 4 12 | shadows: 2 13 | shadowResolution: 2 14 | shadowProjection: 1 15 | shadowCascades: 2 16 | shadowDistance: 75 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 4 22 | textureQuality: 0 23 | anisotropicTextures: 2 24 | antiAliasing: 0 25 | softParticles: 1 26 | softVegetation: 1 27 | realtimeReflectionProbes: 1 28 | billboardsFaceCameraPosition: 1 29 | vSyncCount: 0 30 | lodBias: 1 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 1024 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 64 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: 45 | - Android 46 | - serializedVersion: 2 47 | name: VRC Medium 48 | pixelLightCount: 4 49 | shadows: 2 50 | shadowResolution: 2 51 | shadowProjection: 1 52 | shadowCascades: 2 53 | shadowDistance: 75 54 | shadowNearPlaneOffset: 2 55 | shadowCascade2Split: 0.33333334 56 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 57 | shadowmaskMode: 0 58 | skinWeights: 4 59 | textureQuality: 0 60 | anisotropicTextures: 2 61 | antiAliasing: 4 62 | softParticles: 1 63 | softVegetation: 1 64 | realtimeReflectionProbes: 1 65 | billboardsFaceCameraPosition: 1 66 | vSyncCount: 0 67 | lodBias: 1.5 68 | maximumLODLevel: 0 69 | streamingMipmapsActive: 0 70 | streamingMipmapsAddAllCameras: 1 71 | streamingMipmapsMemoryBudget: 512 72 | streamingMipmapsRenderersPerFrame: 512 73 | streamingMipmapsMaxLevelReduction: 2 74 | streamingMipmapsMaxFileIORequests: 1024 75 | particleRaycastBudget: 2048 76 | asyncUploadTimeSlice: 2 77 | asyncUploadBufferSize: 64 78 | asyncUploadPersistentBuffer: 1 79 | resolutionScalingFixedDPIFactor: 1 80 | customRenderPipeline: {fileID: 0} 81 | excludedTargetPlatforms: 82 | - Android 83 | - serializedVersion: 2 84 | name: VRC High 85 | pixelLightCount: 8 86 | shadows: 2 87 | shadowResolution: 3 88 | shadowProjection: 1 89 | shadowCascades: 2 90 | shadowDistance: 75 91 | shadowNearPlaneOffset: 2 92 | shadowCascade2Split: 0.33333334 93 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 94 | shadowmaskMode: 0 95 | skinWeights: 4 96 | textureQuality: 0 97 | anisotropicTextures: 2 98 | antiAliasing: 4 99 | softParticles: 1 100 | softVegetation: 1 101 | realtimeReflectionProbes: 1 102 | billboardsFaceCameraPosition: 1 103 | vSyncCount: 0 104 | lodBias: 2 105 | maximumLODLevel: 0 106 | streamingMipmapsActive: 0 107 | streamingMipmapsAddAllCameras: 1 108 | streamingMipmapsMemoryBudget: 512 109 | streamingMipmapsRenderersPerFrame: 512 110 | streamingMipmapsMaxLevelReduction: 2 111 | streamingMipmapsMaxFileIORequests: 1024 112 | particleRaycastBudget: 4096 113 | asyncUploadTimeSlice: 2 114 | asyncUploadBufferSize: 128 115 | asyncUploadPersistentBuffer: 1 116 | resolutionScalingFixedDPIFactor: 1 117 | customRenderPipeline: {fileID: 0} 118 | excludedTargetPlatforms: 119 | - Android 120 | - serializedVersion: 2 121 | name: VRC Ultra 122 | pixelLightCount: 8 123 | shadows: 2 124 | shadowResolution: 3 125 | shadowProjection: 1 126 | shadowCascades: 4 127 | shadowDistance: 150 128 | shadowNearPlaneOffset: 2 129 | shadowCascade2Split: 0.33333334 130 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 131 | shadowmaskMode: 0 132 | skinWeights: 4 133 | textureQuality: 0 134 | anisotropicTextures: 2 135 | antiAliasing: 4 136 | softParticles: 1 137 | softVegetation: 1 138 | realtimeReflectionProbes: 1 139 | billboardsFaceCameraPosition: 1 140 | vSyncCount: 0 141 | lodBias: 2 142 | maximumLODLevel: 0 143 | streamingMipmapsActive: 0 144 | streamingMipmapsAddAllCameras: 1 145 | streamingMipmapsMemoryBudget: 512 146 | streamingMipmapsRenderersPerFrame: 512 147 | streamingMipmapsMaxLevelReduction: 2 148 | streamingMipmapsMaxFileIORequests: 1024 149 | particleRaycastBudget: 4096 150 | asyncUploadTimeSlice: 2 151 | asyncUploadBufferSize: 128 152 | asyncUploadPersistentBuffer: 1 153 | resolutionScalingFixedDPIFactor: 1 154 | customRenderPipeline: {fileID: 0} 155 | excludedTargetPlatforms: 156 | - Android 157 | - serializedVersion: 2 158 | name: VRC Mobile 159 | pixelLightCount: 4 160 | shadows: 0 161 | shadowResolution: 1 162 | shadowProjection: 1 163 | shadowCascades: 1 164 | shadowDistance: 50 165 | shadowNearPlaneOffset: 2 166 | shadowCascade2Split: 0.33333334 167 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 168 | shadowmaskMode: 0 169 | skinWeights: 4 170 | textureQuality: 0 171 | anisotropicTextures: 2 172 | antiAliasing: 2 173 | softParticles: 0 174 | softVegetation: 0 175 | realtimeReflectionProbes: 0 176 | billboardsFaceCameraPosition: 1 177 | vSyncCount: 0 178 | lodBias: 2 179 | maximumLODLevel: 0 180 | streamingMipmapsActive: 0 181 | streamingMipmapsAddAllCameras: 1 182 | streamingMipmapsMemoryBudget: 512 183 | streamingMipmapsRenderersPerFrame: 512 184 | streamingMipmapsMaxLevelReduction: 2 185 | streamingMipmapsMaxFileIORequests: 1024 186 | particleRaycastBudget: 1024 187 | asyncUploadTimeSlice: 1 188 | asyncUploadBufferSize: 32 189 | asyncUploadPersistentBuffer: 1 190 | resolutionScalingFixedDPIFactor: 1 191 | customRenderPipeline: {fileID: 0} 192 | excludedTargetPlatforms: 193 | - Standalone 194 | m_PerPlatformDefaultQuality: {} 195 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Interactive 17 | - Player 18 | - PlayerLocal 19 | - Environment 20 | - UiMenu 21 | - Pickup 22 | - PickupNoEnvironment 23 | - StereoLeft 24 | - StereoRight 25 | - Walkthrough 26 | - MirrorReflection 27 | - reserved2 28 | - reserved3 29 | - reserved4 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GenericDataContainer 2 | 3 | A generic and type-safe wrapper for DataContainer. 4 | 5 | ## Installation 6 | 7 | To use this package, you need to add [my package repository](https://github.com/koyashiro/vpm-repos). 8 | Please read more details [here](https://github.com/koyashiro/vpm-repos#installation). 9 | 10 | Please install this package with [Creator Companion](https://vcc.docs.vrchat.com/) or [VPM CLI](https://vcc.docs.vrchat.com/vpm/cli/). 11 | 12 | ### Creator Companion 13 | 14 | 1. Enable the `koyashiro` package repository. 15 | 16 | ![image](https://user-images.githubusercontent.com/6698252/230629434-048cde39-a0ec-4c53-bfe2-46bde2e6a57a.png) 17 | 18 | 2. Find `GenericDataContainer` from the list of packages and install any version you want. 19 | 20 | ### VPM CLI 21 | 22 | 1. Execute the following command to install the package. 23 | 24 | ```sh 25 | vpm add package net.koyashiro.genericdatacontainer 26 | ``` 27 | 28 | ## `DataList` 29 | 30 | ### Example 31 | 32 | ```cs 33 | using UnityEngine; 34 | using UdonSharp; 35 | using Koyashiro.GenericDataContainer; 36 | 37 | public class DataListExample : UdonSharpBehaviour 38 | { 39 | public void Start() 40 | { 41 | DataList list = DataList.New(); 42 | 43 | list.Add(100); 44 | list.Add(200); 45 | list.Add(300); 46 | 47 | Debug.Log(list.GetValue(0)); // 100 48 | Debug.Log(list.GetValue(1)); // 200 49 | Debug.Log(list.GetValue(2)); // 300 50 | 51 | int[] array = list.ToArray(); 52 | } 53 | } 54 | ``` 55 | 56 | ## `DataDictionary` 57 | 58 | ### Example 59 | 60 | ```cs 61 | using UnityEngine; 62 | using UdonSharp; 63 | using Koyashiro.GenericDataContainer; 64 | 65 | public class DataDictionaryExample : UdonSharpBehaviour 66 | { 67 | public void Start() 68 | { 69 | DataDictionary dic = DataDictionary.New(); 70 | 71 | dic.SetValue("first", 100); 72 | dic.SetValue("second", 200); 73 | dic.SetValue("third", 300); 74 | 75 | Debug.Log(dic.GetValue("first")); // 100 76 | Debug.Log(dic.GetValue("second")); // 200 77 | Debug.Log(dic.GetValue("third")); // 300 78 | } 79 | } 80 | ``` 81 | --------------------------------------------------------------------------------