Answer the question
In order to leave comments, you need to log in
How to access all GO components in Unity?
Cannot access all components attached to the camera.
The GetComponents method does not work, it asks me to write the type of the parameter, and when I do, it says
Error CS0104 'Component' is an ambiguous reference between 'UnityEngine.Component' and 'System.ComponentModel.Component'.
private Camera _camera;
void Start()
{
_camera = GetComponent<Component>();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question