- Home /
While isTrigger
I'm trying to make a while loop that will run while a game object is a trigger ( long story why).
while(p2ghost.transform.collider.isTrigger() == true){
spriteanimation.Play("Block");
yield;
}
I tried the script above and unity tells me I have a missing reference exception.
Comment
Best Answer
Answer by TutiBueno2 · Aug 03, 2013 at 06:12 PM
I think the "isTrigger" is not a method, so you can simply use
p2ghost.transform.collider.isTrigger == true
Your answer
Follow this Question
Related Questions
Can collision be detected when object IsTrigger? 1 Answer
Is Trigger Collision Problem 1 Answer
A Collider problem. 1 Answer
Can't click gameobject when over another trigger? 1 Answer
Weird collision bug 1 Answer