I’m getting an error with a vector3 in my code whilst following a tutorial
and getting error:
Assets\pipe.cs(19,52): error CS0200: Property or indexer ‘Vector3.left’ cannot be assigned to – it is read only
Here is the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class pipe : MonoBehaviour
{
public float moveSpeed = 5;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position = transform.position + (Vector3.left = moveSpeed);
}
}
Any help would be appreciated