Skip to content

Commit 00e78b1

Browse files
authored
fix: colliders meshes are case sentive in SDK7 (ignore case comparison not working due to Unity Bug) (#5676)
fix: ignore case comparison not working due to Unity Bug
1 parent bd707ba commit 00e78b1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/GltfContainerCollidersHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private void SetVisibleMeshesColliders(IReadOnlyCollection<Renderer> renderers)
144144
// Compatibility layer for old GLTF importer and GLTFast
145145
private static bool IsCollider(MeshFilter meshFilter)
146146
{
147-
const StringComparison IGNORE_CASE = StringComparison.CurrentCultureIgnoreCase;
147+
const StringComparison IGNORE_CASE = StringComparison.OrdinalIgnoreCase;
148148
const string COLLIDER_SUFFIX = "_collider";
149149

150150
return meshFilter.name.Contains(COLLIDER_SUFFIX, IGNORE_CASE)

unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/GltfContainer/Tests/GltfContainerCollidersShould.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public IEnumerator NotCreateVisibleCollidersAsDefault()
315315

316316
private static bool HasColliderName(Collider collider)
317317
{
318-
const StringComparison IGNORE_CASE = StringComparison.CurrentCultureIgnoreCase;
318+
const StringComparison IGNORE_CASE = StringComparison.OrdinalIgnoreCase;
319319

320320
return collider.name.Contains("_collider", IGNORE_CASE)
321321
|| collider.transform.parent.name.Contains("_collider", IGNORE_CASE);

unity-renderer/Assets/DCLPlugins/ECS7/Utils/Scene/Media.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static bool IsUrlDomainAllowed(IReadOnlyList<string> allowedDomains, stri
2929
{
3030
for (int i = 0; i < allowedDomains.Count; i++)
3131
{
32-
if (String.Equals(allowedDomains[i], uri.Host, StringComparison.CurrentCultureIgnoreCase))
32+
if (String.Equals(allowedDomains[i], uri.Host, StringComparison.OrdinalIgnoreCase))
3333
return true;
3434
}
3535
}

0 commit comments

Comments
 (0)