Hi,
I’m trying to send a scene to another pc, call a script from the project on that other pc and have it return the result. I have done the sending scene part, following this link . I store the scene on the Assets folder of the project on the other pc.
Now Im trying to trigger the script on that other project, executing this code
string command = "\\\\DESKTOP-1OH17TP\\path-to-Unity.exe -batchmode -quit -projectPath \\\\DESKTOP-1OH17TP\\path-to-project -executeMethod CreateAssetBundles.BuildAllAssetBundles";
Process process = Process.Start("powershell.exe", command);
process.WaitForExit();
process.Close();
The result I get is that it opens the unity hub in my pc, but thats not what I am looking for. I have tried putting the path to the other pcs powershell but the result is the same.
What is the right way to call to that script?
The first check is if you’re building this with IL2CPP because the Process class was NOT implemented in IL2CPP.
After that it’s just debugging. Make a simple executable you know you have rights to execute, you know it can find path-wise, and see if it runs.
I had both projects on the same pc before and it worked, now I’m trying to do it in separate ones. It would store the scene on the other projects folder, call the script and generate a bundle.
Now I get to store the scene on the other pc on the projects folder, but I am not getting to execute the script from the other project, it just opens the unity hub.
The user account may be logged out. That opens the Hub, for you to sign in.
If you use the same user account on both machines, it’s very likely that if you work on the primary machine the user on the remote machine gets logged out and vice versa. You may have to create a separate free account for the remote machine. You’d still have to expect to get logged out every now and then and manually sign in again.