C#Process.Start()不启动,尽管文件存在并设置了工作目录

C#Process.Start()不启动,尽管文件存在并设置了工作目录,c#,python,unity3d,C#,Python,Unity3d,我试图在Unity中使用C#脚本来调用python程序。经过这两个环节: 我无法让我的C#脚本调用python程序。我知道我的python脚本没有问题,因为我可以在终端上毫无问题地运行程序 public class JsonStream : MonoBehaviour { private string GetStream() { ProcessStartInfo start = new ProcessStartInfo(); //none o

我试图在Unity中使用C#脚本来调用python程序。经过这两个环节:

我无法让我的C#脚本调用python程序。我知道我的python脚本没有问题,因为我可以在终端上毫无问题地运行程序

public class JsonStream : MonoBehaviour
{
    private string GetStream()
    {
        ProcessStartInfo start = new ProcessStartInfo();

        //none of the paths work, the uncommented variables return true when using File.Exists
        //while the commented variables return false
        start.FileName = "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3";
        //start.FileName = "\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3\"";

        start.Arguments = Directory.GetCurrentDirectory() + "/Assets/googlesheetspyprojectbatch/stream.py";
        //start.Arguments = "\"" + Directory.GetCurrentDirectory() + "/Assets/googlesheetspyprojectbatch/stream.py" + "\"";

        start.WorkingDirectory = Directory.GetCurrentDirectory() + "/Assets/googlesheetspyprojectbatch";
        //start.WorkingDirectory = "\"" + Directory.GetCurrentDirectory() + "/Assets/googlesheetspyprojectbatch" + "\"";

        start.UseShellExecute = false;
        start.RedirectStandardOutput = true;
        start.ErrorDialog = true;
        start.RedirectStandardError = true;

        using (Process process = Process.Start(start))
        {
            using (StreamReader reader = process.StandardOutput)
            {
                string result = reader.ReadToEnd();
                return result;
            }
        }
    }

    public void DoEverythingStream()
    {
        UnityEngine.Debug.Log("Doing Stream");
        string json_text = GetStream();
        string[] games = json_text.Trim().Split('\n');
        foreach (string game in games)
        {
            UnityEngine.Debug.Log(game);
        }
    }
}

运行该程序不会产生错误,但也不会输出任何内容。有人知道我的程序有什么问题吗?谢谢

start.FileName
start.Arguments
start.WorkingDirectory
的确切值是多少?请调试并检查-不要猜测。@mjwills在控制台中记录这些值将返回“/Library/Frameworks/Python.framework/Versions/3.6/bin/python3”、“/Users/brian/Documents/Unity Projects/Project 1/Assets/googlesheetspyprojectbatch/stream.py”和“/Users/brian/Documents/Unity Projects/googlesheetspyprojectbatch/stream.py”分别没有引号。注释掉的版本返回相同的结果,但这次是带引号的。目前这是在我的10.13.1 Macbook Pro上运行的。我希望将来能在windows上运行,并在运行时将目录更改为与windows对应。