From 39fe6ed1a7c2f96fbb375c4d34970edacf25f97f Mon Sep 17 00:00:00 2001 From: unknown <john.schihada@hotmail.com> Date: Fri, 13 Mar 2020 21:58:09 +0100 Subject: [PATCH] Adjusted Global CultureInfo(en-US) --- Assets/InteractionEngine/FactSpawner.cs | 4 ++-- Assets/InteractionEngine/WorldCursor.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/InteractionEngine/FactSpawner.cs b/Assets/InteractionEngine/FactSpawner.cs index 5c7bc2ce..79189f14 100644 --- a/Assets/InteractionEngine/FactSpawner.cs +++ b/Assets/InteractionEngine/FactSpawner.cs @@ -92,7 +92,7 @@ public void SpawnLine(LineFact lineFact) //string letter = ((Char)(64 + lineFact.Id + 1)).ToString(); //line.GetComponentInChildren<TextMeshPro>().text = letter; line.GetComponentInChildren<TextMeshPro>().text = ((Char)(64 + pointFact1.Id + 1)).ToString() + ((Char)(64 + pointFact2.Id + 1)).ToString(); - line.GetComponentInChildren<TextMeshPro>().text += " = " + Math.Round((point1-point2).magnitude, 2).ToString().Replace(",", ".") + " m"; + line.GetComponentInChildren<TextMeshPro>().text += " = " + Math.Round((point1-point2).magnitude, 2) + " m"; line.GetComponentInChildren<FactObject>().Id = lineFact.Id; //If a new Line was spawned -> We are in CreateLineMode -> Then we want the collider to be disabled if (CommunicationEvents.ActiveToolMode != ToolMode.ExtraMode) @@ -226,7 +226,7 @@ public void SpawnAngle(AngleFact angleFact) TextMeshPro[] texts = angle.GetComponentsInChildren<TextMeshPro>(); foreach (TextMeshPro t in texts) { //Change Text not to the id, but to the angle-value (from both sides) AND change font-size relative to length of the angle (from both sides) - t.text = Math.Abs(Math.Round(Vector3.Angle((point1 - point2).normalized, (point3 - point2).normalized), 1)).ToString().Replace(",", ".") + "°"; + t.text = Math.Abs(Math.Round(Vector3.Angle((point1 - point2).normalized, (point3 - point2).normalized), 1)) + "°"; t.fontSize = angle.GetComponentInChildren<TextMeshPro>().fontSize * angle.transform.GetChild(0).transform.GetChild(0).localScale.x; } diff --git a/Assets/InteractionEngine/WorldCursor.cs b/Assets/InteractionEngine/WorldCursor.cs index 88d3ceca..8878fc18 100644 --- a/Assets/InteractionEngine/WorldCursor.cs +++ b/Assets/InteractionEngine/WorldCursor.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -18,7 +19,7 @@ void Start() //Set MarkPointMode as the default ActiveToolMode // ActiveToolMode = ToolMode.ExtraMode;//ToolMode.MarkPointMode; CommunicationEvents.ToolModeChangedEvent.Invoke(ActiveToolMode); - + CultureInfo.CurrentCulture = new CultureInfo("en-US"); } -- GitLab