-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Services Documentation #134
Comments
Revision history:
Hi @ikhalip. To all of you who would like documentation on how to use services (in c++) with this plugin, here it is. I hope you all find this useful. If you wanted to use blueprints, I would guess that you would likely have to write some wrapper code in c++ to give you the functionality that you want. To keep matters simple, I will use the CAUTION: These callbacks are NOT called in the game thread. It is okay to set member variables inside these callbacks, but UE4 will crash if you attempt to invoke commands on UObjects in these callbacks, such as manually moving the position of an actor with SetActorLocation(...). In this case, I suggest you set flags inside these callbacks that are set to true once you have received the data, and then inside the Tick() function you can act on that new data if the flag is true. Notes:
You are also welcome to use this code structure when creating UTopics. Case 1: Client ImplementationYou have a UE4 actor (or component) that you want to act as the client.
Source file: ClientActor.cpp
Case 2: Server ImplementationYou have a UE4 actor (or component) that you want to act as the server.
Source file: ServerActor.cpp
|
Hi @tsender ! With respect to executing on the game thread: |
Currently there isn't much if any documentation regarding services and how to use them. It would be great to see some c++ and or blueprint examples/documentation.
The text was updated successfully, but these errors were encountered: