So I just started using Unity today. I have a pretty decent understanding of C++ but am still adjusting to C# (also just started today haha)
Anyways, I can’t figure out why whenever I use a command like say:
var EnemyPrefab : Transform;
it gives me an error that it was expecting a ; where the colon is
Is there a header I need to include or something?
public void OnTriggerEnter(Collider collider){
Transform EnemyPrefab;
lives -= 1;
Destroy(collider.gameObject);
Instantiate (EnemyPrefab, new Vector3(0, 0, 0), Quaternion.identity);
I know I could technically just reference collider in instantiate but that doesn’t seem very practical for future use and am trying to get the hang of assigning variables and such in this language