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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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