unity新项目打开时按照指定平台打开

为了避免unity新项目打开然后再切平台浪费时间,在一开始加载的时候的时候就指定平台、

官方文档:

https://docs.unity3d.com/Manual/CommandLineArguments.html

windows命令行

cd C:\g\Unity\Editor && unity -projectPath D:\code\unityProject -buildTarget ios

 

windows批处理

@echo off  
"C:\g\Unity\Editor\Unity.exe" "-projectPath" "D:\code\unityProject" "-buildTarget" "android"
exit

 

posted @ 2021-05-31 20:10  酉乐  阅读(232)  评论(0编辑  收藏  举报