static void Run()
        {
            string pathToAssetServer     = Path.GetFullPath("Assets/ABSFramework/GameUpdater/Example/Editor/AssetBundleServer.exe");
            string assetBundlesDirectory = Path.Combine(Environment.CurrentDirectory, "AssetBundles");

            KillRunningAssetBundleServer();

            Directory.CreateDirectory(Path.Combine(assetBundlesDirectory, ABSFramework.AssetBundleUtils.GetFloderName()));
            WriteServerURL();

            string args = assetBundlesDirectory;

            args = string.Format("\"{0}\" {1}", args, Process.GetCurrentProcess().Id);
            ProcessStartInfo startInfo = ExecuteInternalMono.GetProfileStartInfoForMono(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), GetMonoProfileVersion(), pathToAssetServer, args, true);

            startInfo.WorkingDirectory = assetBundlesDirectory;
            startInfo.UseShellExecute  = false;
            Process launchProcess = Process.Start(startInfo);

            if (launchProcess == null || launchProcess.HasExited == true || launchProcess.Id == 0)
            {
                //Unable to start process
                UnityEngine.Debug.LogError("Unable Start AssetBundleServer process");
            }
            else
            {
                //We seem to have launched, let's save the PID
                instance.m_ServerPID = launchProcess.Id;
            }
        }
Exemplo n.º 2
0
        static void Run()
        {
            string pathToAssetServer = Path.Combine(Application.dataPath, "AssetBundleManager/Editor/AssetBundleServer.exe");
            string pathToApp         = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf('/'));

            KillRunningAssetBundleServer();

            BuildScript.WriteServerURL();

            string args = Path.Combine(pathToApp, "AssetBundles");

            args = string.Format("\"{0}\" {1}", args, Process.GetCurrentProcess().Id);
            ProcessStartInfo startInfo = ExecuteInternalMono.GetProfileStartInfoForMono(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), "4.0", pathToAssetServer, args, true);

            startInfo.WorkingDirectory = Path.Combine(System.Environment.CurrentDirectory, "AssetBundles");
            startInfo.UseShellExecute  = false;
            Process launchProcess = Process.Start(startInfo);

            if (launchProcess == null || launchProcess.HasExited == true || launchProcess.Id == 0)
            {
                //Unable to start process
                UnityEngine.Debug.LogError("Unable Start AssetBundleServer process");
            }
            else
            {
                //We seem to have launched, let's save the PID
                instance.m_ServerPID = launchProcess.Id;
            }
        }
Exemplo n.º 3
0
        static void Run()
        {
            string           args      = string.Format("\"{0}\" {1}", AssetBundleConfig.LocalSvrAppWorkPath, Process.GetCurrentProcess().Id);
            ProcessStartInfo startInfo = ExecuteInternalMono.GetProfileStartInfoForMono(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), GetMonoProfileVersion(), AssetBundleConfig.LocalSvrAppPath, args, true);

            startInfo.WorkingDirectory = AssetBundleConfig.LocalSvrAppWorkPath;
            startInfo.UseShellExecute  = false;
            Process launchProcess = Process.Start(startInfo);

            if (launchProcess == null || launchProcess.HasExited == true || launchProcess.Id == 0)
            {
                UnityEngine.Debug.LogError("Unable Start AssetBundleServer process!");
            }
            else
            {
                instance.mServerPID = launchProcess.Id;
                UnityEngine.Debug.Log("Local assetbundle server run!");
            }
        }