Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Both errors are due to the fact that you do not have a normal link to the camera. In the first case, you slipped in newcam, which is the same as your class name, and therefore the compiler tries to interpret this as a call to a static method. In the second case, calling the camera method does not work, because you took a three-year-old tutorial, and Component.camera was cut out a long time ago. There are two ways to solve all this: access the camera through Camera.main , or make a public field and drag the camera there in the inspector.
1) newcam doesn't have a WorldTo... method. What data type is it anyway?
2) No overload found with required parameters for VIewportTOWorldPoint. Parameters not those in function are transferred in short.
Judging by the question - you are new to programming. Therefore, first learn to program, and then poke your head into the unit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question