buildtool icon indicating copy to clipboard operation
buildtool copied to clipboard

Auto-Generate Build not working

Open wilg opened this issue 7 years ago • 7 comments

I'm not sure what I'm doing wrong here. When I press build, my builds complete successfully and upload to itch (via the plugin) but the build number does not advance.

Is there something I am doing wrong?

screen shot 2018-12-09 at 11 49 29 am

wilg avatar Dec 09 '18 19:12 wilg

What version of Unity are you running?

I'll take a look and see if I can determine some reason it wouldn't update. Is it possible that it isn't saving the "Auto-Generate Version" selection - if you close and reopen Unity, is it still checked?

I guess it may also be possible that it's retaining values displayed in that UI. If you close the Product Parameters section prior to doing a build, does it change anything?

Chaser324 avatar Dec 09 '18 21:12 Chaser324

I'm using Unity 2018.2.18f1. I'll check the other things in a bit!

wilg avatar Dec 10 '18 20:12 wilg

Looks like it was the first problem, it wasn't saving the checkbox properly. I quit Unity and restarted it, and it was unchecked. I checked it again and it did save the change in Assets/UnityBuildSettings/UnityBuildSettings.asset, and it appears to work. So my issue is resolved, I'm not sure if this is caused by a bug or something I did. Thanks!

wilg avatar Dec 10 '18 23:12 wilg

Glad you got it resolved.

Chaser324 avatar Dec 10 '18 23:12 Chaser324

Actually, I think a problem that's happening here is that when you click "Auto-Generate Version" it does not serialize buildCounter or lastGeneratedVersion into UnityBuildSettings.asset, so it's easy for the version change to not get committed into version control.

That means, when you come back and build again, the version might have regressed to an earlier version.

It's possible also there are other situations where the build version not serializing causes strange stuff to happen. Maybe if you click "generate version string now" and then "build" with auto-increment on you might not get the version you expect.

wilg avatar Jan 15 '19 04:01 wilg

I believe I'm having this issue with Unity 2021.1.13f -- the build counter doesn't seem to be auto-incrementing. Sometimes it updates if I close & re-open the SUB tab, but usually I have to manually set the build counter.

skaggspa avatar Jul 03 '21 03:07 skaggspa

@skaggspa thanks for the report, I believe I have seen the same behaviour in 2021.1.15f on a project I'm working on, will try and find some time to investigate more and fix the issue.

robinnorth avatar Jul 29 '21 16:07 robinnorth