remove unneeded trims
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -369,7 +369,7 @@ public class UnityGraph : Singleton<UnityGraph>
|
||||
}*/
|
||||
//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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user