You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.Networking;
|
|
|
|
|
|
|
|
|
|
|
|
public static class HelperFunctions
|
|
|
|
|
|
{
|
|
|
|
|
|
public static string CreateFilePath(string pathAdditions)
|
|
|
|
|
|
{
|
|
|
|
|
|
string updatedPath = "";
|
|
|
|
|
|
if (Application.platform != RuntimePlatform.Android)
|
|
|
|
|
|
{
|
|
|
|
|
|
updatedPath = Pathing.BaseContentPath + pathAdditions;
|
|
|
|
|
|
if (!System.IO.File.Exists(updatedPath))
|
|
|
|
|
|
{
|
|
|
|
|
|
updatedPath = Application.streamingAssetsPath + "/JP" + pathAdditions;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
updatedPath = (Pathing.BaseContentPath + pathAdditions);
|
|
|
|
|
|
WWW reader = new WWW(updatedPath);
|
|
|
|
|
|
while (!reader.isDone)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
if (reader.bytes == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
updatedPath = (Application.streamingAssetsPath + "/JP" + pathAdditions);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
Debug.LogWarning("creating path: " + updatedPath);
|
|
|
|
|
|
return updatedPath;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|