I’m circling back through Block Breaker again from the beginning and I’m getting a new warning for OnTriggerEnter that I didn’t get last time through:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LoseCollider : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
SceneManager.LoadScene("3-EndScene");
}
}
sends an IDE0060 message saying “Remove unused parameter ‘collision’”, and the trigger (which is active) does not activate when the ball passes through it. I have double- and triple-checked that my string reference is accurate, and I have even removed and re-built the Build Settings. I’ve re-watched this video several times and can’t find a difference in process.
I re-checked my old code from the first time I did this after the remaster and it is identical to what I have now.
The one difference from the course is that I’m running in 2019 (2019.1.5f1), so I don’t know if there is a new way Unity is handling trigger events in code in the 2019 update or if I’m just going crazy.