superunitybuild / buildtool

A powerful automation tool for quickly and easily generating builds with Unity.
MIT License
1.21k stars 120 forks source link

config SO is borked (can't copy, doesn't remember data) #133

Closed tvogt closed 6 months ago

tvogt commented 12 months ago

In the latest version, the config settings are broken entirely.

First, you'd think they are an SO and you can copy them to have multiple configurations or a backup of one, but that doesn't work. If I do that, the copy complains about missing script.

Second, whenever I restart the editor, all config settings are totally blank, the console says "No script asset for BuildSettings. Check that the definition is in a file of the same name and that it compiles properly." and it recreates a new, empty file. That doesn't load properly the next time.

If I fill in everything, it all works. Compiles run and all. It just can't remember it for the next launch.

tvogt commented 12 months ago

Downgrading to 6.0.1 doesn't solve the problem, which is incredibly weird. Also, the SuperUnityBuild window doesn't stay open when restarting Unity.

There are no visible error messages and manually opening the SuperUnityBuild window works, creates a new empty config as below, and then continues to seemingly work just fine.

robinnorth commented 12 months ago

Thanks for the report, @tvogt! I encountered this issue in a project I'd upgraded through several SuperUnityBuild versions this week, with the same results. Deleting the Library folder and reimporting everything seemed to resolve things, so I'm not sure if the issue is to do with a change in how some setting has been serialised between SuperUnityBuild versions or not.

What Unity version did you encounter this with?

tvogt commented 11 months ago

2022.3.10 - LTS

I've come to a similar idea of what went wrong, then remembered that I a long time ago installed from a download and recently from git through the package manager, so that might've resulted in some oddities. I've now deleted all traces of SuperUnityBuild from the project, deleted the Library folder, am currently rebuilding everything and will re-install a fresh SuperUnityBuild and see if that makes the problem disappear.

tvogt commented 11 months ago

Update:

It appears that this complete cleanup has resolved the issue for me.

Recommended solution to this issue: Add a remark into the install instructions that those upgrading should ensure that nothing remains from a previous install.

robinnorth commented 11 months ago

Thanks @tvogt, the project I encountered this issue in is also using 2022.3 LTS and a fresh install of SuperUnityBuild and new build settings file has also been behaving as expected for me.

A note in the project README about removing previous build settings and constants files before a major version upgrade is a good suggestion.