I meant getting player from unowned actor’s server functions. But I realized unreal engine is lacking this feature since you can’t communicate with unowned actors and there is no way to make your own replication system.
I know how does this work already. My question was about creating unowned actors and handling server functions on it
Can everyone fire game state functions? If so how can you know which player controller fired the server function?
Btw while even searching that I found out someone was in same problem trying to get player and he said he solved it by referencing self in client it’s very exploitable
Why don’t you use character? = Imagine you are making a plugin. It would be better to do all replication in one class instead of telling people to setup it manually in their characters. And to be honest it makes the game very messy and unorganized.
Example use cases would be: Door. Yes a simple door coded both client and server side in a single class don’t requiring a third party initialization. You could manage inputs in door’s client side and send message to door’s server when button is pressed. Server receives the request, checks which player sent the request, checks distance etc then replicates the door on every client. This should all happen in single class. But in fact if you want to do this you need to bind input in player character and send request to door.