Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Player Input and Cameras C# Variables and Classes

Daniel Savin
Daniel Savin
768 Points

When I typed out this code the variable Vector3 and Animator didn't light up blue.

I am not sure if I installed everything correctly, I don't want to continue doing the work if, in the end, it doesn't work because I am missing some key information or data. I updated Unity while doing this project (maybe that did something?).

Could we see your code please?

2 Answers

Justin Woo
Justin Woo
150 Points

I have the same problem. Here's my code

using UnityEngine; using System.Collections; using System.Collections.Generic;

public class PlayerMovement : MonoBehaviour {

private Animator playerAnimator; 
private float moveHorizontal;
private float moveVertical;
private Vector3 movement;

// Use this for initialization
void Start () {


// Update is called once per frame
void Update () {
    moveHorizontal = Input.GetAxisRaw ("Horizontal");
    moveVertical = Input.GetAxisRaw ("Vertical");

    movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);


Do Vector3 and Animator light up in the same colour, even if it is different from the default C# variable types? I'm using Visual Studio, so I don't know about MonoDevelop, but in VS default data types light up in dark blue and Unity's in cyan. So it might not be an issue, as long as they light up.

Daniel Savin
Daniel Savin
768 Points

They light up as black. I have also noticed there is no auto fill when I was using the variable Vector3 to write Vector3.zero.

I am also using Visual Studios.