- Home /
Question by
karl_ · Sep 11, 2010 at 07:20 PM ·
triggerontriggerstay
Check how many objects are in a trigger?
As the title says, I'm trying to get a quick reading of how many objects are in a trigger. Is there any quick way to do this?
Comment
Best Answer
Answer by Loius · Oct 27, 2010 at 03:14 AM
It's possible this will work if put on the trigger object:
var objects : int = 0; function OnTriggerEnter( other : Collider ) { objects++; }
function OnTriggerExit( other : Collider ) { objects--; }
You can then just ask the .objects variable for how many objects are in the trigger.
Your answer
Follow this Question
Related Questions
Combining Triggers 1 Answer
Random Java Script Activation? 1 Answer
C# - Problem with trigger that won't activate 1 Answer
Why does my climb stairs animation not play? 1 Answer
OnTriggerStay Problem with rate? 1 Answer