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.
Comments (1)
-
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
- Assigned font's bold/font-weight styles render using Default Font's assets when Default Font has corresponding style assets defined in TMP Settings
- "Modifying the parent of a VisualElement while it’s already being modified is not allowed" error is thrown when entering text and pressing tab in the Search window
- Mesh colliders are not updating their positions of bounds correctly
- Images are missing from the "Open the sprite editor" documentation for 6.0, 6.1 and 6.2
- The previous element in the array is modified when assigning an Asset to a new element of AssetReferenceT
This is a duplicate of issue #1339423