How do I use the custom functions of the actor class in BluePrint?

138890-1.png

I want to use a function from a custom Actor class inside a widget blueprint.
However, casting to an actor class causes an error.
What’s the problem ??

Your JsonActor is not a Blueprint class that inherits from Game Mode Base.

You’re passing a Game Mode Base (Get Game Mode) to your cast.

What are you attempting to achieve here?

When the button is clicked, invoke the custom function of the actor class.

If so, how do I use the custom function of the Actor class?

After you spawn your JsonActor, assign it to a variable of type JsonActor reference and use that reference to call your custom function.