I am currently attempting to create a 2D side scrolling background using this video:
The guy in the video uses C#, and I am using Java, and I believe I am declaring my variables correctly. However, I am getting an error from this particular line of code:
In Unity Javascript (not java, please!) you have to use:
var mr = GetComponent.<MeshRenderer>();
Note the dot after GetComponent
BTW. I recommend you to learn C# instead of Unity javascript. It’s easier if only because all documentation, tutorials and forum answers are using C#.
If you are using Unity javascript beacause you already know javascript, or you think you are learning the same javascript that is used for the web, you are wrong. Unity Javascript is another different language with a missleading name.