Problem #2 Errors

Updated 6 days ago in Unity
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
3 on April 19, 2017

Hey everybody

I have a problem

My code here gives me 3 errors

Code and errors

Please answer

  • Liked by
2 on April 19, 2017

Should be like this. When you declare a new method you don’t use semicolon on the end, you use curly braces.

using UnityEngine.SceneManagement; using UnityEngine; public class NewBehaviourScript1 : MonoBehaviour { void OnCollisionEnter (Collision collisionInfo) { if (collisionInfo.collider.ẗag == "Obstakel")) { Restart(); } } void Restart () { SceneManager.LoadScene (SceneManager.GetActiveScene().name); } }
on April 19, 2017

Ignore those div tags.

6 days ago

Thanks man!

Show more replies
  • Liked by