Question by
Lismartov · Jan 16, 2017 at 02:04 PM ·
scripting problemscripting beginner
Can't add script bacause of class cannot be found
What should I do?
using UnityEngine;
using System.Collections.Generic;
public class NewBehaviourScript : MonoBehaviour {
// Изменение скорости перемещения героя
public float playerSpeed = 2.0f;
// Текущая скорость перемещения
private float currentSpeed = 0.0f;
// Создание переменных для кнопок
public List<KeyCode> upButton;
public List<KeyCode> downButton;
public List<KeyCode> leftButton;
public List<KeyCode> rightButton;
// Сохранение последнего перемещения
private Vector3 lastMovement = new Vector3();
// Update is called once per frame
void Update () {
}
}
Comment
Answer by elitehp · Jul 11, 2017 at 06:43 AM
Don't use space between words in the script name. Type it without space :NewBehaviourScript
Answer by hexagonius · Jan 16, 2017 at 02:28 PM
If the script compiles correct, make sure the file is named after the class (NewBehaviourScript.cs)
Your answer
Follow this Question
Related Questions
Inherance script problem [C#] 0 Answers
Change Audio Mixer through script for every scene 0 Answers
Why Does this not work? please someone help me i am new to coding. 1 Answer
help to edit this script, zoom text ui 0 Answers
How to restrict rotation? 0 Answers