0

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 :)

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Awesome! Do you know if the -importPackage Parameter can take multiple arguments?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.