How can I convert a reference to a class to a reference to a blueprint?

I made this a while ago. People find it helpful.

I’m starting to try using multiplayer for a game I am currently developing, but I’m struggling to get my characters owner. I have tried “get controller” but that only works for setting the server’s controller and not the client’s. I am now trying to get the game mode and get a reference to the controller from there. I can get access to the class but not a reference to the blueprint.
Is there any way to convert this to a blueprint reference of my player controller?
Or does anyone know a better way to get the controller of an actor at BeginPlay?

Player controllers are only replicated to the owning client. If you’re trying to access the server player’s controller on the client, that will never work.

Game modes are not replicated at all, ever, to clients.

Oh, and blueprints ARE classes. If you meant an object created from a blueprint, that’d be another matter.

Ahhh thank you for the quick response. This is helpful information for me as I am new to working with multiplayer.

You could try using player states, instead of player controllers. The “owner” of a player state is the player controller, if you need to do anything on the server side. That will still fail on the client side, though.

Oh okay. I shall go back to the drawing board, and do some more research into multiplayer in Unreal then!

Thank you! I can see why people find it helpful. That does help to explain it