AddComponent¶
Purpose¶
Add a component by type to the selected game object.
Key inputs / outputs¶
- Inputs:
component(TypeReference<Component>),targetGameObject(ParentMode=underSelforunderParent). - Outputs: none.
Success / Failure semantics¶
Successwhen component is added.Failedwhen target is invalid.
Important limitations¶
underParentrequirestransform.parent.