Search Issue Tracker

Won't Fix

Votes

0

Found in

2017.4.0f1

2018.3.0a1

2019.1.0a1

2019.1.5f1

2019.2.0a1

2019.3.0a1

Issue ID

1162520

Regression

No

Errors are thrown when adding On Click actions on multiple GameObjects when one has more action than the other

IMGUI

-

How to reproduce:
1. Create a new Unity project
2. Add an empty GameObject
3. Add a 'Button' Component to the object
4. Duplicate the object
5. Add an 'On Click' action to the duplicated object(two or three for different errors)
6. Select both objects in the Hierarchy window and add another On Click action

Expected result: no errors are thrown
Actual result: errors are thrown in the Console window

Reproducible with: 2017.4.29f1, 2018.4.2f1, 2019.1.7f1, 2019.2.0b6, 2019.3.0a6

Notes:
Only reproducible when the lower situated GameObject in the Hierarchy has more On Click actions
The following errors can occur:
-When the second GameObject has one more On Click action than the first one:
NullReferenceException: Object reference not set to an instance of an object
-When the second GameObject has two more On Click actions than the first one:
InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)
-When the second GameObject has more than two On Click actions than the first one:
Invalid iteration - (You need to stop calling Next when it returns false)
InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)

  1. Resolution Note (2019.3.X):

    low priority and unlikely to be resolved for the moment.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.