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
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
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