Hey guys, I’ve been looking around on Google and on here for a while and I haven’t been able to find the solution to my problem.
Essentially the question is in the title, but to elaborate upon my question with an example; in my game I have game objects which have a script called ‘resource’ attached to them. Whenever I collide with the object I want to be able to check if it has that script component and if it does, then I want to be able to call a function from that script or something similar.
The main part I am stuck on is just finding out whether or not that object has a specific component. Is there a better way to go about solving my problem and if not, is there an answer to my original question?
Thank you,
-Alexander