C# needs variable types. Also some little differences in syntax and needs enclosing stuff:
using UnityEngine;
using System.Collections;
public class Status : MonoBehaviour { //scriptname needs to match the name of the class
public GameObject status;
public string curStatus = "";
void OnTriggerEnter(Collider other) {
status.GetComponent().text = curStatus;
Drivetrain.maxRPM = 8000;
}
}
↧