So I follow the latest survival shooter and there was an issue with the code.
Ray camRay = Camera.main.ScreenPointToRay (Input.mousePosition);
and the error I get it that Camera does not contain a definition for main, but if you look in the documentation it’s clearly a static function. Any idea or has anyone else experiencing this?
You may just need to restart Unity. It sometimes happens with me.
[Camera.main: The first enabled camera tagged “MainCamera” (Read Only)] (from the documentation)
so… perhaps you have changed the tag for your intended camera? Otherwise check the tag is MainCamera. Maybe you typed ‘Camera’ as ‘camera’, or ‘main’ as ‘Main’. (check your cases)