Search Issue Tracker
Fixed
Votes
4
Found in
4.6.1f1
Issue ID
657632
Regression
No
[Callbacks] When disabling renderer on one object, OnBecomeVisible is called on the last created object
Steps to reproduce this issue:
1. Open the attached project
2. Open 'Test' scene
3. It has 3 objects which logs OnBecameVisible() and OnBecameInvisible and script
which disables one of the object renderers when clicking E button
4. Play the scene
5. Notice it outputs in the console when objects become visible
6. Press E
7. 'C' cube should disappear
8. Invisible C is indicated. Which is expected
9. Visible A is indicated again. Which is not expected.
It will call OnBecameVisible on the last gameObject created that has OnBecameVisible implemented on it
If you:
1. change 'RenderToTest' to the last object created ( A cube ) and
2. repeat 4-7 steps again. Now everything works fine as you disable the last created object
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
- “Readme” Asset is unreadable in the Inspector window when switching Editor Theme to Light
- “NullReferenceException” error thrown when switching Editor Theme to Light if “Unity Version Control” tab is enabled
- A Warning is displayed in the Inspector when a Mesh with any Material is added as a Terrain Detail
- [Android][Vulkan] Memory leak when playing and stopping a video using the Video Player on some devices
- Caret moves by a character when typing "." and any number into 'Grid and Snap' toolbar's input field
Crazydadz
Dec 19, 2014 22:40
just do* these really simple steps
Crazydadz
Dec 19, 2014 22:37
At the moment, to avoid this issue just to these really simple step. http://answers.unity3d.com/questions/853879/onbecamevisible-called-out-of-nowhere.html#comment-858045