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! While you're at it, check out some resources Treehouse students have shared here.
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 trialDaniel Savin
768 PointsWhen 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?).
2 Answers
Justin Woo
150 PointsI 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);
}
}
Samuel Savaria
4,809 PointsDo 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
768 PointsThey 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.
Samuel Savaria
4,809 PointsSamuel Savaria
4,809 PointsCould we see your code please?