Section 5, Lecture 73

Script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LooseCollider : MonoBehaviour {

public LevelManager levelManager;

void OnTriggerEnter2D (Collider2D trigger) {
	print ("Trigger");
	levelManager.LoadLevel("Win Screen");
}

void OnCollisionEnter2D (Collision2D collision) {
	print ("Collision");

}

}

Help me :disappointed_relieved: to fix this error. All scenes have been added to “Build Settings” . And win screen is not loading, it is showing the same error all over again and again

I solved it :grin: on my own. I do not know how to mark a post as “solved” so just replying to my own post :innocent: .

The error was in the Script of 'LooseCollider" where i had to write my scene name WIN not “Win Screen” as in the video. :slight_smile: .

2 Likes

Hello @Sabeen_Moin,

Well done :slight_smile:


Regarding the marking as solved ;

You can’t do that on the first post of a topic, only on replies to the topic.

  • Click on the ellipses icon next to the Reply option under the post

  • The post menu will appear, click on the solved icon



    Note: This should be done against the reply which actually solves the issue. In the cases of solving your own issue(s) it is beneficial for other users to also include what you did to resolve it, as it’s possible other’s may experience the same issue.


Hope this is of use. :slight_smile:

1 Like

Thank you :slight_smile:

1 Like

You are very welcome :slight_smile:

1 Like

Thanks! This was driving me nuts! You solved it.

1 Like