Does anyone know the difference between GetComponentByClass and FindComponentByClass()?

I was just wandering the difference because I use one and it works but the other doesn’t and I don’t know what the difference is and which one I should use and when? Thanks :slight_smile:

Hey SpaceySphinx,

It seems that GetComponentByClass() cals FindComponentByClass()

Also FindComponentByClass() is a virtual function. So you can override it in your own actor classes.

And Last GetComponentByClass() is a UFUNCTION() so it can be called from Blueprint