Вообщем, когда я пишу player.transform.right, код работает, а когда player.transform.left по каким то причинам юнити пишет "Transform' does not contain a definition for 'left' and no accessible extension method 'left' accepting a first argument of type 'Transform' could be found (are you missing a using directive or an assembly reference?" Я новичок в c#.
Вот код:
using UnityEngine;
using System.Collections;
public class NewBehaviour : MonoBehaviour
{
public GameObject player;
public int speedRotation = 3;
public int speed = 5;
public int jumpSpeed = 50;
void Start()
{
player = (GameObject)this.gameObject;
}
void Update()
{
{
player.transform.position += player.transform.right * speed * Time.deltaTime;
}
}
}