public static string GetWWWPath() { if (HttpServerSettings.GetOrCreateSettings().IsEnable) { return(HttpServerSettings.GetOrCreateSettings().URL + "/" + GetPlatformName()); } else { var outPath = string.Empty; switch (Application.platform) { case RuntimePlatform.WindowsPlayer: case RuntimePlatform.WindowsEditor: outPath = "file://" + GetABOutPath(); break; case RuntimePlatform.Android: outPath = "jar:file://" + GetABOutPath(); break; case RuntimePlatform.IPhonePlayer: outPath = GetABOutPath() + "/Raw/"; break; default: break; } return(outPath); } }
public static void Initialize() { settings = HttpServerSettings.GetOrCreateSettings(); if (settings.IsEnable) { var server = new HttpServer(); server.Start(); } }