您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
21 行
712 B
21 行
712 B
import os
|
|
|
|
|
|
def get_unity_executable_path():
|
|
UNITY_VERSION = os.environ["UNITY_VERSION"]
|
|
BOKKEN_UNITY = f"/Users/bokken/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
|
|
HUB_UNITY = (
|
|
f"/Applications/Unity/Hub/Editor/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
|
|
)
|
|
if os.path.exists(BOKKEN_UNITY):
|
|
return BOKKEN_UNITY
|
|
if os.path.exists(HUB_UNITY):
|
|
return HUB_UNITY
|
|
raise FileNotFoundError("Can't find bokken or hub executables")
|
|
|
|
|
|
def get_base_path():
|
|
# We might need to do some more work here if the working directory ever changes
|
|
# E.g. take the full path and back out the main module main.
|
|
# But for now, this should work
|
|
return os.getcwd()
|