How to use GetComponentByClass / FindComponentByClass?
I'm trying to get a reference of a component (UCameraComponent) from an actor but everytime I use GetComponentByClass or FindComponentByClass and I compile the solution, ue4.5.1 crashes.
I tried this and UE4 didn't crash:
but then I tried this and UE4 did crash again:
I want to set the reference to the cameraActor with the inspector.
Code For You
Here's the code I use to get actor components of a specific class:
You can easily adapt this code to your own needs
answered Nov 01 '14 at 02:53 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here