UnityEditor.Scripting.ManagedProgram.PathCombine C# (CSharp) Method

PathCombine() private static method

private static PathCombine ( ) : string
return string
        private static string PathCombine(params string[] parts)
        {
            string str = parts[0];
            for (int i = 1; i < parts.Length; i++)
            {
                str = Path.Combine(str, parts[i]);
            }
            return str;
        }
    }

Usage Example

        public ManagedProgram(string monodistribution, string profile, string executable, string arguments, bool setMonoEnvironmentVariables, Action <ProcessStartInfo> setupStartInfo)
        {
            string text = ManagedProgram.PathCombine(new string[]
            {
                monodistribution,
                "bin",
                "mono"
            });
            string value = ManagedProgram.PathCombine(new string[]
            {
                monodistribution,
                "lib",
                "mono",
                profile
            });

            if (Application.platform == RuntimePlatform.WindowsEditor)
            {
                text = CommandLineFormatter.PrepareFileName(text + ".exe");
            }
            ProcessStartInfo processStartInfo = new ProcessStartInfo
            {
                Arguments              = CommandLineFormatter.PrepareFileName(executable) + " " + arguments,
                CreateNoWindow         = true,
                FileName               = text,
                RedirectStandardError  = true,
                RedirectStandardOutput = true,
                WorkingDirectory       = Application.dataPath + "/..",
                UseShellExecute        = false
            };

            if (setMonoEnvironmentVariables)
            {
                processStartInfo.EnvironmentVariables["MONO_PATH"]    = value;
                processStartInfo.EnvironmentVariables["MONO_CFG_DIR"] = ManagedProgram.PathCombine(new string[]
                {
                    monodistribution,
                    "etc"
                });
            }
            if (setupStartInfo != null)
            {
                setupStartInfo(processStartInfo);
            }
            this._process.StartInfo = processStartInfo;
        }
All Usage Examples Of UnityEditor.Scripting.ManagedProgram::PathCombine