Am I right that GetComponent is similar to instantiating a class in a way that it referenced to other classes but the different is GetComponent is used with Monobehaviour? Anyone who knows the answer plss help,thanks in advance.
No and No. Instantiate
creates an object, while GetComponent
only returns a reference to an existing object. GetComponent
is only restricted to Component
type objects, not MonoBehaviour
s.