Search Issue Tracker
Fixed in 5.5.0
Votes
0
Found in
5.3.4p6
Issue ID
796161
Regression
No
[List]"element.FindPropertyRelative("PropertyNameHere").serializedObject.GetIterator().intValue = index;" crashes Unity
Steps to reproduce:
1. Open project attached below.
2. Navigate to: Projects->Scenes and open scene named "Cemetery".
3. In the "Hierarchy" window try selecting game object named "main".
Actual result:
Unity crashes and "Unity Bug Reporter" window appears.
Expected result:
Unity should not crash when trying to select a specific game object.
4. Open the same project again.
5. Navigate to: Project->Editor and open script named "MainEditor".
6. Find this line of code, temporary delete it and save changes:
"element.FindPropertyRelative("NotUsed").serializedObject.GetIterator().intValue = index;"
7. Try selecting game object named "main" and notice that Unity does not crash anymore.
8. Undo deleting that line of code, save changes and repeat the third step.
9. Notice that the issue is again reproducible.
Reproduced with:
5.3.4f1, 5.3.4p6, 5.3.5f1, 5.4.0b18.
Cannot reproduce with:
5.1.0f3, 5.2.4f1, because "SceneManagment" was not supported.
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
- Objects flickering in Play Mode when using RenderTexture with Canvas
- UI Toolkit 'background-size' property is not fully animatable
- Moving the Scrollbar via clicking no longer works after the first-click when page size is too small
- Elements in UI Builder Viewport are displayed incorrectly when Editor UI Scaling is set to 125%
- Prefab referencing a script is not shown in the Search window's Project tab when using "Find References In Project"
CentauriBoy
May 14, 2016 05:26
Solution would be to use: element.FindPropertyRelative("NotUsed").intValue = index;