浏览代码

Fix readentry

/pyrception-integration
leopoldo-zugasti 3 年前
当前提交
6b9086c7
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 5
      com.unity.perception/Editor/Visualizer/VisualizerInstaller.cs

5
com.unity.perception/Editor/Visualizer/VisualizerInstaller.cs


#if UNITY_EDITOR_WIN || UNITY_EDITOR_OSX
#define UNITY_EDITOR_OSX
using System;
using System.Collections.Generic;
using System.Diagnostics;

static (int pythonPID, int port, int visualizerPID) ReadEntry(string project)
{
if (!Directory.Exists(PathToStreamlitInstances) || !File.Exists(PathToStreamlitInstances))
if (!File.Exists(PathToStreamlitInstances))
return (-1,-1,-1);
using var sr = File.OpenText(PathToStreamlitInstances);

// try/catch to skip any process that may not exist anymore
try
{
if (p.ProcessName.ToLower().Contains(name))
if (p.ProcessName.ToLower().Contains(name.ToLower()))
{
foreach (var q in before)
{

正在加载...
取消
保存