Haven’t had any luck searching this out myself, so I figured I’d drop a line here.
I have two objects in my scene, one is an actor, and the other one is just an object (UObject, but it doesn’t really matter). We will call these A and B, respectively.
In my object B, I want to check if actor A has a component of a given class. In pseudocode, something like this:
function DoSomething
{
// this is the important part
ExtraSpecialComponent* FoundComponent = A.FindComponentByType(ExtraSpecialComponent);
if (FoundComponent)
{
FoundComponent.DoCoolStuff();
}
}
Can someone help me out with an example of searching components on an actor in this way?