Problem #2 Errors

Updated on April 21, 2017 in Unity
Share on Facebook0Tweet about this on TwitterShare 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
Reply
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); } }
Wise
on April 19, 2017

Ignore those div tags.

on April 21, 2017

Thanks man!

Show more replies
  • Liked by
Reply
Cancel