Search Issue Tracker
Duplicate
Votes
5
Found in
2021.2.0a14
Issue ID
1328863
Regression
No
Player crashes at startup if the script attached to GameObject has the public variable
Steps:
1. Open attached project
2. Load CrashExample scene
3. Take a look into Player.cs
==> Should have public FollowState state = new FollowState(); line in it (the variable is public)
4. Build nd Run the player in release mode
==>
Player crashes at startup
Please take a look into attached movie for details
Originally posted in this forum thread
https://forum.unity.com/threads/missing-variables-on-release.1091239/
Also repro in: 2020.2.0a20.2570, 2020.1.0a20.2396
Note: If you remove the ifdef DEBUG in StateMachine<> it will no longer crash.
-
jviruss
Apr 15, 2021 21:35
This bug is in all versions of unity after 2019.3.There is a package in the forum link to reproduce it.It is a problem in unity serialization.This problem crashes unity while it is in deserialization process of variables.Then the scenes can not be loaded by errors in deserialization of variables.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
This is a duplicate of issue #1339423