I’m trying to compile this code that is literally from the Unity API just to see it in action, but whenever I try to compile it I get an error that says “} expected” directly after the open bracket on public void openDoors(){
Does anyone know what is wrong here that is causing that?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ElevatorDoors : MonoBehaviour {
public void openDoors(){
public Transform target;
public float smoothTime = 0.3f;
private Vector3 velocity = Vector3.zero;
Vector3 targetPosition = target.TransformPoint(new Vector3(0,0, 5));
transform.position += Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, smoothTime);
}