From 1c48191eb7213f2199c78831e35ea4fdf441ac9c Mon Sep 17 00:00:00 2001 From: yasirkula Date: Tue, 21 Sep 2021 14:20:15 +0300 Subject: [PATCH] Fixed GetVideoProperties returning wrong 'rotation' in some languages --- Plugins/TextureOps/TextureOps.cs | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/TextureOps/TextureOps.cs b/Plugins/TextureOps/TextureOps.cs index 8b6511c..be861f3 100644 --- a/Plugins/TextureOps/TextureOps.cs +++ b/Plugins/TextureOps/TextureOps.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; using System.IO; using UnityEngine; using Object = UnityEngine.Object; @@ -572,7 +573,7 @@ public static VideoProperties GetVideoProperties( string videoPath ) height = 0; if( !long.TryParse( properties[2].Trim(), out duration ) ) duration = 0L; - if( !float.TryParse( properties[3].Trim(), out rotation ) ) + if( !float.TryParse( properties[3].Trim().Replace( ',', '.' ), NumberStyles.Float, CultureInfo.InvariantCulture, out rotation ) ) rotation = 0f; } } diff --git a/package.json b/package.json index 09c13f3..cd3ef5d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.yasirkula.textureops", "displayName": "Texture Ops", - "version": "1.1.4", + "version": "1.1.5", "documentationUrl": "https://github.com/yasirkula/UnityTextureOps", "changelogUrl": "https://github.com/yasirkula/UnityTextureOps/releases", "licensesUrl": "https://github.com/yasirkula/UnityTextureOps/blob/master/LICENSE.txt",