getnamo / SocketIOClient-Unreal

Socket.IO client plugin for the Unreal Engine.
Other
885 stars 239 forks source link

Packaging don't work #68

Closed Monstreur closed 6 years ago

Monstreur commented 6 years ago

Hi ! When i launch my project into UE4: all is working, the client is connected to my server, etc. But when i packaged my project (for win64). Nothing with this plugin work. Is there something needed to be activated ?

getnamo commented 6 years ago

Are you trying to package a blueprint only project? This doesn't work with purely project plugins in unreal engine. To fix it, convert your project to support C++ by adding a simple empty C++ class file in File->New C++ class and recompile (see e.g. https://allarsblog.com/2015/11/04/converting-bp-project-to-cpp/ for details). After that it should package correctly

Monstreur commented 6 years ago

Yes i tried with a Full blueprint project but then i convert it. So i tried but UE4 said in log that it's missing "UE4Editor-SocketIOClient.lib". Don't know why cause there is a UE4Editor-SocketIOClient.dll.

getnamo commented 6 years ago

When packaging, UE4 collapses all modules including plugins into a monolithic .exe which is why it requires the project to be C++ to detect the plugins to recompile as .libs instead of .dlls.

Monstreur commented 6 years ago

It works now! Thanks :D !! Do I need to build every time I change something in my project (even if it's only in blueprint) ?

getnamo commented 6 years ago

Nope, this only needs to be done once per engine build (e.g. will need a recompile when 4.19 comes out and you switch your project to it), otherwise your project will behave as usual. Also with the project being C++ it will package plugin dependencies correctly even if you update their source.

Monstreur commented 6 years ago

This was just for create .lib files ?

getnamo commented 6 years ago

Converting a project to C++ and compiling will add a UE4Editor-<yourprojectname>.dll in your <project root>/Binaries/Win64 folder. Then when you package, the editor will recompile all your modules as .lib files which get included in the final .exe file in your packaged folder.

Decided to add a small section to the readme about packaging for future users here: https://github.com/getnamo/socketio-client-ue4/blob/master/README.md#packaging