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
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
- “error CS0433: The type 'CodeBinaryOperatorType' exists in both 'System.CodeDom and 'System" compilation errors are thrown when opening a specific project
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
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