示例#1
0
        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);
            }
        }
示例#2
0
 public static void Initialize()
 {
     settings = HttpServerSettings.GetOrCreateSettings();
     if (settings.IsEnable)
     {
         var server = new HttpServer();
         server.Start();
     }
 }