Quantcast
Channel: Answers for "Converting JS to C#"
Viewing all articles
Browse latest Browse all 6

Answer by Piflik

$
0
0
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; } }

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>