Building from command prompt vs Building from player settings

Hey all

Using editor 5.2.1p1
We have a program made for building nightlies every midnight so we can come in to the office and test the build ourselves on a daily basis. Lately we have began noticing some discrepancies between the two methods we use for compiling builds however.

The biggest visual difference is that our shaders are breaking occasionally. In this case, the shader for our water is breaking and causing it to appear black in the command prompt build but compiles perfectly in the editor build.

Is this a bug? Does unity handle these two build methods differently? What is happening here?

How are you building your project from the command line ? can you show the code (or some of it) ?

Sure thing!

I also want to say another issue I just noticed is that the command line is failing to update the project. I feel like this just started happening so now I have to open the editor every night and click update in version control before the script starts…

Back on point-
First I call a project update with:

-batchmode -nogrpahics -projectPath [C:\ProjectName] -assetServerUpdate [192.168..] [user] [password] -quit

From an xml, I set flags that determine which platforms to build on.
For now we are only building for Win64 so the call looks like:

-batchmode -nographics -projectPath [C:\ProjectName] -buildTarget [win64] -buildWindows64Player [C:\Users\User\AppData\Local\Temp\BuildDate\BuildPlat*.exe] -quit

From there I use 7zip command line arguments to archive the build and send it to another machine via network drive.

* Brackets are for readability

I pulled the commands straight from the Unity documentation… Not much else out there to help me…

Hey everyone, updating my post. I think that this was happening because the editors command line is very basic; too basic. I think that when the command line processed updates from Unity’s asset server it both doesn’t know what to do with local changes and isn’t made to do anything with local changes. Therefore instead of doing anything, it does nothing and reports everything OK! Great! …wait, not really.

Note: If I’m updating from command line, I want to delete all local changes and pull an exact copy of the project from version control. Apparently this is not obvious. Maybe add functionality for people who want to discard all changes, or ignore all server changes for local edits? How has this not been an issue in the past for others?

Anyways, I still have NO idea why our shaders are being compiled differently between GUI and command editors. So instead of wasting any more time here I will be installing perforce this week.

Cheers

Anyone? Still having this problem with shaders building incorrectly ONLY when using GUI-less build option

Did you ever figure this out? I’m having the same issue.

1 Like

Of course I figured this out just after I posted my question. In my case, I needed to remove the -nographics argument from the command line.