Answer the question
In order to leave comments, you need to log in
Invalid token return and also invalid token; what to do?
I wrote one of the movement codes and here it is:
here is the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class BaseState : MonoBehaviour
{
protected BaseMotor motor;
#region baseState implementation
public virtual void Construct()
{
motor = GetComponent<BaseMotor>();
}
public virtual void Destruct()
{
Destroy(this);
}
public virtual void Transition()
{
}
#endregion
public abstract Vector3 ProcessMotion(Vector3 input);
public abstract Quaternion ProcessRotation(Vector3 input);
return transform.rotation;
}
Answer the question
In order to leave comments, you need to log in
1. Shelve Unity
2. Install Visual Studio Community
3. Learn C# until error messages become clear.
4. Get the unit off the shelf
5. Set up the unit so that you can write code in the studio, and not in a notepad or built-in editor.
Delete the line that says
return transform.rotation;
It shouldn't be there.
return can only be written inside methods
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question