What I want to do is basically press a button in my application(C# WPF) and create a unity project in a predefined version, import some packages and then launch it.
I have no Idea if that's possible or not. I haven't found anything yet.
Would be awesome if you got a way to do it! Thanks in advance :)
CodePudding user response:
You can use the Unity command line to create a project and import a package in c# like this:
using System.Diagnostics;
...
var arguments = $" -createProject {path} -importPackage {packagePath}";
var process = Process.Start(@"C:\Program Files\Unity\Editor\Unity.exe", arguments);
Check this page https://docs.unity3d.com/Manual/EditorCommandLineArguments.html