Skip to content

Commit df139c3

Browse files
Update ToF AR Samples Basic V1.3.1
1 parent d1e8b8c commit df139c3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

Assets/TofArSamplesBasic/Tof/Scripts/SaveFromRegion.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
33
*
4-
* Copyright 2022 Sony Semiconductor Solutions Corporation.
4+
* Copyright 2022,2023 Sony Semiconductor Solutions Corporation.
55
*
66
*/
77

@@ -150,11 +150,11 @@ void Start()
150150
{
151151
if (setting.useDepthInvalidValueConvert == "true")
152152
{
153-
invalidValue = int.Parse(setting.depthInvalidValueTo);
153+
invalidValue = int.Parse(setting.depthInvalidValueTo, System.Globalization.CultureInfo.InvariantCulture);
154154
}
155155
else
156156
{
157-
invalidValue = int.Parse(setting.depthInvalidValueFrom);
157+
invalidValue = int.Parse(setting.depthInvalidValueFrom, System.Globalization.CultureInfo.InvariantCulture);
158158
}
159159
}
160160
}
@@ -170,11 +170,11 @@ void Start()
170170
{
171171
if (jsonValuesOld.useDepthInvalidValueConvert == "true")
172172
{
173-
invalidValue = int.Parse(jsonValuesOld.depthInvalidValueTo);
173+
invalidValue = int.Parse(jsonValuesOld.depthInvalidValueTo, System.Globalization.CultureInfo.InvariantCulture);
174174
}
175175
else
176176
{
177-
invalidValue = int.Parse(jsonValuesOld.depthInvalidValueFrom);
177+
invalidValue = int.Parse(jsonValuesOld.depthInvalidValueFrom, System.Globalization.CultureInfo.InvariantCulture);
178178
}
179179
}
180180
else

Assets/TofArSettings.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/TofArSettings/Scripts/Common/Parts/ItemInputField.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
33
*
4-
* Copyright 2022 Sony Semiconductor Solutions Corporation.
4+
* Copyright 2022,2023 Sony Semiconductor Solutions Corporation.
55
*
66
*/
77

@@ -62,7 +62,7 @@ public int IntValue
6262
{
6363
get
6464
{
65-
if (int.TryParse(Value, out int v))
65+
if (int.TryParse(Value, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out int v))
6666
{
6767
return v;
6868
}
@@ -78,7 +78,7 @@ public float FloatValue
7878
{
7979
get
8080
{
81-
if (float.TryParse(Value, out float v))
81+
if (float.TryParse(Value, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out float v))
8282
{
8383
return v;
8484
}
@@ -297,7 +297,7 @@ bool CheckRange(string val)
297297
return true;
298298
}
299299

300-
if (float.TryParse(val, out float v))
300+
if (float.TryParse(val, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out float v))
301301
{
302302
return (Min <= v && v <= Max);
303303
}

Assets/TofArSettings/Scripts/Common/Parts/ItemSlider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
33
*
4-
* Copyright 2022 Sony Semiconductor Solutions Corporation.
4+
* Copyright 2022,2023 Sony Semiconductor Solutions Corporation.
55
*
66
*/
77

@@ -37,7 +37,7 @@ public float Value
3737
if (val != value && CheckRange(value))
3838
{
3939
val = value;
40-
itemInput.Value = val.ToString();
40+
itemInput.Value = val.ToString(System.Globalization.CultureInfo.InvariantCulture);
4141
adjuster.Value = val;
4242
slider.value = adjuster.PlainValue;
4343

@@ -104,7 +104,7 @@ public float Step
104104
set
105105
{
106106
// Count the number of decimal places and set them in Adjuster
107-
string str = value.ToString();
107+
string str = value.ToString(System.Globalization.CultureInfo.InvariantCulture);
108108
string[] split = str.Split('.');
109109
adjuster.DecimalDigit = (split.Length > 1) ?
110110
split[1].Length : 0;
@@ -261,7 +261,7 @@ bool CheckRange(float val)
261261
/// </summary>
262262
void SetRangeText()
263263
{
264-
itemInput.TxtRange.text = $"{Min} ~ {Max} , step = {Step}";
264+
itemInput.TxtRange.text = System.FormattableString.Invariant($"{Min} ~ {Max} , step = {Step}");
265265
}
266266
}
267267
}

Assets/TofArSettings/Scripts/Hand/Info/HandPoseInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
281281
if (attr != null)
282282
{
283283
var enumNames = Enum.GetNames(attr.customType);
284-
if (int.TryParse(property.propertyPath.Split('[', ']')[1], out int idx))
284+
if (int.TryParse(property.propertyPath.Split('[', ']')[1], System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out int idx))
285285
{
286286
label = new GUIContent(enumNames[idx]);
287287
}

ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ PlayerSettings:
134134
16:10: 1
135135
16:9: 1
136136
Others: 1
137-
bundleVersion: 1.3.0
137+
bundleVersion: 1.3.1
138138
preloadedAssets: []
139139
metroInputSource: 0
140140
wsaTransparentSwapchain: 0

0 commit comments

Comments
 (0)