I have an object that need to be on layer A for some other scripts to work. Now I want it to also not trigger OnMouseDown functions, but I cannot put it on an IgnoreRaycast layer because it needs to stay on layer A. Is there a workaround?
If you don’t want OnMouseDown to be called in scripts on an object, don’t put OnMouseDown in those scripts. If you need OnMouseDown to be called somewhere, put it in different scripts on a different object.
You can adjust the settings for particular layers and tell them to ignore raycasts. Go to the Edit Window>Project Settings>Physics. Inside of here, you’ll see the physics hierarchy in which you can tell ‘Layer A’ to ignore raycasts. Thus keeping it on layer A and still having it ignore raycasts.