After googling for a bit I couldn’t find anything, so apologies if this has been answered before.
I’m a total Unity newbie, been trying to learn 2D using stuff such as Ruby’s Adventure
Is there any reason why when trying the Play Mode I can’t see anything on the console? Maybe something with the code?
Do you have anything that’s supposed to be writing to the console? Like Debug.Log in a script?
Your script is fine and it should display messages in console but OnTriggerEnter2D method will only be called when an object with rigidbody or collider enters another object collider range (also assuming you have checked OnTrigger option on collider). I suggest you read about how to use OnTriggerEnter2D method. For now, you can change your script to something like
public class HealthCollectible : MonoBehaviour
Debug.Log("health method was called");
void OnTriggerEnter2D(Collider2D other)
Debug.Log("Object that entered the trigger : " + other);
Is fixed now, thanks everyone.