getnamo / SocketIOClient-Unreal

Socket.IO client plugin for the Unreal Engine.
Other
896 stars 240 forks source link

Creating the SocketIO Client on GameInstance_BP #354

Open DrR0bot opened 1 year ago

DrR0bot commented 1 year ago

I wanted to know if it is possible to set up the SocketIOClient from GameInstance_BP.

Using Init override. Then pass it to Parent: Init and then Construct Socket IOComponent?

Does socketIO ClientComponent have to be created on an actor_bp? I want to create the client WebSocket on the GameInstance so, it can independent of the game level and actors.

Thanks again for the help! image

getnamo commented 1 year ago

See https://github.com/getnamo/SocketIOClient-Unreal#statically-constructed-socketioclient-component for blueprint approach or https://github.com/getnamo/SocketIOClient-Unreal#example-fsocketionative-custom-game-instance for c++ approach

MaximeM commented 1 year ago

Is their any issue or problem that could arise from putting the client on the game instance?

getnamo commented 1 year ago

Only caveats I know about are mentioned in the readme here: https://github.com/getnamo/SocketIOClient-Unreal#note-on-emit-with-graph-callback

And https://github.com/getnamo/SocketIOClient-Unreal#note-on-auto-connect