Question by
Sandler · Nov 18, 2015 at 01:38 AM ·
2dscreencollider2d
2D Collider out of screen
Hi all, i´d like to know how unity handles objects which are out of the players camera/screen. Do i have to check and disable them all or does unity this for me?
Comment
Best Answer
Answer by OncaLupe · Nov 18, 2015 at 06:20 AM
Try these:
http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnBecameVisible.html http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnBecameInvisible.html
Note; it says at the bottom that the Scene View will also trigger these, so when testing these in the Editor make sure the Scene View is not pointing at anything.
Answer by NinjaISV · Nov 18, 2015 at 02:00 AM
Unity does not check this by default. You must do this manually through a class.
Your answer
![](https://koobas.hobune.stream/wayback/20220612045448im_/https://answers.unity.com/themes/thub/images/avi.jpg)