How does AddComponent work from the inside?
Hello everyone I would like to know how AddComponent works from the inside. Is there a check on GetComponent (to display a message that there is already such a component). And the second question - where can I find out such information - what is inside the Unity method?
With great respect, and thank you in advance!
Answer by khanism · Jan 28, 2021 at 09:37 AM
hope this helps, almost similar to what you have asked:
https://answers.unity.com/questions/454590/c-how-to-check-if-a-gameobject-contains-a-certain.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613024130im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How can I put a new script on the main camera? 2 Answers
Add a script to a GameObject via script at runtime? 1 Answer
Script uses GameObject created in other Script 0 Answers
Play sound on particle death C# 0 Answers
How to create a plot system 0 Answers