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; } public static string getMovieFileTypeForPlatform() { if (Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer ) { return ".mp4"; } else { return ".webm"; } } }