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.TrimEnd('/') + pathAdditions; if (!System.IO.File.Exists(updatedPath)) { updatedPath = Application.streamingAssetsPath + "/JP" + pathAdditions; } } else { updatedPath = (Pathing.BaseContentPath.TrimEnd('/').TrimStart('/') + pathAdditions).TrimStart('/'); WWW reader = new WWW(updatedPath); while (!reader.isDone) { } if (reader.bytes == null) { updatedPath = (Application.streamingAssetsPath.TrimEnd('/').TrimStart('/') + "/JP" + pathAdditions).TrimStart('/'); } } Debug.LogWarning("creating path: " + updatedPath); return updatedPath; } }