I duplicated level 1 of my game. I want to make it work the same way as Level 1 with a minor addition to the previous one. A script and a collider are attached to the prefab where a collider function is used in two classes of the same script. I am using two classes in a script. In level 2 of my game, I want to call a second class and want the script to execute collider function of second class. How can I call Second class in Level 2? please help me. Thank you.
public class class1: Monobehaviour {
//public variables declaration
void OnTriggerEnter2d(){}
}
public class class2: Monobehaviour {
//public variables declaration
void OnTriggerEnter2d(){}
}