Search Issue Tracker

Not Reproducible

Votes

0

Found in

5.0.0b1

Issue ID

627035

Regression

Yes

When Camera Clear Flags is set to Don't Clear or Depth Only, clicking on empty space triggers script from object last clicked

Camera

-

To reproduce:
1) Create new project
2) Add 2 cubes to scene, make sure you can see them as two separate objects
3) Add a OnMouseDown() debug message to cubes to see when you click them, for example:

using UnityEngine;
using System.Collections;
public class Scrip : MonoBehaviour {
void OnMouseDown() {Debug.Log ("I am " + name);}
}

4) Play the scene, at first objects interact normally and clicking on empty space doesn't create any messages.
5) Change camera's Clear Flags property to "Depth Only" or "Don't Clear" and play the scene again
6) Now when clicking on empty space, the script of last triggered object triggers

Also, if there are two cameras and one of them is set to "Skybox" or "Solid color", the issue doesn't appear

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.