diff --git a/Assets/Scripts/Assembly-CSharp/MobileMovieTexture.cs b/Assets/Scripts/Assembly-CSharp/MobileMovieTexture.cs index 82a6326ab..36caf5c6d 100644 --- a/Assets/Scripts/Assembly-CSharp/MobileMovieTexture.cs +++ b/Assets/Scripts/Assembly-CSharp/MobileMovieTexture.cs @@ -201,7 +201,7 @@ public class MobileMovieTexture : MonoBehaviour { path = Application.streamingAssetsPath + "/JP" + this.m_path; }*/ - path = HelperFunctions.CreateFilePath(this.m_path).TrimStart('/'); + path = HelperFunctions.CreateFilePath(this.m_path); Debug.LogWarning(path); num = 0L; diff --git a/Assets/Scripts/Assembly-CSharp/MovieManager.cs b/Assets/Scripts/Assembly-CSharp/MovieManager.cs index 26fece376..dfd467cdf 100644 --- a/Assets/Scripts/Assembly-CSharp/MovieManager.cs +++ b/Assets/Scripts/Assembly-CSharp/MovieManager.cs @@ -49,7 +49,7 @@ public static class MovieManager url = Application.streamingAssetsPath + "/JP/" + path + ".webm"; } m_tex.url = url;*/ - m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm").TrimStart('/'); + m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm"); m_tex.isLooping = false; movieFrame.SetMaterial(newMat, 960, 544); m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride; diff --git a/Assets/Scripts/Assembly-CSharp/MovieTex.cs b/Assets/Scripts/Assembly-CSharp/MovieTex.cs index 0378f6539..d63783970 100644 --- a/Assets/Scripts/Assembly-CSharp/MovieTex.cs +++ b/Assets/Scripts/Assembly-CSharp/MovieTex.cs @@ -50,7 +50,7 @@ public class MovieTex : MonoBehaviour url = Application.streamingAssetsPath + "/JP" + path + ".webm"; } this.m_tex.url = "file:///" + url;*/ - this.m_tex.url = HelperFunctions.CreateFilePath(path + ".webm").TrimStart('/'); + this.m_tex.url = HelperFunctions.CreateFilePath(path + ".webm"); this.m_tex.isLooping = isLoop; this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride; //this.m_tex.targetMaterialRenderer = newMat; diff --git a/Assets/Scripts/Assembly-CSharp/Pathing.cs b/Assets/Scripts/Assembly-CSharp/Pathing.cs index 0c06271eb..6ffb98b10 100644 --- a/Assets/Scripts/Assembly-CSharp/Pathing.cs +++ b/Assets/Scripts/Assembly-CSharp/Pathing.cs @@ -9,17 +9,17 @@ public static class Pathing { get { - string locale = "/JP/"; + string locale = "/JP"; switch (UnityApp.Instance.locale) { case Assets.Scripts.LocaleEnum.English: - locale = "/EN/"; + locale = "/EN"; break; case Assets.Scripts.LocaleEnum.Spanish: - locale = "/SP/"; + locale = "/SP"; break; default: - locale = "/JP/"; + locale = "/JP"; break; } return Application.streamingAssetsPath + locale; @@ -42,7 +42,7 @@ public static class Pathing { get { - string path = BaseContentPath.TrimStart('/'); + string path = BaseContentPath; if(Application.platform == RuntimePlatform.Android) { string url = path; diff --git a/Assets/Scripts/Assembly-CSharp/UnityFile.cs b/Assets/Scripts/Assembly-CSharp/UnityFile.cs index 8498ed458..deaac5f50 100644 --- a/Assets/Scripts/Assembly-CSharp/UnityFile.cs +++ b/Assets/Scripts/Assembly-CSharp/UnityFile.cs @@ -133,7 +133,7 @@ public class UnityFile name = Pathing.ToPlatformAssetBundleName(name); } //string text = Pathing.appContentDataPath + localpath + name; - string text = (HelperFunctions.CreateFilePath(("/" + localpath.TrimStart('/') + name))).TrimStart('/'); + string text = HelperFunctions.CreateFilePath(("/" + localpath+ name)); Debug.LogWarning("Loader: "+ text); return text; } @@ -195,7 +195,7 @@ public class UnityFile { if (Application.platform == RuntimePlatform.Android) { - string url = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png").TrimStart('/'); + string url = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png"); Debug.LogWarning(url); UnityWebRequest request = UnityWebRequest.Get(url); @@ -216,7 +216,7 @@ public class UnityFile else { //string updatedPath = StaticFunctions.createFilePath(m_szPath + m_szName + ".png"); - string updatedPath = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png").TrimStart('/'); + string updatedPath = HelperFunctions.CreateFilePath(m_szPath + m_szName + ".png"); //Debug.LogWarning(updatedPath); /*string updatedPath = Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png"; if (!System.IO.File.Exists(updatedPath)) diff --git a/Assets/Scripts/Assembly-CSharp/UnityGraph.cs b/Assets/Scripts/Assembly-CSharp/UnityGraph.cs index 1ee94f2a6..886370f2a 100644 --- a/Assets/Scripts/Assembly-CSharp/UnityGraph.cs +++ b/Assets/Scripts/Assembly-CSharp/UnityGraph.cs @@ -369,7 +369,7 @@ public class UnityGraph : Singleton }*/ //m_tex.url = Pathing.BaseContentPath + path + ".webm"; //m_tex.url = url; - m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + ".webm").TrimStart('/'); + m_tex.url = HelperFunctions.CreateFilePath("/" + path.TrimStart('/') + ".webm"); m_tex.isLooping = false; movieFrame.SetMaterial(newMat, 960, 544); m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride; diff --git a/Assets/Scripts/HelperFunctions.cs b/Assets/Scripts/HelperFunctions.cs index 872bf3808..151ef0d46 100644 --- a/Assets/Scripts/HelperFunctions.cs +++ b/Assets/Scripts/HelperFunctions.cs @@ -10,22 +10,22 @@ public static class HelperFunctions string updatedPath = ""; if (Application.platform != RuntimePlatform.Android) { - updatedPath = Pathing.BaseContentPath.TrimEnd('/') + pathAdditions; + updatedPath = Pathing.BaseContentPath + pathAdditions; if (!System.IO.File.Exists(updatedPath)) { - updatedPath = Application.streamingAssetsPath.TrimEnd('/') + "/JP" + pathAdditions; + updatedPath = Application.streamingAssetsPath + "/JP" + pathAdditions; } } else { - updatedPath = (Pathing.BaseContentPath.TrimEnd('/').TrimStart('/') + pathAdditions).TrimStart('/'); + updatedPath = (Pathing.BaseContentPath + pathAdditions); WWW reader = new WWW(updatedPath); while (!reader.isDone) { } if (reader.bytes == null) { - updatedPath = (Application.streamingAssetsPath.TrimEnd('/').TrimStart('/') + "/JP" + pathAdditions).TrimStart('/'); + updatedPath = (Application.streamingAssetsPath + "/JP" + pathAdditions); } } Debug.LogWarning("creating path: " + updatedPath);