浏览代码

Fixed issue with unity environment not being found on MacOS (#236)

If the internal executable can't be found, it will look for any file in the folder and run it.
/tag-0.2.1
Arthur Juliani 7 年前
当前提交
2a0e9e6f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
      python/unityagents/environment.py

4
python/unityagents/environment.py


candidates = glob.glob(os.path.join(cwd, file_name + '.app', 'Contents', 'MacOS', true_filename))
if len(candidates) == 0:
candidates = glob.glob(os.path.join(file_name + '.app', 'Contents', 'MacOS', true_filename))
if len(candidates) == 0:
candidates = glob.glob(os.path.join(cwd, file_name + '.app', 'Contents', 'MacOS', '*'))
if len(candidates) == 0:
candidates = glob.glob(os.path.join(file_name + '.app', 'Contents', 'MacOS', '*'))
if len(candidates) > 0:
launch_string = candidates[0]
elif platform == 'win32':

正在加载...
取消
保存