Question by
INKnightStudio · Oct 23, 2016 at 09:06 PM ·
c#parsing error
C# Parsing Error
Where are the error?
using UnityEngine;
using System.Collections;
public class 3rdController : MonoBehaviour {
var Animador :Animator;
var Velocity:float;
var Direction: float;
// Use this for initialization
void Start () {
Animador" GetComponent (Animator);
}
// Update is called once per frame
void Update () {
Velocicy = Input.GetAxis("Vertical");
Animador.SetFloat("Velocity", Velocity);
Animador.SetFloat("Direction", Direction);
}
Comment
Answer by Adamcbrz · Oct 24, 2016 at 02:42 AM
It looks like you are mixing javascript with c# all of your var deceleration are javascript. Change them to:
Animator Animador;
float Velocity;
float Direction;
Also we looks like your getcomponent is format incorrectly (possible just a type-o)
Animador = GetComponent<Animator>();