remove unneeded trims
This commit is contained in:
@@ -201,7 +201,7 @@ public class MobileMovieTexture : MonoBehaviour
|
|||||||
{
|
{
|
||||||
path = Application.streamingAssetsPath + "/JP" + this.m_path;
|
path = Application.streamingAssetsPath + "/JP" + this.m_path;
|
||||||
}*/
|
}*/
|
||||||
path = HelperFunctions.CreateFilePath(this.m_path).TrimStart('/');
|
path = HelperFunctions.CreateFilePath(this.m_path);
|
||||||
Debug.LogWarning(path);
|
Debug.LogWarning(path);
|
||||||
|
|
||||||
num = 0L;
|
num = 0L;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public static class MovieManager
|
|||||||
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
|
url = Application.streamingAssetsPath + "/JP/" + path + ".webm";
|
||||||
}
|
}
|
||||||
m_tex.url = url;*/
|
m_tex.url = url;*/
|
||||||
m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm").TrimStart('/');
|
m_tex.url = HelperFunctions.CreateFilePath("/" + path + ".webm");
|
||||||
m_tex.isLooping = false;
|
m_tex.isLooping = false;
|
||||||
movieFrame.SetMaterial(newMat, 960, 544);
|
movieFrame.SetMaterial(newMat, 960, 544);
|
||||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class MovieTex : MonoBehaviour
|
|||||||
url = Application.streamingAssetsPath + "/JP" + path + ".webm";
|
url = Application.streamingAssetsPath + "/JP" + path + ".webm";
|
||||||
}
|
}
|
||||||
this.m_tex.url = "file:///" + url;*/
|
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.isLooping = isLoop;
|
||||||
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
this.m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||||
//this.m_tex.targetMaterialRenderer = newMat;
|
//this.m_tex.targetMaterialRenderer = newMat;
|
||||||
|
|||||||
@@ -9,17 +9,17 @@ public static class Pathing
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string locale = "/JP/";
|
string locale = "/JP";
|
||||||
switch (UnityApp.Instance.locale)
|
switch (UnityApp.Instance.locale)
|
||||||
{
|
{
|
||||||
case Assets.Scripts.LocaleEnum.English:
|
case Assets.Scripts.LocaleEnum.English:
|
||||||
locale = "/EN/";
|
locale = "/EN";
|
||||||
break;
|
break;
|
||||||
case Assets.Scripts.LocaleEnum.Spanish:
|
case Assets.Scripts.LocaleEnum.Spanish:
|
||||||
locale = "/SP/";
|
locale = "/SP";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
locale = "/JP/";
|
locale = "/JP";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Application.streamingAssetsPath + locale;
|
return Application.streamingAssetsPath + locale;
|
||||||
@@ -42,7 +42,7 @@ public static class Pathing
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string path = BaseContentPath.TrimStart('/');
|
string path = BaseContentPath;
|
||||||
if(Application.platform == RuntimePlatform.Android)
|
if(Application.platform == RuntimePlatform.Android)
|
||||||
{
|
{
|
||||||
string url = path;
|
string url = path;
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class UnityFile
|
|||||||
name = Pathing.ToPlatformAssetBundleName(name);
|
name = Pathing.ToPlatformAssetBundleName(name);
|
||||||
}
|
}
|
||||||
//string text = Pathing.appContentDataPath + localpath + 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);
|
Debug.LogWarning("Loader: "+ text);
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ public class UnityFile
|
|||||||
{
|
{
|
||||||
if (Application.platform == RuntimePlatform.Android)
|
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);
|
Debug.LogWarning(url);
|
||||||
UnityWebRequest request = UnityWebRequest.Get(url);
|
UnityWebRequest request = UnityWebRequest.Get(url);
|
||||||
@@ -216,7 +216,7 @@ public class UnityFile
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//string updatedPath = StaticFunctions.createFilePath(m_szPath + m_szName + ".png");
|
//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);
|
//Debug.LogWarning(updatedPath);
|
||||||
/*string updatedPath = Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png";
|
/*string updatedPath = Pathing.BaseContentPath.TrimEnd('/') + m_szPath + m_szName + ".png";
|
||||||
if (!System.IO.File.Exists(updatedPath))
|
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 = Pathing.BaseContentPath + path + ".webm";
|
||||||
//m_tex.url = url;
|
//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;
|
m_tex.isLooping = false;
|
||||||
movieFrame.SetMaterial(newMat, 960, 544);
|
movieFrame.SetMaterial(newMat, 960, 544);
|
||||||
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
m_tex.renderMode = UnityEngine.Video.VideoRenderMode.MaterialOverride;
|
||||||
|
|||||||
@@ -10,22 +10,22 @@ public static class HelperFunctions
|
|||||||
string updatedPath = "";
|
string updatedPath = "";
|
||||||
if (Application.platform != RuntimePlatform.Android)
|
if (Application.platform != RuntimePlatform.Android)
|
||||||
{
|
{
|
||||||
updatedPath = Pathing.BaseContentPath.TrimEnd('/') + pathAdditions;
|
updatedPath = Pathing.BaseContentPath + pathAdditions;
|
||||||
if (!System.IO.File.Exists(updatedPath))
|
if (!System.IO.File.Exists(updatedPath))
|
||||||
{
|
{
|
||||||
updatedPath = Application.streamingAssetsPath.TrimEnd('/') + "/JP" + pathAdditions;
|
updatedPath = Application.streamingAssetsPath + "/JP" + pathAdditions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
updatedPath = (Pathing.BaseContentPath.TrimEnd('/').TrimStart('/') + pathAdditions).TrimStart('/');
|
updatedPath = (Pathing.BaseContentPath + pathAdditions);
|
||||||
WWW reader = new WWW(updatedPath);
|
WWW reader = new WWW(updatedPath);
|
||||||
while (!reader.isDone)
|
while (!reader.isDone)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
if (reader.bytes == null)
|
if (reader.bytes == null)
|
||||||
{
|
{
|
||||||
updatedPath = (Application.streamingAssetsPath.TrimEnd('/').TrimStart('/') + "/JP" + pathAdditions).TrimStart('/');
|
updatedPath = (Application.streamingAssetsPath + "/JP" + pathAdditions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug.LogWarning("creating path: " + updatedPath);
|
Debug.LogWarning("creating path: " + updatedPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user