this is my trigger
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OpenDoor : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
void OnTriggerEnter2D(Collision2D collision){
gameObject.BroadcastMessage("OpenDoor", 5.0);
}
}
}
this is the thing that is suposed to do something
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DoorOpened : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
void OpenDoor(float door){
Debug.Log("door");
}
}
}
when i run into my trigger the word Door doesnt pop up in my console. whats happening and how do i fix it? P.S. this one of my first games, so sorry if its simple