- Home /
GetComponent, What is it ?
Hi everyone, Can you help me to know the main meaning of this function ? - We use it when ?
Thanks and Best Regards
Answer by DoTA_KAMIKADzE · Aug 14, 2015 at 12:39 PM
That's a function which is used to access some component from some game object which it is attached to. If you will use that component, which you're trying to get, more than once in your script then you can store the reference to that component in your script for further uses, which will be beneficial for performance.
You should also check out THIS DOCUMENTATION and THAT TUTORIAL for better understanding.
Also next time when you'll have such simple question - try to search through API / MANUAL and try to go through TUTORIALS.
Your answer
Follow this Question
Related Questions
Clicking on an Object to Make it the Variable Target 1 Answer
How to bind different type of data in an array ? 1 Answer
Problem with translating C# variable to JS. 2 Answers
converting javascript to c# 1 Answer
Script sets color to multiple objects from instead of only one object with Random.range() 0 Answers