\d+))?" +
65 | @"(\-(?[0-9A-Za-z\-\.]+))?" +
66 | @"(\+(?[0-9A-Za-z\-\.]+))?$";
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/SemVer/Scripts/Editor/Drawer/SemVersionDrawer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System.Text.RegularExpressions;
25 | using UnityEngine;
26 | using UnityEditor;
27 |
28 | namespace JCMG.SemVer.Editor
29 | {
30 | [CustomPropertyDrawer(typeof(SemVersion))]
31 | public sealed class SemVersionDrawer : PropertyDrawer
32 | {
33 | private const string MajorPropertyName = "_major";
34 | private const string MinorPropertyName = "_minor";
35 | private const string PatchPropertyName = "_patch";
36 | private const string PrereleasePropertyName = "_prerelease";
37 | private const string BuildPropertyName = "_build";
38 |
39 | private const string ReplacementRegex = "[^A-Za-z0-9]+";
40 |
41 | private const string ValidCharactersMessage =
42 | "The Prerelease and Build fields can only consist of alphanumeric characters (no special " +
43 | "characters). Any invalid characters will be removed.";
44 |
45 | private const string LayoutGroupStyleName = "box";
46 | private const string PreviewLabel = "Preview";
47 | private const string AddLabel = "+";
48 | private const string SubtractLabel = "-";
49 |
50 | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
51 | {
52 | EditorGUI.BeginProperty(position, label, property);
53 | EditorGUILayout.BeginVertical(LayoutGroupStyleName);
54 | GUILayout.Label(label, EditorStyles.boldLabel);
55 |
56 | EditorGUILayout.BeginHorizontal();
57 | EditorGUILayout.PrefixLabel(PreviewLabel);
58 | GUILayout.Label(fieldInfo.GetValue(property.serializedObject.targetObject).ToString());
59 | EditorGUILayout.EndHorizontal();
60 |
61 | DrawVersionNumber(property.FindPropertyRelative(MajorPropertyName));
62 | DrawVersionNumber(property.FindPropertyRelative(MinorPropertyName));
63 | DrawVersionNumber(property.FindPropertyRelative(PatchPropertyName));
64 |
65 | EditorGUILayout.HelpBox(ValidCharactersMessage, MessageType.Info);
66 |
67 | var preReleaseProp = property.FindPropertyRelative(PrereleasePropertyName);
68 | preReleaseProp.stringValue = Regex.Replace(
69 | EditorGUILayout.TextField(preReleaseProp.displayName, preReleaseProp.stringValue),
70 | ReplacementRegex,
71 | string.Empty);
72 |
73 | var buildProp = property.FindPropertyRelative(BuildPropertyName);
74 | buildProp.stringValue = Regex.Replace(
75 | EditorGUILayout.TextField(buildProp.displayName, buildProp.stringValue),
76 | ReplacementRegex,
77 | string.Empty);
78 |
79 | EditorGUILayout.EndVertical();
80 | EditorGUI.EndProperty();
81 | }
82 |
83 | private void DrawVersionNumber(SerializedProperty property)
84 | {
85 | EditorGUILayout.BeginHorizontal();
86 | property.intValue = Mathf.Max(EditorGUILayout.IntField(
87 | property.displayName,
88 | property.intValue), 0);
89 | if (GUILayout.Button(SubtractLabel, GUILayout.Width(50f)))
90 | {
91 | property.intValue = Mathf.Max(property.intValue - 1, 0);
92 | }
93 | if (GUILayout.Button(AddLabel, GUILayout.Width(50f)))
94 | {
95 | property.intValue = property.intValue + 1;
96 | }
97 | EditorGUILayout.EndHorizontal();
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/contributors.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 | Thanks for considering contributing to JCMG SemVer! Read the guidelines below before you submit an issue or create a PR.
3 |
4 | ## Project structure
5 | The project structure is split between several branches
6 | * **master:** This is the stable branch and all releases/packages are generated from this.
7 | * **develop:** This is the primary development branch which all PRs should be made to and is generally considered less-stable. This is occasionally merged into **master** and a new release tag/package is generated from this.
8 | * **releases/stable:** This branch is orphaned and contains only the package contents for JCMG.SemVer. This is updated in sync with tagged releases on **master** and each commit that changes these contents should result in the version in **package.json** being changed.
9 |
10 | This structure allows for ease of development and quick testing via **master** or **develop**, but clear isolation and separation between the package distribution via **releases/stable**.
11 |
12 | ## Style Guide
13 |
14 | ### Language Usage
15 | * Mark closed types as sealed to enable proper devirtualization (see [here](https://blogs.unity3d.com/2016/07/26/il2cpp-optimizations-devirtualization/) for more info).
16 | * Avoid LINQ usage for runtime usage except where absolutely possible (`ToList` or `ToArray` for example) and avoid using `ForEach`. Using these methods creates easily avoidable garbage (in newer versions of Unity >= 5.6 this is situational to the Collection or if its being used via an interface, but easy to avoid by default avoidance). Editor usage is another story as performance is not as generally important.
17 |
18 | ### Layout
19 | There is an `.editorconfig` at the root of the repository located [here](/.editorconfig) that can be used by most IDEs to help ensure these settings are automatically applied.
20 | * **Indentation:** 1 tab = 4 spaces (tab character)
21 | * **Desired width:** 120-130 characters max per line
22 | * **Line Endings:** Unix (LF), with a new-line at the end of each file.
23 | * **White Space:** Trim empty whitespace from the ends of lines.
24 |
25 | ### Naming and Formatting
26 | | Object Name | Notation | Example |
27 | | ----------- | -------- | ------- |
28 | | Namespaces | PascalCase | `JCMG.SemVer.Editor` |
29 | | Classes | PascalCase | `SemVersion` |
30 | | Methods | PascalCase | `ParseVersion` |
31 | | Method arguments | camelCase | `oldValue` |
32 | | Properties | PascalCase | `Value` |
33 | | Public fields | camelCase | `value` |
34 | | Private fields | _camelCase | `_value` |
35 | | Constants | PascalCase | `DefaultVersion` |
36 | | Inline variables | camelCase | `value` |
37 |
38 | ### Structure
39 | * Follow good encapsulation principles and try to limit exposing fields directly as public; unless necessary everything should be marked as private/protected unless necessary. Where public access to a field is needed, use a public property instead.
40 | * Always order access from most-accessible to least (i.e, `public` to `private`).
41 | * Where classes or methods are not intended for use by a user, mark these as `internal`.
42 | * Order class structure like so:
43 | * Namespace
44 | * Internal classes
45 | * Properties
46 | * Fields
47 | * Events
48 | * Unity Methods
49 | * Primary Methods
50 | * Helper Methods
51 | * Lines of code that are generally longer than 120-130 characters should generally be broken out into multiple lines. For example, instead of:
52 |
53 | `public bool SomeMethodWithManyParams(int param1, float param2, List param3, out int param4, out int param5)...`
54 |
55 | do
56 |
57 | ```
58 | public bool SomeMethodWithManyParams(
59 | int param1,
60 | float param2,
61 | List param3,
62 | out int param4,
63 | out int param5)...
64 | ```
65 |
66 | ### Example Formatting
67 | ```
68 | using System;
69 | using UnityEngine;
70 |
71 | namespace Example
72 | {
73 | public class Foo : MonoBehavior
74 | {
75 | public int SomeValue { get { return _someValue; } }
76 |
77 | [SerializeField]
78 | private int _someValue;
79 |
80 | private const string Warning = "Somethings wrong!";
81 |
82 | private void Update()
83 | {
84 | // Do work
85 | Debug.Log(Warning);
86 | }
87 | }
88 | }
89 | ```
90 |
91 | ## Pull requests
92 | Pull requests should be made to the [develop branch](https://github.com/jeffcampbellmakesgames/unity-semver/tree/develop).
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Rules in this file were initially inferred by Visual Studio IntelliCode codebase based on best match to current usage at 4/8/2019
2 | # You can modify the rules from these initially generated values to suit your own policies
3 | # You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
4 | [*.cs]
5 |
6 | #Core editorconfig formatting - indentation
7 |
8 | #use hard tabs for indentation
9 | indent_style = tab
10 | indent_size = 4
11 | end_of_line = lf
12 | trim_trailing_whitespace = true
13 | insert_final_newline = true
14 |
15 | #Formatting - indentation options
16 |
17 | #indent switch case contents.
18 | csharp_indent_case_contents = true
19 | #indent switch labels
20 | csharp_indent_switch_labels = true
21 |
22 | #Formatting - new line options
23 |
24 | #require braces to be on a new line for types, lambdas, methods, control_blocks, and object_collection (also known as "Allman" style)
25 | csharp_new_line_before_open_brace = types, lambdas, methods, control_blocks, object_collection
26 |
27 | #Formatting - organize using options
28 |
29 | #do not place System.* using directives before other using directives
30 | dotnet_sort_system_directives_first = false
31 |
32 | #Formatting - spacing options
33 |
34 | #require NO space between a cast and the value
35 | csharp_space_after_cast = false
36 | #require a space before the colon for bases or interfaces in a type declaration
37 | csharp_space_after_colon_in_inheritance_clause = true
38 | #require a space before the colon for bases or interfaces in a type declaration
39 | csharp_space_before_colon_in_inheritance_clause = true
40 | #remove space within empty argument list parentheses
41 | csharp_space_between_method_call_empty_parameter_list_parentheses = false
42 | #remove space between method call name and opening parenthesis
43 | csharp_space_between_method_call_name_and_opening_parenthesis = false
44 | #remove space within empty parameter list parentheses for a method declaration
45 | csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
46 | #place space between parentheses of expressions
47 | csharp_space_between_parentheses = expressions
48 |
49 | #Formatting - wrapping options
50 |
51 | #leave code block on single line
52 | csharp_preserve_single_line_blocks = true
53 | #leave statements and member declarations on the same line
54 | csharp_preserve_single_line_statements = true
55 |
56 | #Style - expression bodied member options
57 |
58 | #prefer block bodies for accessors
59 | csharp_style_expression_bodied_accessors = false:suggestion
60 | #prefer block bodies for constructors
61 | csharp_style_expression_bodied_constructors = false:suggestion
62 | #prefer block bodies for methods
63 | csharp_style_expression_bodied_methods = false:suggestion
64 | #prefer block bodies for operators
65 | csharp_style_expression_bodied_operators = false:suggestion
66 | #prefer block bodies for properties
67 | csharp_style_expression_bodied_properties = false:suggestion
68 |
69 | #Style - expression level options
70 |
71 | #prefer out variables to be declared before the method call
72 | csharp_style_inlined_variable_declaration = false:suggestion
73 | #prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
74 | dotnet_style_predefined_type_for_member_access = true:suggestion
75 |
76 | #Style - implicit and explicit types
77 |
78 | #prefer explicit type over var to declare variables with built-in system types such as int
79 | csharp_style_var_for_built_in_types = false:suggestion
80 | #prefer var when the type is already mentioned on the right-hand side of a declaration expression
81 | csharp_style_var_when_type_is_apparent = true:suggestion
82 |
83 | #Style - language keyword and framework type options
84 |
85 | #prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
86 | dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
87 |
88 | #Style - qualification options
89 |
90 | #prefer fields not to be prefaced with this. or Me. in Visual Basic
91 | dotnet_style_qualification_for_field = false:suggestion
92 | #prefer methods not to be prefaced with this. or Me. in Visual Basic
93 | dotnet_style_qualification_for_method = false:suggestion
94 | #prefer properties not to be prefaced with this. or Me. in Visual Basic
95 | dotnet_style_qualification_for_property = false:suggestion
96 |
--------------------------------------------------------------------------------
/Unity/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: 4
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | particleRaycastBudget: 4
33 | asyncUploadTimeSlice: 2
34 | asyncUploadBufferSize: 16
35 | resolutionScalingFixedDPIFactor: 1
36 | excludedTargetPlatforms: []
37 | - serializedVersion: 2
38 | name: Low
39 | pixelLightCount: 0
40 | shadows: 0
41 | shadowResolution: 0
42 | shadowProjection: 1
43 | shadowCascades: 1
44 | shadowDistance: 20
45 | shadowNearPlaneOffset: 3
46 | shadowCascade2Split: 0.33333334
47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
48 | shadowmaskMode: 0
49 | blendWeights: 2
50 | textureQuality: 0
51 | anisotropicTextures: 0
52 | antiAliasing: 0
53 | softParticles: 0
54 | softVegetation: 0
55 | realtimeReflectionProbes: 0
56 | billboardsFaceCameraPosition: 0
57 | vSyncCount: 0
58 | lodBias: 0.4
59 | maximumLODLevel: 0
60 | particleRaycastBudget: 16
61 | asyncUploadTimeSlice: 2
62 | asyncUploadBufferSize: 16
63 | resolutionScalingFixedDPIFactor: 1
64 | excludedTargetPlatforms: []
65 | - serializedVersion: 2
66 | name: Medium
67 | pixelLightCount: 1
68 | shadows: 1
69 | shadowResolution: 0
70 | shadowProjection: 1
71 | shadowCascades: 1
72 | shadowDistance: 20
73 | shadowNearPlaneOffset: 3
74 | shadowCascade2Split: 0.33333334
75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
76 | shadowmaskMode: 0
77 | blendWeights: 2
78 | textureQuality: 0
79 | anisotropicTextures: 1
80 | antiAliasing: 0
81 | softParticles: 0
82 | softVegetation: 0
83 | realtimeReflectionProbes: 0
84 | billboardsFaceCameraPosition: 0
85 | vSyncCount: 1
86 | lodBias: 0.7
87 | maximumLODLevel: 0
88 | particleRaycastBudget: 64
89 | asyncUploadTimeSlice: 2
90 | asyncUploadBufferSize: 16
91 | resolutionScalingFixedDPIFactor: 1
92 | excludedTargetPlatforms: []
93 | - serializedVersion: 2
94 | name: High
95 | pixelLightCount: 2
96 | shadows: 2
97 | shadowResolution: 1
98 | shadowProjection: 1
99 | shadowCascades: 2
100 | shadowDistance: 40
101 | shadowNearPlaneOffset: 3
102 | shadowCascade2Split: 0.33333334
103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
104 | shadowmaskMode: 1
105 | blendWeights: 2
106 | textureQuality: 0
107 | anisotropicTextures: 1
108 | antiAliasing: 2
109 | softParticles: 0
110 | softVegetation: 1
111 | realtimeReflectionProbes: 1
112 | billboardsFaceCameraPosition: 1
113 | vSyncCount: 1
114 | lodBias: 1
115 | maximumLODLevel: 0
116 | particleRaycastBudget: 256
117 | asyncUploadTimeSlice: 2
118 | asyncUploadBufferSize: 16
119 | resolutionScalingFixedDPIFactor: 1
120 | excludedTargetPlatforms: []
121 | - serializedVersion: 2
122 | name: Very High
123 | pixelLightCount: 3
124 | shadows: 2
125 | shadowResolution: 2
126 | shadowProjection: 1
127 | shadowCascades: 2
128 | shadowDistance: 40
129 | shadowNearPlaneOffset: 3
130 | shadowCascade2Split: 0.33333334
131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
132 | shadowmaskMode: 1
133 | blendWeights: 4
134 | textureQuality: 0
135 | anisotropicTextures: 1
136 | antiAliasing: 4
137 | softParticles: 1
138 | softVegetation: 1
139 | realtimeReflectionProbes: 1
140 | billboardsFaceCameraPosition: 1
141 | vSyncCount: 1
142 | lodBias: 1.5
143 | maximumLODLevel: 0
144 | particleRaycastBudget: 1024
145 | asyncUploadTimeSlice: 2
146 | asyncUploadBufferSize: 16
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Ultra
151 | pixelLightCount: 4
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 4
156 | shadowDistance: 150
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 1
164 | antiAliasing: 4
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 2
171 | maximumLODLevel: 0
172 | particleRaycastBudget: 4096
173 | asyncUploadTimeSlice: 2
174 | asyncUploadBufferSize: 16
175 | resolutionScalingFixedDPIFactor: 1
176 | excludedTargetPlatforms: []
177 | m_PerPlatformDefaultQuality:
178 | Android: 2
179 | Nintendo 3DS: 5
180 | Nintendo Switch: 5
181 | PS4: 5
182 | PSP2: 2
183 | Standalone: 5
184 | Tizen: 2
185 | WebGL: 3
186 | WiiU: 5
187 | Windows Store Apps: 5
188 | XboxOne: 5
189 | iPhone: 2
190 | tvOS: 2
191 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/Unity/Packages/packages-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.jeffcampbellmakesgames.packagetools": {
4 | "version": "1.6.1",
5 | "depth": 0,
6 | "source": "registry",
7 | "dependencies": {},
8 | "url": "https://package.openupm.com"
9 | },
10 | "com.unity.ext.nunit": {
11 | "version": "2.0.5",
12 | "depth": 1,
13 | "source": "registry",
14 | "dependencies": {},
15 | "url": "https://packages.unity.com"
16 | },
17 | "com.unity.ide.rider": {
18 | "version": "3.0.34",
19 | "depth": 0,
20 | "source": "registry",
21 | "dependencies": {
22 | "com.unity.ext.nunit": "1.0.6"
23 | },
24 | "url": "https://packages.unity.com"
25 | },
26 | "com.unity.ide.visualstudio": {
27 | "version": "2.0.22",
28 | "depth": 0,
29 | "source": "registry",
30 | "dependencies": {
31 | "com.unity.test-framework": "1.1.9"
32 | },
33 | "url": "https://packages.unity.com"
34 | },
35 | "com.unity.test-framework": {
36 | "version": "1.4.6",
37 | "depth": 0,
38 | "source": "registry",
39 | "dependencies": {
40 | "com.unity.ext.nunit": "2.0.3",
41 | "com.unity.modules.imgui": "1.0.0",
42 | "com.unity.modules.jsonserialize": "1.0.0"
43 | },
44 | "url": "https://packages.unity.com"
45 | },
46 | "com.unity.ugui": {
47 | "version": "2.0.0",
48 | "depth": 0,
49 | "source": "builtin",
50 | "dependencies": {
51 | "com.unity.modules.ui": "1.0.0",
52 | "com.unity.modules.imgui": "1.0.0"
53 | }
54 | },
55 | "com.unity.modules.accessibility": {
56 | "version": "1.0.0",
57 | "depth": 0,
58 | "source": "builtin",
59 | "dependencies": {}
60 | },
61 | "com.unity.modules.ai": {
62 | "version": "1.0.0",
63 | "depth": 0,
64 | "source": "builtin",
65 | "dependencies": {}
66 | },
67 | "com.unity.modules.androidjni": {
68 | "version": "1.0.0",
69 | "depth": 0,
70 | "source": "builtin",
71 | "dependencies": {}
72 | },
73 | "com.unity.modules.animation": {
74 | "version": "1.0.0",
75 | "depth": 0,
76 | "source": "builtin",
77 | "dependencies": {}
78 | },
79 | "com.unity.modules.assetbundle": {
80 | "version": "1.0.0",
81 | "depth": 0,
82 | "source": "builtin",
83 | "dependencies": {}
84 | },
85 | "com.unity.modules.audio": {
86 | "version": "1.0.0",
87 | "depth": 0,
88 | "source": "builtin",
89 | "dependencies": {}
90 | },
91 | "com.unity.modules.cloth": {
92 | "version": "1.0.0",
93 | "depth": 0,
94 | "source": "builtin",
95 | "dependencies": {
96 | "com.unity.modules.physics": "1.0.0"
97 | }
98 | },
99 | "com.unity.modules.director": {
100 | "version": "1.0.0",
101 | "depth": 0,
102 | "source": "builtin",
103 | "dependencies": {
104 | "com.unity.modules.audio": "1.0.0",
105 | "com.unity.modules.animation": "1.0.0"
106 | }
107 | },
108 | "com.unity.modules.hierarchycore": {
109 | "version": "1.0.0",
110 | "depth": 1,
111 | "source": "builtin",
112 | "dependencies": {}
113 | },
114 | "com.unity.modules.imageconversion": {
115 | "version": "1.0.0",
116 | "depth": 0,
117 | "source": "builtin",
118 | "dependencies": {}
119 | },
120 | "com.unity.modules.imgui": {
121 | "version": "1.0.0",
122 | "depth": 0,
123 | "source": "builtin",
124 | "dependencies": {}
125 | },
126 | "com.unity.modules.jsonserialize": {
127 | "version": "1.0.0",
128 | "depth": 0,
129 | "source": "builtin",
130 | "dependencies": {}
131 | },
132 | "com.unity.modules.particlesystem": {
133 | "version": "1.0.0",
134 | "depth": 0,
135 | "source": "builtin",
136 | "dependencies": {}
137 | },
138 | "com.unity.modules.physics": {
139 | "version": "1.0.0",
140 | "depth": 0,
141 | "source": "builtin",
142 | "dependencies": {}
143 | },
144 | "com.unity.modules.physics2d": {
145 | "version": "1.0.0",
146 | "depth": 0,
147 | "source": "builtin",
148 | "dependencies": {}
149 | },
150 | "com.unity.modules.screencapture": {
151 | "version": "1.0.0",
152 | "depth": 0,
153 | "source": "builtin",
154 | "dependencies": {
155 | "com.unity.modules.imageconversion": "1.0.0"
156 | }
157 | },
158 | "com.unity.modules.subsystems": {
159 | "version": "1.0.0",
160 | "depth": 1,
161 | "source": "builtin",
162 | "dependencies": {
163 | "com.unity.modules.jsonserialize": "1.0.0"
164 | }
165 | },
166 | "com.unity.modules.terrain": {
167 | "version": "1.0.0",
168 | "depth": 0,
169 | "source": "builtin",
170 | "dependencies": {}
171 | },
172 | "com.unity.modules.terrainphysics": {
173 | "version": "1.0.0",
174 | "depth": 0,
175 | "source": "builtin",
176 | "dependencies": {
177 | "com.unity.modules.physics": "1.0.0",
178 | "com.unity.modules.terrain": "1.0.0"
179 | }
180 | },
181 | "com.unity.modules.tilemap": {
182 | "version": "1.0.0",
183 | "depth": 0,
184 | "source": "builtin",
185 | "dependencies": {
186 | "com.unity.modules.physics2d": "1.0.0"
187 | }
188 | },
189 | "com.unity.modules.ui": {
190 | "version": "1.0.0",
191 | "depth": 0,
192 | "source": "builtin",
193 | "dependencies": {}
194 | },
195 | "com.unity.modules.uielements": {
196 | "version": "1.0.0",
197 | "depth": 0,
198 | "source": "builtin",
199 | "dependencies": {
200 | "com.unity.modules.ui": "1.0.0",
201 | "com.unity.modules.imgui": "1.0.0",
202 | "com.unity.modules.jsonserialize": "1.0.0",
203 | "com.unity.modules.hierarchycore": "1.0.0"
204 | }
205 | },
206 | "com.unity.modules.umbra": {
207 | "version": "1.0.0",
208 | "depth": 0,
209 | "source": "builtin",
210 | "dependencies": {}
211 | },
212 | "com.unity.modules.unityanalytics": {
213 | "version": "1.0.0",
214 | "depth": 0,
215 | "source": "builtin",
216 | "dependencies": {
217 | "com.unity.modules.unitywebrequest": "1.0.0",
218 | "com.unity.modules.jsonserialize": "1.0.0"
219 | }
220 | },
221 | "com.unity.modules.unitywebrequest": {
222 | "version": "1.0.0",
223 | "depth": 0,
224 | "source": "builtin",
225 | "dependencies": {}
226 | },
227 | "com.unity.modules.unitywebrequestassetbundle": {
228 | "version": "1.0.0",
229 | "depth": 0,
230 | "source": "builtin",
231 | "dependencies": {
232 | "com.unity.modules.assetbundle": "1.0.0",
233 | "com.unity.modules.unitywebrequest": "1.0.0"
234 | }
235 | },
236 | "com.unity.modules.unitywebrequestaudio": {
237 | "version": "1.0.0",
238 | "depth": 0,
239 | "source": "builtin",
240 | "dependencies": {
241 | "com.unity.modules.unitywebrequest": "1.0.0",
242 | "com.unity.modules.audio": "1.0.0"
243 | }
244 | },
245 | "com.unity.modules.unitywebrequesttexture": {
246 | "version": "1.0.0",
247 | "depth": 0,
248 | "source": "builtin",
249 | "dependencies": {
250 | "com.unity.modules.unitywebrequest": "1.0.0",
251 | "com.unity.modules.imageconversion": "1.0.0"
252 | }
253 | },
254 | "com.unity.modules.unitywebrequestwww": {
255 | "version": "1.0.0",
256 | "depth": 0,
257 | "source": "builtin",
258 | "dependencies": {
259 | "com.unity.modules.unitywebrequest": "1.0.0",
260 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
261 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
262 | "com.unity.modules.audio": "1.0.0",
263 | "com.unity.modules.assetbundle": "1.0.0",
264 | "com.unity.modules.imageconversion": "1.0.0"
265 | }
266 | },
267 | "com.unity.modules.vehicles": {
268 | "version": "1.0.0",
269 | "depth": 0,
270 | "source": "builtin",
271 | "dependencies": {
272 | "com.unity.modules.physics": "1.0.0"
273 | }
274 | },
275 | "com.unity.modules.video": {
276 | "version": "1.0.0",
277 | "depth": 0,
278 | "source": "builtin",
279 | "dependencies": {
280 | "com.unity.modules.audio": "1.0.0",
281 | "com.unity.modules.ui": "1.0.0",
282 | "com.unity.modules.unitywebrequest": "1.0.0"
283 | }
284 | },
285 | "com.unity.modules.vr": {
286 | "version": "1.0.0",
287 | "depth": 0,
288 | "source": "builtin",
289 | "dependencies": {
290 | "com.unity.modules.jsonserialize": "1.0.0",
291 | "com.unity.modules.physics": "1.0.0",
292 | "com.unity.modules.xr": "1.0.0"
293 | }
294 | },
295 | "com.unity.modules.wind": {
296 | "version": "1.0.0",
297 | "depth": 0,
298 | "source": "builtin",
299 | "dependencies": {}
300 | },
301 | "com.unity.modules.xr": {
302 | "version": "1.0.0",
303 | "depth": 0,
304 | "source": "builtin",
305 | "dependencies": {
306 | "com.unity.modules.physics": "1.0.0",
307 | "com.unity.modules.jsonserialize": "1.0.0",
308 | "com.unity.modules.subsystems": "1.0.0"
309 | }
310 | }
311 | }
312 | }
313 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/SemVer/Scripts/Editor/Tests/SemVersionTests.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.IO;
26 | using System.Runtime.Serialization.Formatters.Binary;
27 | using NUnit.Framework;
28 | using UnityEngine.TestTools;
29 |
30 | namespace JCMG.SemVer.Editor.Tests
31 | {
32 | [TestFixture]
33 | internal class SemVersionTests
34 | {
35 | [SetUp]
36 | public void Setup()
37 | {
38 | LogAssert.ignoreFailingMessages = false;
39 | }
40 |
41 | [Test]
42 | public void CompareTestWithStrings1()
43 | {
44 | Assert.True(SemVersion.Equals("1.0.0", "1"));
45 | }
46 |
47 | [Test]
48 | public void CompareTestWithStrings2()
49 | {
50 | var v = new SemVersion(1, 0, 0);
51 | Assert.True(v < "1.1");
52 | }
53 |
54 | [Test]
55 | public void CompareTestWithStrings3()
56 | {
57 | var v = new SemVersion(1, 2);
58 | Assert.True(v > "1.0.0");
59 | }
60 |
61 | [Test]
62 | public void CreateVersionTest()
63 | {
64 | var v = new SemVersion(1, 2, 3, "a", "b");
65 |
66 | Assert.AreEqual(1, v.Major);
67 | Assert.AreEqual(2, v.Minor);
68 | Assert.AreEqual(3, v.Patch);
69 | Assert.AreEqual("a", v.Prerelease);
70 | Assert.AreEqual("b", v.Build);
71 | }
72 |
73 | [Test]
74 | public void CreateVersionTestWithNulls()
75 | {
76 | var v = new SemVersion(1, 2, 3, null, null);
77 |
78 | Assert.AreEqual(1, v.Major);
79 | Assert.AreEqual(2, v.Minor);
80 | Assert.AreEqual(3, v.Patch);
81 | Assert.AreEqual("", v.Prerelease);
82 | Assert.AreEqual("", v.Build);
83 | }
84 |
85 | [Test]
86 | public void CreateVersionTestWithSystemVersion1()
87 | {
88 | var nonSemanticVersion = new Version(0, 0);
89 | var v = new SemVersion(nonSemanticVersion);
90 |
91 | Assert.AreEqual(0, v.Major);
92 | Assert.AreEqual(0, v.Minor);
93 | Assert.AreEqual(0, v.Patch);
94 | Assert.AreEqual("", v.Build);
95 | Assert.AreEqual("", v.Prerelease);
96 | }
97 |
98 | [Test]
99 | public void CreateVersionTestWithSystemVersion3()
100 | {
101 | var nonSemanticVersion = new Version(1, 2, 0, 3);
102 | var v = new SemVersion(nonSemanticVersion);
103 |
104 | Assert.AreEqual(1, v.Major);
105 | Assert.AreEqual(2, v.Minor);
106 | Assert.AreEqual(3, v.Patch);
107 | Assert.AreEqual("", v.Build);
108 | Assert.AreEqual("", v.Prerelease);
109 | }
110 |
111 | [Test]
112 | public void CreateVersionTestWithSystemVersion4()
113 | {
114 | var nonSemanticVersion = new Version(1, 2, 4, 3);
115 | var v = new SemVersion(nonSemanticVersion);
116 |
117 | Assert.AreEqual(1, v.Major);
118 | Assert.AreEqual(2, v.Minor);
119 | Assert.AreEqual(3, v.Patch);
120 | Assert.AreEqual("4", v.Build);
121 | Assert.AreEqual("", v.Prerelease);
122 | }
123 |
124 | [Test]
125 | public void ParseTest1()
126 | {
127 | var version = SemVersion.Parse("1.2.45-alpha+nightly.23");
128 |
129 | Assert.AreEqual(1, version.Major);
130 | Assert.AreEqual(2, version.Minor);
131 | Assert.AreEqual(45, version.Patch);
132 | Assert.AreEqual("alpha", version.Prerelease);
133 | Assert.AreEqual("nightly.23", version.Build);
134 | }
135 |
136 | [Test]
137 | public void ParseTest2()
138 | {
139 | var version = SemVersion.Parse("1");
140 |
141 | Assert.AreEqual(1, version.Major);
142 | Assert.AreEqual(0, version.Minor);
143 | Assert.AreEqual(0, version.Patch);
144 | Assert.AreEqual("", version.Prerelease);
145 | Assert.AreEqual("", version.Build);
146 | }
147 |
148 | [Test]
149 | public void ParseTest3()
150 | {
151 | var version = SemVersion.Parse("1.2.45-alpha-beta+nightly.23.43-bla");
152 |
153 | Assert.AreEqual(1, version.Major);
154 | Assert.AreEqual(2, version.Minor);
155 | Assert.AreEqual(45, version.Patch);
156 | Assert.AreEqual("alpha-beta", version.Prerelease);
157 | Assert.AreEqual("nightly.23.43-bla", version.Build);
158 | }
159 |
160 | [Test]
161 | public void ParseTest4()
162 | {
163 | var version = SemVersion.Parse("2.0.0+nightly.23.43-bla");
164 |
165 | Assert.AreEqual(2, version.Major);
166 | Assert.AreEqual(0, version.Minor);
167 | Assert.AreEqual(0, version.Patch);
168 | Assert.AreEqual("", version.Prerelease);
169 | Assert.AreEqual("nightly.23.43-bla", version.Build);
170 | }
171 |
172 | [Test]
173 | public void ParseTest5()
174 | {
175 | var version = SemVersion.Parse("2.0+nightly.23.43-bla");
176 |
177 | Assert.AreEqual(2, version.Major);
178 | Assert.AreEqual(0, version.Minor);
179 | Assert.AreEqual(0, version.Patch);
180 | Assert.AreEqual("", version.Prerelease);
181 | Assert.AreEqual("nightly.23.43-bla", version.Build);
182 | }
183 |
184 | [Test]
185 | public void ParseTest6()
186 | {
187 | var version = SemVersion.Parse("2.1-alpha");
188 |
189 | Assert.AreEqual(2, version.Major);
190 | Assert.AreEqual(1, version.Minor);
191 | Assert.AreEqual(0, version.Patch);
192 | Assert.AreEqual("alpha", version.Prerelease);
193 | Assert.AreEqual("", version.Build);
194 | }
195 |
196 | [Test]
197 | public void ParseTest7()
198 | {
199 | Assert.Throws(() => SemVersion.Parse("ui-2.1-alpha"));
200 | }
201 |
202 | [Test]
203 | public void ParseTestStrict1()
204 | {
205 | var version = SemVersion.Parse("1.3.4", true);
206 |
207 | Assert.AreEqual(1, version.Major);
208 | Assert.AreEqual(3, version.Minor);
209 | Assert.AreEqual(4, version.Patch);
210 | Assert.AreEqual("", version.Prerelease);
211 | Assert.AreEqual("", version.Build);
212 | }
213 |
214 | [Test]
215 | public void ParseTestStrict2()
216 | {
217 | Assert.Throws(() => SemVersion.Parse("1", true));
218 | }
219 |
220 | [Test]
221 | public void ParseTestStrict3()
222 | {
223 | Assert.Throws(() => SemVersion.Parse("1.3", true));
224 | }
225 |
226 | [Test]
227 | public void ParseTestStrict4()
228 | {
229 | Assert.Throws(() => SemVersion.Parse("1.3-alpha", true));
230 | }
231 |
232 | [Test]
233 | public void TryParseTest1()
234 | {
235 | SemVersion v;
236 | Assert.True(SemVersion.TryParse("1.2.45-alpha-beta+nightly.23.43-bla", out v));
237 | }
238 |
239 | [Test]
240 | public void TryParseTest2()
241 | {
242 | LogAssert.ignoreFailingMessages = true;
243 |
244 | SemVersion v;
245 | Assert.False(SemVersion.TryParse("ui-2.1-alpha", out v));
246 | }
247 |
248 | [Test]
249 | public void TryParseTest3()
250 | {
251 | LogAssert.ignoreFailingMessages = true;
252 |
253 | SemVersion v;
254 | Assert.False(SemVersion.TryParse("", out v));
255 | }
256 |
257 | [Test]
258 | public void TryParseTest4()
259 | {
260 | LogAssert.ignoreFailingMessages = true;
261 |
262 | SemVersion v;
263 | Assert.False(SemVersion.TryParse(null, out v));
264 | }
265 |
266 | [Test]
267 | public void TryParseTest5()
268 | {
269 | SemVersion v;
270 | Assert.True(SemVersion.TryParse("1.2", out v, false));
271 | }
272 |
273 | [Test]
274 | public void TryParseTest6()
275 | {
276 | LogAssert.ignoreFailingMessages = true;
277 |
278 | SemVersion v;
279 | Assert.False(SemVersion.TryParse("1.2", out v, true));
280 | }
281 |
282 | [Test]
283 | public void ToStringTest()
284 | {
285 | var version = new SemVersion(1, 2, 0, "beta", "dev-mha.120");
286 |
287 | Assert.AreEqual("1.2.0-beta+dev-mha.120", version.ToString());
288 | }
289 |
290 | [Test]
291 | public void AreEqualTest1()
292 | {
293 | var v1 = new SemVersion(1, 2, build: "nightly");
294 | var v2 = new SemVersion(1, 2, build: "nightly");
295 |
296 | var r = v1.Equals(v2);
297 | Assert.True(r);
298 | }
299 |
300 | [Test]
301 | public void EqualTest2()
302 | {
303 | var v1 = new SemVersion(1, 2, prerelease: "alpha", build: "dev");
304 | var v2 = new SemVersion(1, 2, prerelease: "alpha", build: "dev");
305 |
306 | var r = v1.Equals(v2);
307 | Assert.True(r);
308 | }
309 |
310 | [Test]
311 | public void EqualTest3()
312 | {
313 | var v1 = SemVersion.Parse("1.2-nightly+dev");
314 | var v2 = SemVersion.Parse("1.2.0-nightly");
315 |
316 | var r = v1.Equals(v2);
317 | Assert.False(r);
318 | }
319 |
320 | [Test]
321 | public void EqualTest4()
322 | {
323 | var v1 = SemVersion.Parse("1.2-nightly");
324 | var v2 = SemVersion.Parse("1.2.0-nightly2");
325 |
326 | var r = v1.Equals(v2);
327 | Assert.False(r);
328 | }
329 |
330 | [Test]
331 | public void EqualTest5()
332 | {
333 | var v1 = SemVersion.Parse("1.2.1");
334 | var v2 = SemVersion.Parse("1.2.0");
335 |
336 | var r = v1.Equals(v2);
337 | Assert.False(r);
338 | }
339 |
340 | [Test]
341 | public void EqualTest6()
342 | {
343 | var v1 = SemVersion.Parse("1.4.0");
344 | var v2 = SemVersion.Parse("1.2.0");
345 |
346 | var r = v1.Equals(v2);
347 | Assert.False(r);
348 | }
349 |
350 | [Test]
351 | public void EqualByReferenceTest()
352 | {
353 | var v1 = SemVersion.Parse("1.2-nightly");
354 |
355 | var r = v1.Equals(v1);
356 | Assert.True(r);
357 | }
358 |
359 | [Test]
360 | public void CompareTest1()
361 | {
362 | var v1 = SemVersion.Parse("1.0.0");
363 | var v2 = SemVersion.Parse("2.0.0");
364 |
365 | var r = v1.CompareTo(v2);
366 | Assert.AreEqual(-1, r);
367 | }
368 |
369 | [Test]
370 | public void CompareTest2()
371 | {
372 | var v1 = SemVersion.Parse("1.0.0-beta+dev.123");
373 | var v2 = SemVersion.Parse("1-beta+dev.123");
374 |
375 | var r = v1.CompareTo(v2);
376 | Assert.AreEqual(0, r);
377 | }
378 |
379 | [Test]
380 | public void CompareTest3()
381 | {
382 | var v1 = SemVersion.Parse("1.0.0-alpha+dev.123");
383 | var v2 = SemVersion.Parse("1-beta+dev.123");
384 |
385 | var r = v1.CompareTo(v2);
386 | Assert.AreEqual(-1, r);
387 | }
388 |
389 | [Test]
390 | public void CompareTest4()
391 | {
392 | var v1 = SemVersion.Parse("1.0.0-alpha");
393 | var v2 = SemVersion.Parse("1.0.0");
394 |
395 | var r = v1.CompareTo(v2);
396 | Assert.AreEqual(-1, r);
397 | }
398 |
399 | [Test]
400 | public void CompareTest5()
401 | {
402 | var v1 = SemVersion.Parse("1.0.0");
403 | var v2 = SemVersion.Parse("1.0.0-alpha");
404 |
405 | var r = v1.CompareTo(v2);
406 | Assert.AreEqual(1, r);
407 | }
408 |
409 | [Test]
410 | public void CompareTest6()
411 | {
412 | var v1 = SemVersion.Parse("1.0.0");
413 | var v2 = SemVersion.Parse("1.0.1-alpha");
414 |
415 | var r = v1.CompareTo(v2);
416 | Assert.AreEqual(-1, r);
417 | }
418 |
419 | [Test]
420 | public void CompareTest7()
421 | {
422 | var v1 = SemVersion.Parse("0.0.1");
423 | var v2 = SemVersion.Parse("0.0.1+build.12");
424 |
425 | var r = v1.CompareTo(v2);
426 | Assert.AreEqual(-1, r);
427 | }
428 |
429 | [Test]
430 | public void CompareTest8()
431 | {
432 | var v1 = SemVersion.Parse("0.0.1+build.13");
433 | var v2 = SemVersion.Parse("0.0.1+build.12.2");
434 |
435 | var r = v1.CompareTo(v2);
436 | Assert.AreEqual(1, r);
437 | }
438 |
439 | [Test]
440 | public void CompareTest9()
441 | {
442 | var v1 = SemVersion.Parse("0.0.1-13");
443 | var v2 = SemVersion.Parse("0.0.1-b");
444 |
445 | var r = v1.CompareTo(v2);
446 | Assert.AreEqual(-1, r);
447 | }
448 |
449 | [Test]
450 | public void CompareTest10()
451 | {
452 | var v1 = SemVersion.Parse("0.0.1+uiui");
453 | var v2 = SemVersion.Parse("0.0.1+12");
454 |
455 | var r = v1.CompareTo(v2);
456 | Assert.AreEqual(1, r);
457 | }
458 |
459 | [Test]
460 | public void CompareTest11()
461 | {
462 | var v1 = SemVersion.Parse("0.0.1+bu");
463 | var v2 = SemVersion.Parse("0.0.1");
464 |
465 | var r = v1.CompareTo(v2);
466 | Assert.AreEqual(1, r);
467 | }
468 |
469 | [Test]
470 | public void CompareTest12()
471 | {
472 | var v1 = SemVersion.Parse("0.1.1+bu");
473 | var v2 = SemVersion.Parse("0.2.1");
474 |
475 | var r = v1.CompareTo(v2);
476 | Assert.AreEqual(-1, r);
477 | }
478 |
479 | [Test]
480 | public void CompareTest13()
481 | {
482 | var v1 = SemVersion.Parse("0.1.1-gamma.12.87");
483 | var v2 = SemVersion.Parse("0.1.1-gamma.12.88");
484 |
485 | var r = v1.CompareTo(v2);
486 | Assert.AreEqual(-1, r);
487 | }
488 |
489 | [Test]
490 | public void CompareTest14()
491 | {
492 | var v1 = SemVersion.Parse("0.1.1-gamma.12.87");
493 | var v2 = SemVersion.Parse("0.1.1-gamma.12.87.1");
494 |
495 | var r = v1.CompareTo(v2);
496 | Assert.AreEqual(-1, r);
497 | }
498 |
499 | [Test]
500 | public void CompareTest15()
501 | {
502 | var v1 = SemVersion.Parse("0.1.1-gamma.12.87.99");
503 | var v2 = SemVersion.Parse("0.1.1-gamma.12.87.X");
504 |
505 | var r = v1.CompareTo(v2);
506 | Assert.AreEqual(-1, r);
507 | }
508 |
509 | [Test]
510 | public void CompareTest16()
511 | {
512 | var v1 = SemVersion.Parse("0.1.1-gamma.12.87");
513 | var v2 = SemVersion.Parse("0.1.1-gamma.12.87.X");
514 |
515 | var r = v1.CompareTo(v2);
516 | Assert.AreEqual(-1, r);
517 | }
518 |
519 | [Test]
520 | public void CompareNullTest()
521 | {
522 | var v1 = SemVersion.Parse("0.0.1+bu");
523 | var r = v1.CompareTo(null);
524 | Assert.AreEqual(1, r);
525 | }
526 |
527 | [Test]
528 | public void TestHashCode()
529 | {
530 | var v1 = SemVersion.Parse("1.0.0-1+b");
531 | var v2 = SemVersion.Parse("1.0.0-1+c");
532 |
533 | var h1 = v1.GetHashCode();
534 | var h2 = v2.GetHashCode();
535 |
536 | Assert.AreNotEqual(h1, h2);
537 | }
538 |
539 | [Test]
540 | public void TestStringConversion()
541 | {
542 | SemVersion v = "1.0.0";
543 | Assert.AreEqual(1, v.Major);
544 | }
545 |
546 | [Test]
547 | public void TestUntypedCompareTo()
548 | {
549 | var v1 = new SemVersion(1);
550 | var c = v1.CompareTo((object)v1);
551 |
552 | Assert.AreEqual(0, c);
553 | }
554 |
555 | [Test]
556 | public void StaticEqualsTest1()
557 | {
558 | var v1 = new SemVersion(1, 2, 3);
559 | var v2 = new SemVersion(1, 2, 3);
560 |
561 | var r = SemVersion.Equals(v1, v2);
562 | Assert.True(r);
563 | }
564 |
565 | [Test]
566 | public void StaticEqualsTest2()
567 | {
568 | var r = SemVersion.Equals(null, null);
569 | Assert.True(r);
570 | }
571 |
572 | [Test]
573 | public void StaticEqualsTest3()
574 | {
575 | var v1 = new SemVersion(1);
576 |
577 | var r = SemVersion.Equals(v1, null);
578 | Assert.False(r);
579 | }
580 |
581 | [Test]
582 | public void StaticCompareTest1()
583 | {
584 | var v1 = new SemVersion(1);
585 | var v2 = new SemVersion(2);
586 |
587 | var r = SemVersion.Compare(v1, v2);
588 | Assert.AreEqual(-1, r);
589 | }
590 |
591 | [Test]
592 | public void StaticCompareTest2()
593 | {
594 | var v1 = new SemVersion(1);
595 |
596 | var r = SemVersion.Compare(v1, null);
597 | Assert.AreEqual(1, r);
598 | }
599 |
600 | [Test]
601 | public void StaticCompareTest3()
602 | {
603 | var v1 = new SemVersion(1);
604 |
605 | var r = SemVersion.Compare(null, v1);
606 | Assert.AreEqual(-1, r);
607 | }
608 |
609 | [Test]
610 | public void StaticCompareTest4()
611 | {
612 | var r = SemVersion.Compare(null, null);
613 | Assert.AreEqual(0, r);
614 | }
615 |
616 | [Test]
617 | public void EqualsOperatorTest()
618 | {
619 | var v1 = new SemVersion(1);
620 | var v2 = new SemVersion(1);
621 |
622 | var r = v1 == v2;
623 | Assert.True(r);
624 | }
625 |
626 | [Test]
627 | public void UnequalOperatorTest()
628 | {
629 | var v1 = new SemVersion(1);
630 | var v2 = new SemVersion(2);
631 |
632 | var r = v1 != v2;
633 | Assert.True(r);
634 | }
635 |
636 | [Test]
637 | public void GreaterOperatorTest()
638 | {
639 | var v1 = new SemVersion(1);
640 | var v2 = new SemVersion(2);
641 |
642 | var r = v2 > v1;
643 | Assert.True(r);
644 | }
645 |
646 | [Test]
647 | public void GreaterOperatorTest2()
648 | {
649 | var v1 = new SemVersion(1, 0, 0, "alpha");
650 | var v2 = new SemVersion(1, 0, 0, "rc");
651 |
652 | var r = v2 > v1;
653 | Assert.True(r);
654 | }
655 |
656 | [Test]
657 | public void GreaterOperatorTest3()
658 | {
659 | var v1 = new SemVersion(1, 0, 0, "-ci.1");
660 | var v2 = new SemVersion(1, 0, 0, "alpha");
661 |
662 | var r = v2 > v1;
663 | Assert.True(r);
664 | }
665 |
666 | [Test]
667 | public void GreaterOrEqualOperatorTest1()
668 | {
669 | var v1 = new SemVersion(1);
670 | var v2 = new SemVersion(1);
671 |
672 | var r = v1 >= v2;
673 | Assert.True(r);
674 | }
675 |
676 | [Test]
677 | public void GreaterOrEqualOperatorTest2()
678 | {
679 | var v1 = new SemVersion(2);
680 | var v2 = new SemVersion(1);
681 |
682 | var r = v1 >= v2;
683 | Assert.True(r);
684 | }
685 |
686 | [Test]
687 | public void LessOperatorTest()
688 | {
689 | var v1 = new SemVersion(1);
690 | var v2 = new SemVersion(2);
691 |
692 | var r = v1 < v2;
693 | Assert.True(r);
694 | }
695 |
696 | [Test]
697 | public void LessOperatorTest2()
698 | {
699 | var v1 = new SemVersion(1, 0, 0, "alpha");
700 | var v2 = new SemVersion(1, 0, 0, "rc");
701 |
702 | var r = v1 < v2;
703 | Assert.True(r);
704 | }
705 |
706 | [Test]
707 | public void LessOperatorTest3()
708 | {
709 | var v1 = new SemVersion(1, 0, 0, "-ci.1");
710 | var v2 = new SemVersion(1, 0, 0, "alpha");
711 |
712 | var r = v1 < v2;
713 | Assert.True(r);
714 | }
715 |
716 | [Test]
717 | public void LessOrEqualOperatorTest1()
718 | {
719 | var v1 = new SemVersion(1);
720 | var v2 = new SemVersion(1);
721 |
722 | var r = v1 <= v2;
723 | Assert.True(r);
724 | }
725 |
726 | [Test]
727 | public void LessOrEqualOperatorTest2()
728 | {
729 | var v1 = new SemVersion(1);
730 | var v2 = new SemVersion(2);
731 |
732 | var r = v1 <= v2;
733 | Assert.True(r);
734 | }
735 |
736 | [Test]
737 | public void TestChangeMajor()
738 | {
739 | var v1 = new SemVersion(1, 2, 3, "alpha", "dev");
740 | var v2 = v1.Change(major: 5);
741 |
742 | Assert.AreEqual(5, v2.Major);
743 | Assert.AreEqual(2, v2.Minor);
744 | Assert.AreEqual(3, v2.Patch);
745 | Assert.AreEqual("alpha", v2.Prerelease);
746 | Assert.AreEqual("dev", v2.Build);
747 | }
748 |
749 | [Test]
750 | public void TestChangeMinor()
751 | {
752 | var v1 = new SemVersion(1, 2, 3, "alpha", "dev");
753 | var v2 = v1.Change(minor: 5);
754 |
755 | Assert.AreEqual(1, v2.Major);
756 | Assert.AreEqual(5, v2.Minor);
757 | Assert.AreEqual(3, v2.Patch);
758 | Assert.AreEqual("alpha", v2.Prerelease);
759 | Assert.AreEqual("dev", v2.Build);
760 | }
761 |
762 | [Test]
763 | public void TestChangePatch()
764 | {
765 | var v1 = new SemVersion(1, 2, 3, "alpha", "dev");
766 | var v2 = v1.Change(patch: 5);
767 |
768 | Assert.AreEqual(1, v2.Major);
769 | Assert.AreEqual(2, v2.Minor);
770 | Assert.AreEqual(5, v2.Patch);
771 | Assert.AreEqual("alpha", v2.Prerelease);
772 | Assert.AreEqual("dev", v2.Build);
773 | }
774 |
775 | [Test]
776 | public void TestChangePrerelease()
777 | {
778 | var v1 = new SemVersion(1, 2, 3, "alpha", "dev");
779 | var v2 = v1.Change(prerelease: "beta");
780 |
781 | Assert.AreEqual(1, v2.Major);
782 | Assert.AreEqual(2, v2.Minor);
783 | Assert.AreEqual(3, v2.Patch);
784 | Assert.AreEqual("beta", v2.Prerelease);
785 | Assert.AreEqual("dev", v2.Build);
786 | }
787 |
788 | [Test]
789 | public void TestSerialization()
790 | {
791 | var semVer = new SemVersion(1, 2, 3, "alpha", "dev");
792 | SemVersion semVerSerializedDeserialized;
793 | using (var ms = new MemoryStream())
794 | {
795 | var bf = new BinaryFormatter();
796 | bf.Serialize(ms, semVer);
797 | ms.Position = 0;
798 | semVerSerializedDeserialized = (SemVersion)bf.Deserialize(ms);
799 | }
800 |
801 | Assert.AreEqual(semVer, semVerSerializedDeserialized);
802 | }
803 | }
804 | }
805 |
--------------------------------------------------------------------------------
/Unity/Assets/JCMG/SemVer/Scripts/SemVersion.cs:
--------------------------------------------------------------------------------
1 | /*
2 | MIT License
3 |
4 | Copyright (c) 2019 Jeff Campbell
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 | using System;
25 | using System.Globalization;
26 | using System.Runtime.Serialization;
27 | using System.Text;
28 | using UnityEngine;
29 | using UnityEngine.Assertions;
30 |
31 | namespace JCMG.SemVer
32 | {
33 | ///
34 | /// represents a semantic version that conforms to the 2.0.0 SemVer standard
35 | /// described here (https://semver.org/spec/v2.0.0.html).
36 | ///
37 | [Serializable]
38 | public sealed class SemVersion :
39 | IComparable,
40 | IComparable,
41 | ISerializable
42 | {
43 | ///
44 | /// Gets the major version.
45 | ///
46 | public int Major
47 | {
48 | get { return _major; }
49 | set { _major = value; }
50 | }
51 |
52 | ///
53 | /// Gets the minor version.
54 | ///
55 | public int Minor
56 | {
57 | get { return _minor; }
58 | set { _minor = value; }
59 | }
60 |
61 | ///
62 | /// Gets the patch version.
63 | ///
64 | ///
65 | /// The patch version.
66 | ///
67 | public int Patch
68 | {
69 | get { return _patch; }
70 | set { _patch = value; }
71 | }
72 |
73 | ///
74 | /// Gets the pre-release version.
75 | ///
76 | public string Prerelease
77 | {
78 | get { return _prerelease; }
79 | set { _prerelease = value; }
80 | }
81 |
82 | ///
83 | /// Gets the build version.
84 | ///
85 | public string Build
86 | {
87 | get { return _build; }
88 | set { _build = value; }
89 | }
90 |
91 | [SerializeField]
92 | private int _major;
93 |
94 | [SerializeField]
95 | private int _minor;
96 |
97 | [SerializeField]
98 | private int _patch;
99 |
100 | [SerializeField]
101 | private string _prerelease;
102 |
103 | [SerializeField]
104 | private string _build;
105 |
106 | private static readonly StringBuilder _versionStringBuilder;
107 |
108 | static SemVersion()
109 | {
110 | _versionStringBuilder = new StringBuilder();
111 | }
112 |
113 | ///
114 | /// Initializes a new instance of the class.
115 | ///
116 | ///
117 | ///
118 | ///
119 | private SemVersion(SerializationInfo info, StreamingContext context)
120 | {
121 | Assert.IsNotNull(info);
122 |
123 | var semVersion = Parse(info.GetString(RuntimeConstants.SemVersionClassName));
124 | _major = semVersion.Major;
125 | _minor = semVersion.Minor;
126 | _patch = semVersion.Patch;
127 | _prerelease = semVersion.Prerelease;
128 | _build = semVersion.Build;
129 | }
130 |
131 | ///
132 | /// Initializes a new instance of the class.
133 | ///
134 | public SemVersion()
135 | {
136 | _major = 0;
137 | _minor = 0;
138 | _patch = 0;
139 |
140 | _prerelease = string.Empty;
141 | _build = string.Empty;
142 | }
143 |
144 | ///
145 | /// Initializes a new instance of the class.
146 | ///
147 | /// The major version.
148 | /// The minor version.
149 | /// The patch version.
150 | /// The prerelease version (eg. "alpha").
151 | /// The build eg ("nightly.232").
152 | public SemVersion(
153 | int major,
154 | int minor = 0,
155 | int patch = 0,
156 | string prerelease = null,
157 | string build = null)
158 | {
159 | _major = major;
160 | _minor = minor;
161 | _patch = patch;
162 |
163 | _prerelease = string.IsNullOrEmpty(prerelease) ? string.Empty : prerelease;
164 | _build = string.IsNullOrEmpty(build) ? string.Empty : build;
165 | }
166 |
167 | ///
168 | /// Copy-constructor that performs a deep-copy of .
169 | ///
170 | /// The that is used to initialize
171 | /// the Major, Minor, Patch and Build properties.
172 | public SemVersion(Version version)
173 | {
174 | Assert.IsNotNull(version);
175 |
176 | _major = version.Major;
177 | _minor = version.Minor;
178 |
179 | if (version.Revision >= 0)
180 | {
181 | _patch = version.Revision;
182 | }
183 |
184 | _prerelease = string.Empty;
185 |
186 | _build = version.Build > 0 ? version.Build.ToString() : string.Empty;
187 | }
188 |
189 | ///
190 | /// Parses the specified string to a semantic version.
191 | ///
192 | /// The version string.
193 | /// If set to true minor and patch version are required, else they default to 0.
194 | /// The SemVersion object.
195 | /// When a invalid version string is passed.
196 | /// When a invalid version string is passed.
197 | public static SemVersion Parse(string version, bool strict = false)
198 | {
199 | var match = RuntimeConstants.ParseRegEx.Match(version);
200 | if (!match.Success)
201 | {
202 | throw new ArgumentException(RuntimeConstants.InvalidVersionString);
203 | }
204 |
205 | var major = int.Parse(match.Groups[RuntimeConstants.MajorVersionField].Value, CultureInfo.InvariantCulture);
206 |
207 | var minorMatch = match.Groups[RuntimeConstants.MinorVersionField];
208 | var minor = 0;
209 | if (minorMatch.Success)
210 | {
211 | minor = int.Parse(minorMatch.Value, CultureInfo.InvariantCulture);
212 | }
213 | else if (strict)
214 | {
215 | throw new InvalidOperationException(RuntimeConstants.InvalidVersionNoMinorValue);
216 | }
217 |
218 | var patchMatch = match.Groups[RuntimeConstants.PatchVersionField];
219 | var patch = 0;
220 | if (patchMatch.Success)
221 | {
222 | patch = int.Parse(patchMatch.Value, CultureInfo.InvariantCulture);
223 | }
224 | else if (strict)
225 | {
226 | throw new InvalidOperationException(RuntimeConstants.InvalidVersionNoPatchValue);
227 | }
228 |
229 | var prerelease = match.Groups[RuntimeConstants.PreReleaseVersionField].Value;
230 | var build = match.Groups[RuntimeConstants.BuildVersionField].Value;
231 |
232 | return new SemVersion(major, minor, patch, prerelease, build);
233 | }
234 |
235 | ///
236 | /// Parses the specified string to a semantic version.
237 | ///
238 | /// The version string.
239 | /// When the method returns, contains a SemVersion instance equivalent
240 | /// to the version string passed in, if the version string was valid, or null if the
241 | /// version string was not valid.
242 | /// If set to true minor and patch version are required, else they default to 0.
243 | /// False when a invalid version string is passed, otherwise true.
244 | public static bool TryParse(string version, out SemVersion semver, bool strict = false)
245 | {
246 | try
247 | {
248 | semver = Parse(version, strict);
249 | return true;
250 | }
251 | catch (Exception ex)
252 | {
253 | Debug.LogErrorFormat(RuntimeConstants.VersionParseErrorFormat, ex);
254 | semver = null;
255 | return false;
256 | }
257 | }
258 |
259 | ///
260 | /// Tests the specified versions for equality.
261 | ///
262 | /// The first version.
263 | /// The second version.
264 | /// If versionA is equal to versionB true, else false.
265 | public static bool Equals(SemVersion versionA, SemVersion versionB)
266 | {
267 | return ReferenceEquals(versionA, null)
268 | ? ReferenceEquals(versionB, null)
269 | : versionA.Equals(versionB);
270 | }
271 |
272 | ///
273 | /// Compares the specified versions.
274 | ///
275 | /// The version to compare to.
276 | /// The version to compare against.
277 | /// If versionA < versionB < 0, if versionA > versionB > 0,
278 | /// if versionA is equal to versionB 0.
279 | public static int Compare(SemVersion versionA, SemVersion versionB)
280 | {
281 | if (ReferenceEquals(versionA, null))
282 | {
283 | return ReferenceEquals(versionB, null) ? 0 : -1;
284 | }
285 |
286 | return versionA.CompareTo(versionB);
287 | }
288 |
289 | ///
290 | /// Make a copy of the current instance with optional altered fields.
291 | ///
292 | /// The major version.
293 | /// The minor version.
294 | /// The patch version.
295 | /// The prerelease text.
296 | /// The build text.
297 | /// The new version object.
298 | public SemVersion Change(
299 | int? major = null,
300 | int? minor = null,
301 | int? patch = null,
302 | string prerelease = null,
303 | string build = null)
304 | {
305 | return new SemVersion(
306 | major ?? Major,
307 | minor ?? Minor,
308 | patch ?? Patch,
309 | prerelease ?? Prerelease,
310 | build ?? Build);
311 | }
312 |
313 | ///
314 | /// Returns a that represents this instance.
315 | ///
316 | public override string ToString()
317 | {
318 | _versionStringBuilder.Length = 0;
319 | _versionStringBuilder.Append(string.Format(
320 | RuntimeConstants.SimpleVersionFormat,
321 | _major,
322 | _minor,
323 | _patch));
324 |
325 | if (!string.IsNullOrEmpty(_prerelease))
326 | {
327 | _versionStringBuilder.Append(RuntimeConstants.PreReleasePrefix);
328 | _versionStringBuilder.Append(_prerelease);
329 | }
330 |
331 | if (!string.IsNullOrEmpty(_build))
332 | {
333 | _versionStringBuilder.Append(RuntimeConstants.BuildPrefix);
334 | _versionStringBuilder.Append(_build);
335 | }
336 |
337 | return _versionStringBuilder.ToString();
338 | }
339 |
340 | ///
341 | /// Determines whether the specified is equal to this instance.
342 | ///
343 | /// The to compare with this instance.
344 | public override bool Equals(object obj)
345 | {
346 | if(ReferenceEquals(this, obj))
347 | {
348 | return true;
349 | }
350 |
351 | var otherVersion = obj as SemVersion;
352 | if (ReferenceEquals(otherVersion, null))
353 | {
354 | return false;
355 | }
356 |
357 | return _major == otherVersion.Major &&
358 | _minor == otherVersion.Minor &&
359 | _patch == otherVersion.Patch &&
360 | string.Equals(_prerelease, otherVersion.Prerelease, StringComparison.Ordinal) &&
361 | string.Equals(_build, otherVersion.Build, StringComparison.Ordinal);
362 | }
363 |
364 | ///
365 | /// Returns a hash code for this instance.
366 | ///
367 | ///
368 | /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
369 | ///
370 | public override int GetHashCode()
371 | {
372 | unchecked
373 | {
374 | var result = _major.GetHashCode();
375 | result = result * 31 + _minor.GetHashCode();
376 | result = result * 31 + _patch.GetHashCode();
377 | result = result * 31 + _prerelease.GetHashCode();
378 | result = result * 31 + _build.GetHashCode();
379 | return result;
380 | }
381 | }
382 |
383 | #region IComparable
384 |
385 | ///
386 | /// Compares the current instance with another object of the same type and returns an integer that indicates
387 | /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the
388 | /// other object.
389 | ///
390 | /// An object to compare with this instance.
391 | ///
392 | /// A value that indicates the relative order of the objects being compared.
393 | /// The return value has these meanings: Value Meaning Less than zero
394 | /// This instance precedes in the sort order.
395 | /// Zero This instance occurs in the same position in the sort order as . i
396 | /// Greater than zero This instance follows in the sort order.
397 | ///
398 | public int CompareTo(object obj)
399 | {
400 | return CompareTo((SemVersion)obj);
401 | }
402 |
403 | #endregion
404 |
405 | #region IComparable
406 |
407 | ///
408 | /// Compares the current instance with another object of the same type and returns an integer that indicates
409 | /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the
410 | /// other object.
411 | ///
412 | /// An object to compare with this instance.
413 | ///
414 | /// A value that indicates the relative order of the objects being compared.
415 | /// The return value has these meanings: Value Meaning Less than zero
416 | /// This instance precedes in the sort order.
417 | /// Zero This instance occurs in the same position in the sort order as . i
418 | /// Greater than zero This instance follows in the sort order.
419 | ///
420 | public int CompareTo(SemVersion other)
421 | {
422 | if (ReferenceEquals(other, null))
423 | {
424 | return 1;
425 | }
426 |
427 | var r = CompareByPrecedence(other);
428 | if (r != 0)
429 | {
430 | return r;
431 | }
432 |
433 | r = CompareComponent(Build, other.Build);
434 | return r;
435 | }
436 |
437 | ///
438 | /// Compares to semantic versions by precedence. This does the same as a Equals, but ignores the build information.
439 | ///
440 | /// The semantic version.
441 | ///
442 | /// A value that indicates the relative order of the objects being compared.
443 | /// The return value has these meanings: Value Meaning Less than zero
444 | /// This instance precedes in the version precedence.
445 | /// Zero This instance has the same precedence as . i
446 | /// Greater than zero This instance has creator precedence as .
447 | ///
448 | private int CompareByPrecedence(SemVersion other)
449 | {
450 | if (ReferenceEquals(other, null))
451 | {
452 | return 1;
453 | }
454 |
455 | var r = _major.CompareTo(other.Major);
456 | if (r != 0)
457 | {
458 | return r;
459 | }
460 |
461 | r = _minor.CompareTo(other.Minor);
462 | if (r != 0)
463 | {
464 | return r;
465 | }
466 |
467 | r = _patch.CompareTo(other.Patch);
468 | if (r != 0)
469 | {
470 | return r;
471 | }
472 |
473 | r = CompareComponent(_prerelease, other.Prerelease, true);
474 | return r;
475 | }
476 |
477 | private static int CompareComponent(string a, string b, bool lower = false)
478 | {
479 | var aEmpty = string.IsNullOrEmpty(a);
480 | var bEmpty = string.IsNullOrEmpty(b);
481 | if (aEmpty && bEmpty)
482 | {
483 | return 0;
484 | }
485 |
486 | if (aEmpty)
487 | {
488 | return lower ? 1 : -1;
489 | }
490 |
491 | if (bEmpty)
492 | {
493 | return lower ? -1 : 1;
494 | }
495 |
496 | var aComps = a.Split(RuntimeConstants.VersionFieldDelimiter);
497 | var bComps = b.Split(RuntimeConstants.VersionFieldDelimiter);
498 | var minLen = Math.Min(aComps.Length, bComps.Length);
499 | for (var i = 0; i < minLen; i++)
500 | {
501 | var ac = aComps[i];
502 | var bc = bComps[i];
503 | int anum, bnum;
504 | var isanum = int.TryParse(ac, out anum);
505 | var isbnum = int.TryParse(bc, out bnum);
506 | int r;
507 | if (isanum && isbnum)
508 | {
509 | r = anum.CompareTo(bnum);
510 | if (r != 0)
511 | {
512 | return anum.CompareTo(bnum);
513 | }
514 | }
515 | else
516 | {
517 | if (isanum)
518 | {
519 | return -1;
520 | }
521 |
522 | if (isbnum)
523 | {
524 | return 1;
525 | }
526 |
527 | r = string.CompareOrdinal(ac, bc);
528 | if (r != 0)
529 | {
530 | return r;
531 | }
532 | }
533 | }
534 |
535 | return aComps.Length.CompareTo(bComps.Length);
536 | }
537 |
538 | #endregion
539 |
540 | #region ISerializable
541 |
542 | ///
543 | /// Adds the serialization info for this instance to
544 | /// .
545 | ///
546 | ///
547 | ///
548 | /// When
549 | /// is null.
550 | public void GetObjectData(SerializationInfo info, StreamingContext context)
551 | {
552 | Assert.IsNotNull(info);
553 |
554 | info.AddValue(RuntimeConstants.SemVersionClassName, ToString());
555 | }
556 |
557 | #endregion
558 |
559 | #region Operators
560 |
561 | ///
562 | /// Implicit conversion from string to SemVersion.
563 | ///
564 | /// The semantic version.
565 | public static implicit operator SemVersion(string version)
566 | {
567 | return Parse(version);
568 | }
569 |
570 | ///
571 | /// The override of the equals operator.
572 | ///
573 | /// The left value.
574 | /// The right value.
575 | public static bool operator ==(SemVersion left, SemVersion right)
576 | {
577 | return Equals(left, right);
578 | }
579 |
580 | ///
581 | /// The override of the un-equal operator.
582 | ///
583 | /// The left value.
584 | /// The right value.
585 | public static bool operator !=(SemVersion left, SemVersion right)
586 | {
587 | return !Equals(left, right);
588 | }
589 |
590 | ///
591 | /// The override of the greater operator.
592 | ///
593 | /// The left value.
594 | /// The right value.
595 | public static bool operator >(SemVersion left, SemVersion right)
596 | {
597 | return Compare(left, right) > 0;
598 | }
599 |
600 | ///
601 | /// The override of the greater than or equal operator.
602 | ///
603 | /// The left value.
604 | /// The right value.
605 | public static bool operator >=(SemVersion left, SemVersion right)
606 | {
607 | return left == right || left > right;
608 | }
609 |
610 | ///
611 | /// The override of the less operator.
612 | ///
613 | /// The left value.
614 | /// The right value.
615 | public static bool operator <(SemVersion left, SemVersion right)
616 | {
617 | return Compare(left, right) < 0;
618 | }
619 |
620 | ///
621 | /// The override of the less than or equal operator.
622 | ///
623 | /// The left value.
624 | /// The right value.
625 | public static bool operator <=(SemVersion left, SemVersion right)
626 | {
627 | return left == right || left < right;
628 | }
629 |
630 | #endregion
631 | }
632 | }
633 |
--------------------------------------------------------------------------------
/Unity/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!129 &1
4 | PlayerSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 28
7 | productGUID: 71f8a6bc49415ca42a5705f1a5692afc
8 | AndroidProfiler: 0
9 | AndroidFilterTouchesWhenObscured: 0
10 | AndroidEnableSustainedPerformanceMode: 0
11 | defaultScreenOrientation: 4
12 | targetDevice: 2
13 | useOnDemandResources: 0
14 | accelerometerFrequency: 60
15 | companyName: DefaultCompany
16 | productName: Unity
17 | defaultCursor: {fileID: 0}
18 | cursorHotspot: {x: 0, y: 0}
19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20 | m_ShowUnitySplashScreen: 1
21 | m_ShowUnitySplashLogo: 1
22 | m_SplashScreenOverlayOpacity: 1
23 | m_SplashScreenAnimation: 1
24 | m_SplashScreenLogoStyle: 1
25 | m_SplashScreenDrawMode: 0
26 | m_SplashScreenBackgroundAnimationZoom: 1
27 | m_SplashScreenLogoAnimationZoom: 1
28 | m_SplashScreenBackgroundLandscapeAspect: 1
29 | m_SplashScreenBackgroundPortraitAspect: 1
30 | m_SplashScreenBackgroundLandscapeUvs:
31 | serializedVersion: 2
32 | x: 0
33 | y: 0
34 | width: 1
35 | height: 1
36 | m_SplashScreenBackgroundPortraitUvs:
37 | serializedVersion: 2
38 | x: 0
39 | y: 0
40 | width: 1
41 | height: 1
42 | m_SplashScreenLogos: []
43 | m_VirtualRealitySplashScreen: {fileID: 0}
44 | m_HolographicTrackingLossScreen: {fileID: 0}
45 | defaultScreenWidth: 1024
46 | defaultScreenHeight: 768
47 | defaultScreenWidthWeb: 960
48 | defaultScreenHeightWeb: 600
49 | m_StereoRenderingPath: 0
50 | m_ActiveColorSpace: 0
51 | unsupportedMSAAFallback: 0
52 | m_SpriteBatchMaxVertexCount: 65535
53 | m_SpriteBatchVertexThreshold: 300
54 | m_MTRendering: 1
55 | mipStripping: 0
56 | numberOfMipsStripped: 0
57 | numberOfMipsStrippedPerMipmapLimitGroup: {}
58 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000
59 | iosShowActivityIndicatorOnLoading: -1
60 | androidShowActivityIndicatorOnLoading: -1
61 | iosUseCustomAppBackgroundBehavior: 0
62 | allowedAutorotateToPortrait: 1
63 | allowedAutorotateToPortraitUpsideDown: 1
64 | allowedAutorotateToLandscapeRight: 1
65 | allowedAutorotateToLandscapeLeft: 1
66 | useOSAutorotation: 1
67 | use32BitDisplayBuffer: 1
68 | preserveFramebufferAlpha: 0
69 | disableDepthAndStencilBuffers: 0
70 | androidStartInFullscreen: 1
71 | androidRenderOutsideSafeArea: 0
72 | androidUseSwappy: 0
73 | androidBlitType: 0
74 | androidResizeableActivity: 1
75 | androidDefaultWindowWidth: 1920
76 | androidDefaultWindowHeight: 1080
77 | androidMinimumWindowWidth: 400
78 | androidMinimumWindowHeight: 300
79 | androidFullscreenMode: 1
80 | androidAutoRotationBehavior: 1
81 | androidPredictiveBackSupport: 0
82 | androidApplicationEntry: 1
83 | defaultIsNativeResolution: 1
84 | macRetinaSupport: 1
85 | runInBackground: 1
86 | muteOtherAudioSources: 0
87 | Prepare IOS For Recording: 0
88 | Force IOS Speakers When Recording: 0
89 | deferSystemGesturesMode: 0
90 | hideHomeButton: 0
91 | submitAnalytics: 1
92 | usePlayerLog: 1
93 | dedicatedServerOptimizations: 1
94 | bakeCollisionMeshes: 0
95 | forceSingleInstance: 0
96 | useFlipModelSwapchain: 1
97 | resizableWindow: 0
98 | useMacAppStoreValidation: 0
99 | macAppStoreCategory: public.app-category.games
100 | gpuSkinning: 1
101 | meshDeformation: 2
102 | xboxPIXTextureCapture: 0
103 | xboxEnableAvatar: 0
104 | xboxEnableKinect: 0
105 | xboxEnableKinectAutoTracking: 0
106 | xboxEnableFitness: 0
107 | visibleInBackground: 1
108 | allowFullscreenSwitch: 1
109 | fullscreenMode: 1
110 | xboxSpeechDB: 0
111 | xboxEnableHeadOrientation: 0
112 | xboxEnableGuest: 0
113 | xboxEnablePIXSampling: 0
114 | metalFramebufferOnly: 0
115 | xboxOneResolution: 0
116 | xboxOneSResolution: 0
117 | xboxOneXResolution: 3
118 | xboxOneMonoLoggingLevel: 0
119 | xboxOneLoggingLevel: 1
120 | xboxOneDisableEsram: 0
121 | xboxOneEnableTypeOptimization: 0
122 | xboxOnePresentImmediateThreshold: 0
123 | switchQueueCommandMemory: 0
124 | switchQueueControlMemory: 16384
125 | switchQueueComputeMemory: 262144
126 | switchNVNShaderPoolsGranularity: 33554432
127 | switchNVNDefaultPoolsGranularity: 16777216
128 | switchNVNOtherPoolsGranularity: 16777216
129 | switchGpuScratchPoolGranularity: 2097152
130 | switchAllowGpuScratchShrinking: 0
131 | switchNVNMaxPublicTextureIDCount: 0
132 | switchNVNMaxPublicSamplerIDCount: 0
133 | switchMaxWorkerMultiple: 8
134 | switchNVNGraphicsFirmwareMemory: 32
135 | vulkanNumSwapchainBuffers: 3
136 | vulkanEnableSetSRGBWrite: 0
137 | vulkanEnablePreTransform: 0
138 | vulkanEnableLateAcquireNextImage: 0
139 | vulkanEnableCommandBufferRecycling: 1
140 | loadStoreDebugModeEnabled: 0
141 | visionOSBundleVersion: 1.0
142 | tvOSBundleVersion: 1.0
143 | bundleVersion: 0.1
144 | preloadedAssets: []
145 | metroInputSource: 0
146 | wsaTransparentSwapchain: 0
147 | m_HolographicPauseOnTrackingLoss: 1
148 | xboxOneDisableKinectGpuReservation: 1
149 | xboxOneEnable7thCore: 1
150 | vrSettings:
151 | enable360StereoCapture: 0
152 | isWsaHolographicRemotingEnabled: 0
153 | enableFrameTimingStats: 0
154 | enableOpenGLProfilerGPURecorders: 1
155 | allowHDRDisplaySupport: 0
156 | useHDRDisplay: 0
157 | hdrBitDepth: 0
158 | m_ColorGamuts: 00000000
159 | targetPixelDensity: 30
160 | resolutionScalingMode: 0
161 | resetResolutionOnWindowResize: 0
162 | androidSupportedAspectRatio: 1
163 | androidMaxAspectRatio: 2.1
164 | androidMinAspectRatio: 1
165 | applicationIdentifier: {}
166 | buildNumber:
167 | Standalone: 0
168 | VisionOS: 0
169 | iPhone: 0
170 | tvOS: 0
171 | overrideDefaultApplicationIdentifier: 0
172 | AndroidBundleVersionCode: 1
173 | AndroidMinSdkVersion: 23
174 | AndroidTargetSdkVersion: 0
175 | AndroidPreferredInstallLocation: 1
176 | aotOptions:
177 | stripEngineCode: 1
178 | iPhoneStrippingLevel: 0
179 | iPhoneScriptCallOptimization: 0
180 | ForceInternetPermission: 0
181 | ForceSDCardPermission: 0
182 | CreateWallpaper: 0
183 | androidSplitApplicationBinary: 0
184 | keepLoadedShadersAlive: 0
185 | StripUnusedMeshComponents: 1
186 | strictShaderVariantMatching: 0
187 | VertexChannelCompressionMask: 4054
188 | iPhoneSdkVersion: 988
189 | iOSSimulatorArchitecture: 0
190 | iOSTargetOSVersionString: 13.0
191 | tvOSSdkVersion: 0
192 | tvOSSimulatorArchitecture: 0
193 | tvOSRequireExtendedGameController: 0
194 | tvOSTargetOSVersionString: 13.0
195 | VisionOSSdkVersion: 0
196 | VisionOSTargetOSVersionString: 1.0
197 | uIPrerenderedIcon: 0
198 | uIRequiresPersistentWiFi: 0
199 | uIRequiresFullScreen: 1
200 | uIStatusBarHidden: 1
201 | uIExitOnSuspend: 0
202 | uIStatusBarStyle: 0
203 | appleTVSplashScreen: {fileID: 0}
204 | appleTVSplashScreen2x: {fileID: 0}
205 | tvOSSmallIconLayers: []
206 | tvOSSmallIconLayers2x: []
207 | tvOSLargeIconLayers: []
208 | tvOSLargeIconLayers2x: []
209 | tvOSTopShelfImageLayers: []
210 | tvOSTopShelfImageLayers2x: []
211 | tvOSTopShelfImageWideLayers: []
212 | tvOSTopShelfImageWideLayers2x: []
213 | iOSLaunchScreenType: 0
214 | iOSLaunchScreenPortrait: {fileID: 0}
215 | iOSLaunchScreenLandscape: {fileID: 0}
216 | iOSLaunchScreenBackgroundColor:
217 | serializedVersion: 2
218 | rgba: 0
219 | iOSLaunchScreenFillPct: 100
220 | iOSLaunchScreenSize: 100
221 | iOSLaunchScreeniPadType: 0
222 | iOSLaunchScreeniPadImage: {fileID: 0}
223 | iOSLaunchScreeniPadBackgroundColor:
224 | serializedVersion: 2
225 | rgba: 0
226 | iOSLaunchScreeniPadFillPct: 100
227 | iOSLaunchScreeniPadSize: 100
228 | iOSLaunchScreenCustomStoryboardPath:
229 | iOSLaunchScreeniPadCustomStoryboardPath:
230 | iOSDeviceRequirements: []
231 | iOSURLSchemes: []
232 | macOSURLSchemes: []
233 | iOSBackgroundModes: 0
234 | iOSMetalForceHardShadows: 0
235 | metalEditorSupport: 1
236 | metalAPIValidation: 1
237 | metalCompileShaderBinary: 0
238 | iOSRenderExtraFrameOnPause: 0
239 | iosCopyPluginsCodeInsteadOfSymlink: 0
240 | appleDeveloperTeamID:
241 | iOSManualSigningProvisioningProfileID:
242 | tvOSManualSigningProvisioningProfileID:
243 | VisionOSManualSigningProvisioningProfileID:
244 | iOSManualSigningProvisioningProfileType: 0
245 | tvOSManualSigningProvisioningProfileType: 0
246 | VisionOSManualSigningProvisioningProfileType: 0
247 | appleEnableAutomaticSigning: 0
248 | iOSRequireARKit: 0
249 | iOSAutomaticallyDetectAndAddCapabilities: 1
250 | appleEnableProMotion: 0
251 | shaderPrecisionModel: 0
252 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
253 | templatePackageId: com.unity.template.3d@1.3.0
254 | templateDefaultScene: Assets/Scenes/SampleScene.unity
255 | useCustomMainManifest: 0
256 | useCustomLauncherManifest: 0
257 | useCustomMainGradleTemplate: 0
258 | useCustomLauncherGradleManifest: 0
259 | useCustomBaseGradleTemplate: 0
260 | useCustomGradlePropertiesTemplate: 0
261 | useCustomGradleSettingsTemplate: 0
262 | useCustomProguardFile: 0
263 | AndroidTargetArchitectures: 5
264 | AndroidSplashScreenScale: 0
265 | androidSplashScreen: {fileID: 0}
266 | AndroidKeystoreName: '{inproject}: '
267 | AndroidKeyaliasName:
268 | AndroidEnableArmv9SecurityFeatures: 0
269 | AndroidEnableArm64MTE: 0
270 | AndroidBuildApkPerCpuArchitecture: 0
271 | AndroidTVCompatibility: 1
272 | AndroidIsGame: 1
273 | AndroidEnableTango: 0
274 | androidEnableBanner: 1
275 | androidUseLowAccuracyLocation: 0
276 | androidUseCustomKeystore: 0
277 | m_AndroidBanners:
278 | - width: 320
279 | height: 180
280 | banner: {fileID: 0}
281 | androidGamepadSupportLevel: 0
282 | AndroidMinifyRelease: 0
283 | AndroidMinifyDebug: 0
284 | AndroidValidateAppBundleSize: 1
285 | AndroidAppBundleSizeToValidate: 200
286 | AndroidReportGooglePlayAppDependencies: 1
287 | androidSymbolsSizeThreshold: 800
288 | m_BuildTargetIcons: []
289 | m_BuildTargetPlatformIcons:
290 | - m_BuildTarget: iPhone
291 | m_Icons:
292 | - m_Textures: []
293 | m_Width: 180
294 | m_Height: 180
295 | m_Kind: 0
296 | m_SubKind: iPhone
297 | - m_Textures: []
298 | m_Width: 120
299 | m_Height: 120
300 | m_Kind: 0
301 | m_SubKind: iPhone
302 | - m_Textures: []
303 | m_Width: 167
304 | m_Height: 167
305 | m_Kind: 0
306 | m_SubKind: iPad
307 | - m_Textures: []
308 | m_Width: 152
309 | m_Height: 152
310 | m_Kind: 0
311 | m_SubKind: iPad
312 | - m_Textures: []
313 | m_Width: 76
314 | m_Height: 76
315 | m_Kind: 0
316 | m_SubKind: iPad
317 | - m_Textures: []
318 | m_Width: 120
319 | m_Height: 120
320 | m_Kind: 3
321 | m_SubKind: iPhone
322 | - m_Textures: []
323 | m_Width: 80
324 | m_Height: 80
325 | m_Kind: 3
326 | m_SubKind: iPhone
327 | - m_Textures: []
328 | m_Width: 80
329 | m_Height: 80
330 | m_Kind: 3
331 | m_SubKind: iPad
332 | - m_Textures: []
333 | m_Width: 40
334 | m_Height: 40
335 | m_Kind: 3
336 | m_SubKind: iPad
337 | - m_Textures: []
338 | m_Width: 87
339 | m_Height: 87
340 | m_Kind: 1
341 | m_SubKind: iPhone
342 | - m_Textures: []
343 | m_Width: 58
344 | m_Height: 58
345 | m_Kind: 1
346 | m_SubKind: iPhone
347 | - m_Textures: []
348 | m_Width: 29
349 | m_Height: 29
350 | m_Kind: 1
351 | m_SubKind: iPhone
352 | - m_Textures: []
353 | m_Width: 58
354 | m_Height: 58
355 | m_Kind: 1
356 | m_SubKind: iPad
357 | - m_Textures: []
358 | m_Width: 29
359 | m_Height: 29
360 | m_Kind: 1
361 | m_SubKind: iPad
362 | - m_Textures: []
363 | m_Width: 60
364 | m_Height: 60
365 | m_Kind: 2
366 | m_SubKind: iPhone
367 | - m_Textures: []
368 | m_Width: 40
369 | m_Height: 40
370 | m_Kind: 2
371 | m_SubKind: iPhone
372 | - m_Textures: []
373 | m_Width: 40
374 | m_Height: 40
375 | m_Kind: 2
376 | m_SubKind: iPad
377 | - m_Textures: []
378 | m_Width: 20
379 | m_Height: 20
380 | m_Kind: 2
381 | m_SubKind: iPad
382 | - m_Textures: []
383 | m_Width: 1024
384 | m_Height: 1024
385 | m_Kind: 4
386 | m_SubKind: App Store
387 | m_BuildTargetBatching:
388 | - m_BuildTarget: Standalone
389 | m_StaticBatching: 1
390 | m_DynamicBatching: 0
391 | - m_BuildTarget: tvOS
392 | m_StaticBatching: 1
393 | m_DynamicBatching: 0
394 | - m_BuildTarget: Android
395 | m_StaticBatching: 1
396 | m_DynamicBatching: 0
397 | - m_BuildTarget: iPhone
398 | m_StaticBatching: 1
399 | m_DynamicBatching: 0
400 | - m_BuildTarget: WebGL
401 | m_StaticBatching: 0
402 | m_DynamicBatching: 0
403 | m_BuildTargetShaderSettings: []
404 | m_BuildTargetGraphicsJobs:
405 | - m_BuildTarget: WindowsStandaloneSupport
406 | m_GraphicsJobs: 0
407 | - m_BuildTarget: MacStandaloneSupport
408 | m_GraphicsJobs: 0
409 | - m_BuildTarget: LinuxStandaloneSupport
410 | m_GraphicsJobs: 0
411 | - m_BuildTarget: AndroidPlayer
412 | m_GraphicsJobs: 0
413 | - m_BuildTarget: iOSSupport
414 | m_GraphicsJobs: 0
415 | - m_BuildTarget: PS4Player
416 | m_GraphicsJobs: 0
417 | - m_BuildTarget: PS5Player
418 | m_GraphicsJobs: 0
419 | - m_BuildTarget: XboxOnePlayer
420 | m_GraphicsJobs: 0
421 | - m_BuildTarget: GameCoreXboxOneSupport
422 | m_GraphicsJobs: 0
423 | - m_BuildTarget: GameCoreScarlettSupport
424 | m_GraphicsJobs: 0
425 | - m_BuildTarget: Switch
426 | m_GraphicsJobs: 0
427 | - m_BuildTarget: WebGLSupport
428 | m_GraphicsJobs: 0
429 | - m_BuildTarget: MetroSupport
430 | m_GraphicsJobs: 0
431 | - m_BuildTarget: AppleTVSupport
432 | m_GraphicsJobs: 0
433 | - m_BuildTarget: VisionOSPlayer
434 | m_GraphicsJobs: 0
435 | - m_BuildTarget: CloudRendering
436 | m_GraphicsJobs: 0
437 | - m_BuildTarget: EmbeddedLinux
438 | m_GraphicsJobs: 0
439 | - m_BuildTarget: QNX
440 | m_GraphicsJobs: 0
441 | - m_BuildTarget: ReservedCFE
442 | m_GraphicsJobs: 0
443 | m_BuildTargetGraphicsJobMode:
444 | - m_BuildTarget: PS4Player
445 | m_GraphicsJobMode: 0
446 | - m_BuildTarget: XboxOnePlayer
447 | m_GraphicsJobMode: 0
448 | m_BuildTargetGraphicsAPIs:
449 | - m_BuildTarget: AndroidPlayer
450 | m_APIs: 0b000000
451 | m_Automatic: 0
452 | - m_BuildTarget: iOSSupport
453 | m_APIs: 10000000
454 | m_Automatic: 1
455 | - m_BuildTarget: AppleTVSupport
456 | m_APIs: 10000000
457 | m_Automatic: 1
458 | - m_BuildTarget: WebGLSupport
459 | m_APIs: 0b000000
460 | m_Automatic: 1
461 | m_BuildTargetVRSettings:
462 | - m_BuildTarget: Standalone
463 | m_Enabled: 0
464 | m_Devices:
465 | - Oculus
466 | - OpenVR
467 | m_DefaultShaderChunkSizeInMB: 16
468 | m_DefaultShaderChunkCount: 0
469 | openGLRequireES31: 0
470 | openGLRequireES31AEP: 0
471 | openGLRequireES32: 0
472 | m_TemplateCustomTags: {}
473 | mobileMTRendering:
474 | Android: 1
475 | iPhone: 1
476 | tvOS: 1
477 | m_BuildTargetGroupLightmapEncodingQuality: []
478 | m_BuildTargetGroupLightmapSettings: []
479 | m_BuildTargetGroupLoadStoreDebugModeSettings: []
480 | m_BuildTargetNormalMapEncoding: []
481 | m_BuildTargetDefaultTextureCompressionFormat: []
482 | playModeTestRunnerEnabled: 0
483 | runPlayModeTestAsEditModeTest: 0
484 | actionOnDotNetUnhandledException: 1
485 | editorGfxJobOverride: 1
486 | enableInternalProfiler: 0
487 | logObjCUncaughtExceptions: 1
488 | enableCrashReportAPI: 0
489 | cameraUsageDescription:
490 | locationUsageDescription:
491 | microphoneUsageDescription:
492 | bluetoothUsageDescription:
493 | macOSTargetOSVersion: 11.0
494 | switchNMETAOverride:
495 | switchNetLibKey:
496 | switchSocketMemoryPoolSize: 6144
497 | switchSocketAllocatorPoolSize: 128
498 | switchSocketConcurrencyLimit: 14
499 | switchScreenResolutionBehavior: 2
500 | switchUseCPUProfiler: 0
501 | switchEnableFileSystemTrace: 0
502 | switchLTOSetting: 0
503 | switchApplicationID: 0x01004b9000490000
504 | switchNSODependencies:
505 | switchCompilerFlags:
506 | switchTitleNames_0:
507 | switchTitleNames_1:
508 | switchTitleNames_2:
509 | switchTitleNames_3:
510 | switchTitleNames_4:
511 | switchTitleNames_5:
512 | switchTitleNames_6:
513 | switchTitleNames_7:
514 | switchTitleNames_8:
515 | switchTitleNames_9:
516 | switchTitleNames_10:
517 | switchTitleNames_11:
518 | switchTitleNames_12:
519 | switchTitleNames_13:
520 | switchTitleNames_14:
521 | switchTitleNames_15:
522 | switchPublisherNames_0:
523 | switchPublisherNames_1:
524 | switchPublisherNames_2:
525 | switchPublisherNames_3:
526 | switchPublisherNames_4:
527 | switchPublisherNames_5:
528 | switchPublisherNames_6:
529 | switchPublisherNames_7:
530 | switchPublisherNames_8:
531 | switchPublisherNames_9:
532 | switchPublisherNames_10:
533 | switchPublisherNames_11:
534 | switchPublisherNames_12:
535 | switchPublisherNames_13:
536 | switchPublisherNames_14:
537 | switchPublisherNames_15:
538 | switchIcons_0: {fileID: 0}
539 | switchIcons_1: {fileID: 0}
540 | switchIcons_2: {fileID: 0}
541 | switchIcons_3: {fileID: 0}
542 | switchIcons_4: {fileID: 0}
543 | switchIcons_5: {fileID: 0}
544 | switchIcons_6: {fileID: 0}
545 | switchIcons_7: {fileID: 0}
546 | switchIcons_8: {fileID: 0}
547 | switchIcons_9: {fileID: 0}
548 | switchIcons_10: {fileID: 0}
549 | switchIcons_11: {fileID: 0}
550 | switchIcons_12: {fileID: 0}
551 | switchIcons_13: {fileID: 0}
552 | switchIcons_14: {fileID: 0}
553 | switchIcons_15: {fileID: 0}
554 | switchSmallIcons_0: {fileID: 0}
555 | switchSmallIcons_1: {fileID: 0}
556 | switchSmallIcons_2: {fileID: 0}
557 | switchSmallIcons_3: {fileID: 0}
558 | switchSmallIcons_4: {fileID: 0}
559 | switchSmallIcons_5: {fileID: 0}
560 | switchSmallIcons_6: {fileID: 0}
561 | switchSmallIcons_7: {fileID: 0}
562 | switchSmallIcons_8: {fileID: 0}
563 | switchSmallIcons_9: {fileID: 0}
564 | switchSmallIcons_10: {fileID: 0}
565 | switchSmallIcons_11: {fileID: 0}
566 | switchSmallIcons_12: {fileID: 0}
567 | switchSmallIcons_13: {fileID: 0}
568 | switchSmallIcons_14: {fileID: 0}
569 | switchSmallIcons_15: {fileID: 0}
570 | switchManualHTML:
571 | switchAccessibleURLs:
572 | switchLegalInformation:
573 | switchMainThreadStackSize: 1048576
574 | switchPresenceGroupId:
575 | switchLogoHandling: 0
576 | switchReleaseVersion: 0
577 | switchDisplayVersion: 1.0.0
578 | switchStartupUserAccount: 0
579 | switchSupportedLanguagesMask: 0
580 | switchLogoType: 0
581 | switchApplicationErrorCodeCategory:
582 | switchUserAccountSaveDataSize: 0
583 | switchUserAccountSaveDataJournalSize: 0
584 | switchApplicationAttribute: 0
585 | switchCardSpecSize: -1
586 | switchCardSpecClock: -1
587 | switchRatingsMask: 0
588 | switchRatingsInt_0: 0
589 | switchRatingsInt_1: 0
590 | switchRatingsInt_2: 0
591 | switchRatingsInt_3: 0
592 | switchRatingsInt_4: 0
593 | switchRatingsInt_5: 0
594 | switchRatingsInt_6: 0
595 | switchRatingsInt_7: 0
596 | switchRatingsInt_8: 0
597 | switchRatingsInt_9: 0
598 | switchRatingsInt_10: 0
599 | switchRatingsInt_11: 0
600 | switchRatingsInt_12: 0
601 | switchLocalCommunicationIds_0:
602 | switchLocalCommunicationIds_1:
603 | switchLocalCommunicationIds_2:
604 | switchLocalCommunicationIds_3:
605 | switchLocalCommunicationIds_4:
606 | switchLocalCommunicationIds_5:
607 | switchLocalCommunicationIds_6:
608 | switchLocalCommunicationIds_7:
609 | switchParentalControl: 0
610 | switchAllowsScreenshot: 1
611 | switchAllowsVideoCapturing: 1
612 | switchAllowsRuntimeAddOnContentInstall: 0
613 | switchDataLossConfirmation: 0
614 | switchUserAccountLockEnabled: 0
615 | switchSystemResourceMemory: 16777216
616 | switchSupportedNpadStyles: 3
617 | switchNativeFsCacheSize: 32
618 | switchIsHoldTypeHorizontal: 0
619 | switchSupportedNpadCount: 8
620 | switchEnableTouchScreen: 1
621 | switchSocketConfigEnabled: 0
622 | switchTcpInitialSendBufferSize: 32
623 | switchTcpInitialReceiveBufferSize: 64
624 | switchTcpAutoSendBufferSizeMax: 256
625 | switchTcpAutoReceiveBufferSizeMax: 256
626 | switchUdpSendBufferSize: 9
627 | switchUdpReceiveBufferSize: 42
628 | switchSocketBufferEfficiency: 4
629 | switchSocketInitializeEnabled: 1
630 | switchNetworkInterfaceManagerInitializeEnabled: 1
631 | switchDisableHTCSPlayerConnection: 0
632 | switchUseNewStyleFilepaths: 1
633 | switchUseLegacyFmodPriorities: 0
634 | switchUseMicroSleepForYield: 1
635 | switchEnableRamDiskSupport: 0
636 | switchMicroSleepForYieldTime: 25
637 | switchRamDiskSpaceSize: 12
638 | switchUpgradedPlayerSettingsToNMETA: 0
639 | ps4NPAgeRating: 12
640 | ps4NPTitleSecret:
641 | ps4NPTrophyPackPath:
642 | ps4ParentalLevel: 11
643 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000
644 | ps4Category: 0
645 | ps4MasterVersion: 01.00
646 | ps4AppVersion: 01.00
647 | ps4AppType: 0
648 | ps4ParamSfxPath:
649 | ps4VideoOutPixelFormat: 0
650 | ps4VideoOutInitialWidth: 1920
651 | ps4VideoOutBaseModeInitialWidth: 1920
652 | ps4VideoOutReprojectionRate: 60
653 | ps4PronunciationXMLPath:
654 | ps4PronunciationSIGPath:
655 | ps4BackgroundImagePath:
656 | ps4StartupImagePath:
657 | ps4StartupImagesFolder:
658 | ps4IconImagesFolder:
659 | ps4SaveDataImagePath:
660 | ps4SdkOverride:
661 | ps4BGMPath:
662 | ps4ShareFilePath:
663 | ps4ShareOverlayImagePath:
664 | ps4PrivacyGuardImagePath:
665 | ps4ExtraSceSysFile:
666 | ps4NPtitleDatPath:
667 | ps4RemotePlayKeyAssignment: -1
668 | ps4RemotePlayKeyMappingDir:
669 | ps4PlayTogetherPlayerCount: 0
670 | ps4EnterButtonAssignment: 1
671 | ps4ApplicationParam1: 0
672 | ps4ApplicationParam2: 0
673 | ps4ApplicationParam3: 0
674 | ps4ApplicationParam4: 0
675 | ps4DownloadDataSize: 0
676 | ps4GarlicHeapSize: 2048
677 | ps4ProGarlicHeapSize: 2560
678 | playerPrefsMaxSize: 32768
679 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
680 | ps4pnSessions: 1
681 | ps4pnPresence: 1
682 | ps4pnFriends: 1
683 | ps4pnGameCustomData: 1
684 | playerPrefsSupport: 0
685 | enableApplicationExit: 0
686 | resetTempFolder: 1
687 | restrictedAudioUsageRights: 0
688 | ps4UseResolutionFallback: 0
689 | ps4ReprojectionSupport: 0
690 | ps4UseAudio3dBackend: 0
691 | ps4UseLowGarlicFragmentationMode: 1
692 | ps4SocialScreenEnabled: 0
693 | ps4ScriptOptimizationLevel: 0
694 | ps4Audio3dVirtualSpeakerCount: 14
695 | ps4attribCpuUsage: 0
696 | ps4PatchPkgPath:
697 | ps4PatchLatestPkgPath:
698 | ps4PatchChangeinfoPath:
699 | ps4PatchDayOne: 0
700 | ps4attribUserManagement: 0
701 | ps4attribMoveSupport: 0
702 | ps4attrib3DSupport: 0
703 | ps4attribShareSupport: 0
704 | ps4attribExclusiveVR: 0
705 | ps4disableAutoHideSplash: 0
706 | ps4videoRecordingFeaturesUsed: 0
707 | ps4contentSearchFeaturesUsed: 0
708 | ps4CompatibilityPS5: 0
709 | ps4AllowPS5Detection: 0
710 | ps4GPU800MHz: 1
711 | ps4attribEyeToEyeDistanceSettingVR: 0
712 | ps4IncludedModules: []
713 | ps4attribVROutputEnabled: 0
714 | monoEnv:
715 | splashScreenBackgroundSourceLandscape: {fileID: 0}
716 | splashScreenBackgroundSourcePortrait: {fileID: 0}
717 | blurSplashScreenBackground: 1
718 | spritePackerPolicy:
719 | webGLMemorySize: 256
720 | webGLExceptionSupport: 1
721 | webGLNameFilesAsHashes: 0
722 | webGLShowDiagnostics: 0
723 | webGLDataCaching: 1
724 | webGLDebugSymbols: 0
725 | webGLEmscriptenArgs:
726 | webGLModulesDirectory:
727 | webGLTemplate: APPLICATION:Default
728 | webGLAnalyzeBuildSize: 0
729 | webGLUseEmbeddedResources: 0
730 | webGLCompressionFormat: 1
731 | webGLWasmArithmeticExceptions: 0
732 | webGLLinkerTarget: 1
733 | webGLThreadsSupport: 0
734 | webGLDecompressionFallback: 0
735 | webGLInitialMemorySize: 32
736 | webGLMaximumMemorySize: 2048
737 | webGLMemoryGrowthMode: 2
738 | webGLMemoryLinearGrowthStep: 16
739 | webGLMemoryGeometricGrowthStep: 0.2
740 | webGLMemoryGeometricGrowthCap: 96
741 | webGLEnableWebGPU: 0
742 | webGLPowerPreference: 2
743 | webGLWebAssemblyTable: 0
744 | webGLWebAssemblyBigInt: 0
745 | webGLCloseOnQuit: 0
746 | webWasm2023: 0
747 | scriptingDefineSymbols: {}
748 | additionalCompilerArguments: {}
749 | platformArchitecture: {}
750 | scriptingBackend:
751 | Android: 0
752 | il2cppCompilerConfiguration: {}
753 | il2cppCodeGeneration: {}
754 | il2cppStacktraceInformation: {}
755 | managedStrippingLevel:
756 | Android: 1
757 | EmbeddedLinux: 1
758 | GameCoreScarlett: 1
759 | GameCoreXboxOne: 1
760 | Nintendo Switch: 1
761 | PS4: 1
762 | PS5: 1
763 | QNX: 1
764 | ReservedCFE: 1
765 | VisionOS: 1
766 | WebGL: 1
767 | Windows Store Apps: 1
768 | XboxOne: 1
769 | iPhone: 1
770 | tvOS: 1
771 | incrementalIl2cppBuild: {}
772 | suppressCommonWarnings: 1
773 | allowUnsafeCode: 0
774 | useDeterministicCompilation: 1
775 | additionalIl2CppArgs:
776 | scriptingRuntimeVersion: 1
777 | gcIncremental: 1
778 | gcWBarrierValidation: 0
779 | apiCompatibilityLevelPerPlatform: {}
780 | editorAssembliesCompatibilityLevel: 1
781 | m_RenderingPath: 1
782 | m_MobileRenderingPath: 1
783 | metroPackageName: Template_3D
784 | metroPackageVersion:
785 | metroCertificatePath:
786 | metroCertificatePassword:
787 | metroCertificateSubject:
788 | metroCertificateIssuer:
789 | metroCertificateNotAfter: 0000000000000000
790 | metroApplicationDescription: Template_3D
791 | wsaImages: {}
792 | metroTileShortName:
793 | metroTileShowName: 0
794 | metroMediumTileShowName: 0
795 | metroLargeTileShowName: 0
796 | metroWideTileShowName: 0
797 | metroSupportStreamingInstall: 0
798 | metroLastRequiredScene: 0
799 | metroDefaultTileSize: 1
800 | metroTileForegroundText: 2
801 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
802 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628,
803 | a: 1}
804 | metroSplashScreenUseBackgroundColor: 0
805 | syncCapabilities: 0
806 | platformCapabilities: {}
807 | metroTargetDeviceFamilies: {}
808 | metroFTAName:
809 | metroFTAFileTypes: []
810 | metroProtocolName:
811 | vcxProjDefaultLanguage:
812 | XboxOneProductId:
813 | XboxOneUpdateKey:
814 | XboxOneSandboxId:
815 | XboxOneContentId:
816 | XboxOneTitleId:
817 | XboxOneSCId:
818 | XboxOneGameOsOverridePath:
819 | XboxOnePackagingOverridePath:
820 | XboxOneAppManifestOverridePath:
821 | XboxOneVersion: 1.0.0.0
822 | XboxOnePackageEncryption: 0
823 | XboxOnePackageUpdateGranularity: 2
824 | XboxOneDescription:
825 | XboxOneLanguage:
826 | - enus
827 | XboxOneCapability: []
828 | XboxOneGameRating: {}
829 | XboxOneIsContentPackage: 0
830 | XboxOneEnhancedXboxCompatibilityMode: 0
831 | XboxOneEnableGPUVariability: 1
832 | XboxOneSockets: {}
833 | XboxOneSplashScreen: {fileID: 0}
834 | XboxOneAllowedProductIds: []
835 | XboxOnePersistentLocalStorageSize: 0
836 | XboxOneXTitleMemory: 8
837 | XboxOneOverrideIdentityName:
838 | XboxOneOverrideIdentityPublisher:
839 | vrEditorSettings: {}
840 | cloudServicesEnabled:
841 | UNet: 1
842 | luminIcon:
843 | m_Name:
844 | m_ModelFolderPath:
845 | m_PortalFolderPath:
846 | luminCert:
847 | m_CertPath:
848 | m_SignPackage: 1
849 | luminIsChannelApp: 0
850 | luminVersion:
851 | m_VersionCode: 1
852 | m_VersionName:
853 | hmiPlayerDataPath:
854 | hmiForceSRGBBlit: 0
855 | embeddedLinuxEnableGamepadInput: 0
856 | hmiCpuConfiguration:
857 | hmiLogStartupTiming: 0
858 | qnxGraphicConfPath:
859 | apiCompatibilityLevel: 6
860 | captureStartupLogs: {}
861 | activeInputHandler: 0
862 | windowsGamepadBackendHint: 0
863 | cloudProjectId:
864 | framebufferDepthMemorylessMode: 0
865 | qualitySettingsNames: []
866 | projectName:
867 | organizationId:
868 | cloudEnabled: 0
869 | legacyClampBlendShapeWeights: 0
870 | hmiLoadingImage: {fileID: 0}
871 | platformRequiresReadableAssets: 0
872 | virtualTexturingSupportEnabled: 0
873 | insecureHttpOption: 0
874 | androidVulkanDenyFilterList: []
875 | androidVulkanAllowFilterList: []
876 |
--------------------------------------------------------------------------------