Accessing static/non-static member functions of a class in another class

Yes, The Actor that has the actor component on it is always there.
The setup is as follows:
First, I created a class based on AActor class and later created a blueprint (say, BP_Platform) out of it and set the static mesh component to a floor mesh. In this class, I have created a blueprint implementable event.
below are the snippets of the header file and the cpp file for this class:


after that, i created a class based on the UActorComponent class and added this component to the BP_Platform. Below are the code snippets for the header and cpp files of this actor component class:


I’ve already mentioned where i’d like to call that blueprint implementable function in the actor component class in the form of comments.

I have already tried to create an instance of that class and using the . / → operator, i have even called for the function but unreal crashes everytime i try to play the game. I guess the instance is uninitialized as when i introduce an if statement with the instance variable as the condition, the body of the if won’t execute.

1 Like