buildtool
buildtool copied to clipboard
Auto-Generate Build not working
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?
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?
I'm using Unity 2018.2.18f1. I'll check the other things in a bit!
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!
Glad you got it resolved.
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.
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 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.