ufna / VaRest

REST API plugin for Unreal Engine 4 - we love restfull backend and JSON communications!
https://www.unrealengine.com/marketplace/en-US/product/varest-plugin
MIT License
1.07k stars 292 forks source link

Problem building source code project with varest plugin #104

Closed Awesomestorm closed 7 years ago

Awesomestorm commented 7 years ago

I have been attempting to build a source code project with the plugin in version 4.15.2 of unreal engine and with the IWYU that is now part of that I had the issue of the header files being needed, this issue I have resolved by adding them. Another problem has come up though which is causing the build to fail, this error is a UBT error and the message is saying that it is unable to load a file from the plugin from the intermediate folder : VaRestPlugin/Intermediate/Build/Win64/UE4Editor/Development/UE4Editor-VaRestPlugin.exp ( This file UE4Editor-VaRestPlugin.exp is not in the intermediate folder at all - the UE4Editor-VaRestPluginEditor.exp is though). Any Suggestions or help in this regard would be appreciated. I amnot super experienced in regard to plugins so am unsure how to proceed.

ufna commented 7 years ago

Hi @Awesomestorm ,

Are you using Marketplace version or github one?

Awesomestorm commented 7 years ago

I am using a marketplace one. What I did was I copied the marketplace folder with the plugin from the standard version of the engine and placed it in the plugins folder of the 4.15.2 source code version of the engine and did a build. I have since run a test by doing the same thing with an earlier version 4.14.3 source build of the engine and built that, the missing file UE4Editor-VaRestPlugin.exp is now there for that engine version. Currently I am doing a rebuild of version 4.15.2 again as it appears that the problem may well be on my end and my source version of 4.15.2 is possibly buggy. I will post an update about it once it has completed.

Awesomestorm commented 7 years ago

just to update. The engine source code build is failing on the plugin each time, I am not experienced at working with plugins on this level and am not a coder on this level either, but it appears that this is something to do with the IWYU header files being needed in 4.15 and 4.16 which could be part of the problem...I will leave it for now and wait for the updated version for 4.16 and hopefully all will be well. I could try the git hub version but again am not sure what I am doing with that or the whole cloning process..a bit above my pay grade for the moment :(

ufna commented 7 years ago

@Awesomestorm You can easily fix it by placing plugin to the project instead of engine one. I'm not sure why it happens with plugin being inside engine folder, and make futher investigation.

Awesomestorm commented 7 years ago

I will give that a try, I think I may have already tried that, not sure I have tried a few ways but if I did and memory serves me correctly when I placed the plugin into the source project and not the source engine, the build still failed with a message saying that the plugin was not installed (in the source version of the engine) which is why I have tried to do it the way outlined above.

Rithiel commented 7 years ago

I also am having trouble adding VaRest Plugin to my project built from Source (v.4.15.3). After adding the VaRest Plugin to my project's Plugin folder and editing "DefaultEngine.ini", I try and "Generate Visual Studio Project Files" and I get this error: Running C:/Program Files/UnrealEngine-4.15/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Rithiel/Documents/Unreal Projects/Test1/Test1.uproject" -game -engine -progress Discovering modules, targets and source code for project... Messages while compiling C:\Users\Rithiel\Documents\Unreal Projects\Test1\Intermediate\Build\BuildRules\Test1ModuleRules.dll: c:\Users\Rithiel\Documents\Unreal Projects\Test1\Plugins\VaRest-develop\Source\VaRestEditorPlugin\VaRestEditorPlugin.Build.cs(7,58) : error CS1729: 'UnrealBuildTool.ModuleRules' does not contain a constructor that takes 1 arguments c:\Users\Rithiel\Documents\Unreal Projects\Test1\Plugins\VaRest-develop\Source\VaRestPlugin\VaRestPlugin.Build.cs(9,53) : error CS1729: 'UnrealBuildTool.ModuleRules' does not contain a constructor that takes 1 arguments UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

For testing purposes, I added Socket.io Plugin using the same method and it built with no issues. Any help would be greatly appreciated, Thanks!

ufna commented 7 years ago

Hi @Rithiel ,

You should downgrade plugin version a bit - last one supports only UE 4.16 because of build tools changed by Epics :(

ufna commented 7 years ago

You can use this one: https://github.com/ufna/VaRest/commit/531e8791279b2064b909bd9cda27695f996ff67a

Rithiel commented 7 years ago

Thank you so much for your fast reply! I added the UE 15.1 VaRest Plugin from your link and it built successfully!

ufna commented 7 years ago

@Rithiel you're welcome! :)

lacika80 commented 7 years ago

hello everybody. i downloaded the ue4 16.2 source version what i installed and i made a tps project. after i made a folder in the project folder with name: Plugins and i pasted the varest plugin from the original ue4 (E:\Program Files\Epic Games\UE_4.16\Engine\Plugins\Marketplace\VaRestPlugin). then i tried to start the project. the problems on the pictures. what i made wrong and what can i do? 2017-07-26 1 2017-07-26 2 2017-07-26

ufna commented 7 years ago

@lacika80 You should rebuild your project, and it will work.