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
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
This is a duplicate of issue #1339423