- Home /
Question by
Zukas · Feb 08, 2015 at 10:11 AM ·
raycasttouchgetcomponent
How can I pre-load all the possible components to avoid stuttering with GetComponent?
So, for example. I'm making game for Android and it's going to use multi-touch a lot, and there's lots of GameObjects with same script components on them. I need to interact with them without having device stutter on touch with them.
I've tried putting components into array, but couldn't figure out how to determine which one to use out of array from the hitray.
Weird thing is, on mobile it stutters only on 1st touch. Rest are fine, even though there's GetComponent in the loop.
Comment
Your answer
Follow this Question
Related Questions
Joystick Raycast Problem? 2 Answers
How to hit two object with one raycast? 2 Answers
throw an object by swiping on it 0 Answers
Touching Falling Objects 1 Answer
Touch dont work 1 Answer