Closed marklundin closed 1 month ago
I'm not sure if this can help, but I had a similar problem. I had a total of 202 scripts, due to a test we were doing, through the editor API we set everything in the project to preload false, and then set all scripts to preload true, but only 189 were added to the script order window. This resulted in a scene that when published with concatenate script setting on, the scene was all broken up, but worked fine with the same setting set to off.
We got the missing scripts in the console window as being not found when we ran the project, toggling the preload to false, then true to each of them individually readded to the script order window again and everything runs fine now.
Thanks for the heads up @gbelintani, we've figured out what the issue is now. Just working on a fix
We now have a fix for this! 🚀 😅
This was originally raised on the forum. I've been able to test and replicate.
Issue
When an script asset property is updated in the editor, it changes the number and order of the scripts in the Scripts Loading Order panel.
repro
See this vid for additional repro https://www.loom.com/share/60d3b2f5eb2047d8abc1f4559f76c7bc?sid=a8270a4b-0955-40bd-8d8d-ce50aeba6413
Notes
Additionally, the scripts data comes from
window.config.project.settings.scripts
, this starts as an array, however, when a property of a single script asset is updated, it's mutated to become anObject<number, string>
, but the keys and values are now incorrect.Also, the first few values seem to be correct, however it eventually drifts out of sync.