Skip to main content
added 455 characters in body
Source Link

EDIT: Since writing this answer, the problem has reappeared. Extremely odd how it worked for a few builds. Then all I did was change the music from one file to another, build again and suddenly the exact same problem process has resurfaced.

(If somebody did wish to see the project, pending me adding it to Github. I zipped it in it's current state, 2 part download: https://file.io/j9ofNLrj4Pp6 , https://file.io/tNkot6Yd6gPx) The problem is evident as soon as you open the project in Unity.

As I stated in the comments above. I can fix the problem by ditching my 'DontDestroy' component completely and just adding the lines to not destroy each object in my GameManager.cs Start() instead.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

EDIT: Since writing this answer, the problem has reappeared. Extremely odd how it worked for a few builds. Then all I did was change the music from one file to another, build again and suddenly the exact same problem process has resurfaced.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

EDIT: Since writing this answer, the problem has reappeared. Extremely odd how it worked for a few builds. Then all I did was change the music from one file to another, build again and suddenly the exact same problem process has resurfaced.

(If somebody did wish to see the project, pending me adding it to Github. I zipped it in it's current state, 2 part download: https://file.io/j9ofNLrj4Pp6 , https://file.io/tNkot6Yd6gPx) The problem is evident as soon as you open the project in Unity.

As I stated in the comments above. I can fix the problem by ditching my 'DontDestroy' component completely and just adding the lines to not destroy each object in my GameManager.cs Start() instead.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

added 246 characters in body
Source Link

EDIT: Since writing this answer, the problem has reappeared. Extremely odd how it worked for a few builds. Then all I did was change the music from one file to another, build again and suddenly the exact same problem process has resurfaced.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

EDIT: Since writing this answer, the problem has reappeared. Extremely odd how it worked for a few builds. Then all I did was change the music from one file to another, build again and suddenly the exact same problem process has resurfaced.

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.

Source Link

Seems Unity 2020.3.5f1 LTS is a version of Unity to be avoided. There was no Error or Warning regarding this issue and I had to mess about a while debugging to even find why the original Null Error was thrown.

Until now I was under the impression that Unity builds with LTS tag where very stable and tested builds: https://unity3d.com/unity/qa/lts-releases?version=2020.3

I can confirm that installing 2020.3.9f1 LTS fixes the issue. I removed my workaround code line (as mentioned in comments on question), and re-added my original 'DontDestroy' component to the objects. Now they all remain and are never destroyed upon Scene change.