I'm trying to have an object test how many other objects it is currently colliding with. Its collider is set to Is Trigger. The FSM starts with a couple of trigger 2D Event actions to catch exits and exits and then increments or decrements a count variable accordingly before returning to the Start to check for more.
It caught the first enter and the first exit and then stopped.
So instead, I tried using TRIGGER ENTER 2D and TRIGGER EXIT 2D as global events. Neither responded to anything. I've had this problem before, where these global events fail to register, and have never got them to work, but I previously resolved problems using the action level detection instead. What have I misunderstood about these global events, and what should I do? (Incidentally, I've never had a problem using custom global events.)
UPDATE: I got the global events to work. I forgot to put the 2d proxy component on the object running the test. However, now the trigger count is capturing WAY more enters than exits. It goes into thousands within a few seconds. Why might this be happening?
For clarity, I'm attaching a screenshot of the simple FSM.
UPDATE: Two things. (1) Discovered a glitch in one of the gameobjects which was (God knows how) continually sending trigger enters regardless of its relative position. All colliders were miles apart. I deleted it and replaced it with its identical prefab, and that issue stopped. The collision count is still failing, however, but it's overcounting by tens rather than thousands. Whatever that glitch was, it was obviously a Unity issue - which begs the question, how am I supposed to know whether Unity is at fault or I am? Any tips on troubleshooting common glitches would be useful, though perhaps off topic here. I still have no idea whether the problem that still remains is its fault or mine.
(2) I copied and pasted a piece of script to count triggers (working on the same principle, which I attached to the object I want to use it. At first, it had the same problem as the FSM, running the count into thousands. However, after I got rid of the glitchy object, it seems to be working - or more or less - at least close enough to require careful testing to make sure. BUT - the FSM is still running very high - a steady count to 70+ in a few seconds. I don't want to use the script - I want to stay within Playmaker, for all sorts of reasons. So my question is, is my FSM wrong, and if so how?