Unable to compile ue project after adding agones plugin .Error message is shown below----
Error C2440 'initializing': cannot convert from 'TSharedRef
****/Plugins\Agones\Source\Agones\Private\AgonesComponent.cpp 55
Environment:
@domgreen any ideas?
Is it just me, or is Unreal not backward compatible between versions? 馃槵
I've not updated our game to 4.26 as yet ... but this is a breaking change. Know that a few plugins have broken and needed to be fixed on the version bump ... hopefully should be a quick fix.
Should ensure the fix is backwards compatible when PR'd.
Will pop it into my internal slack and see if anyone knows a fix (might be a few days as most ppl are on holidays still).
From a quick google looks like we need to set the ESPMode::ThreadSafe on the shared pointer ... will have a go at this in the morning and see if it still compiles in 4.25 then if it does we can get someone to test in 4.26 as well :+1:
Source:
https://docs.unrealengine.com/en-US/API/Runtime/HTTP/Interfaces/IHttpRequest/index.html
I have a 4.26 engine based build up for testing, we are not yet switched over but I can test easily once we have a fix to try
@comerford have added a hacky fix #1944 would you mind checking out the branch and compiling the plugin inside your project.
This should just work (TM) as it is now telling the compiler to choose the type rather than explicitly doing it ourselves.
Thanks :+1:
going to do this today as soon as I can figure out how I have broken my Windows Jenkins build images :D
Checked with fresh pull still Not compiling with 4.26. I Switched from ue4.25 in which agones was working fine. Problem is here don't know how to fix dear @markmandel @comerford
TSharedRef
{
FHttpModule * Http = &FHttpModule::Get();
TSharedRef
@Gamedevix - you will need to cherry pick the commit from @domgreen into your plugin, not just pull, since it has not been merged yet pending testing. Alternatively since it is a change to a single file you could edit, or just download the raw file and replace your AgonesComponent.cpp to test
Not working dear i tested it @comerford
Error C2440 'return': cannot convert from 'TSharedRef
type conversion issue used cast too still unable to fix
Same situation here on UE_4.26 with Agones 1.11.0, full log output fromn VS2019 compiling process.
Operaci贸n Compilar iniciada..
1>------ Operaci贸n Compilar iniciada: proyecto: Multiplayer, configuraci贸n: Development_Editor x64 ------
1>Creating makefile for MultiplayerEditor (no existing makefile)
1>Parsing headers for MultiplayerEditor
1> Running UnrealHeaderTool "C:\MBC_Unreal\Multiplayer_WIP\Multiplayer.uproject" "C:\MBC_Unreal\Multiplayer_WIP\Intermediate\Build\Win64\MultiplayerEditor\Development\MultiplayerEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\MBC\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed
1>Reflection code generated for MultiplayerEditor in 9,7570805 seconds
1>Building MultiplayerEditor...
1>Using Visual Studio 2019 14.28.29335 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 10 actions with 12 processes...
1> [1/10] Default.rc2
1> [2/10] MyClass.cpp
1> [3/10] Module.Agones.cpp
1>C:/MBC_Unreal/Multiplayer_WIP/Plugins/Agones/Source/Agones/Private/AgonesComponent.cpp(55): error C2440: 'inicializando': no se puede realizar la conversi贸n de 'TSharedRef<IHttpRequest,ESPMode::ThreadSafe>' a 'TSharedRef<IHttpRequest,ESPMode::NotThreadSafe>'
1> C:/MBC_Unreal/Multiplayer_WIP/Plugins/Agones/Source/Agones/Private/AgonesComponent.cpp(55): note: Ning煤n constructor ha podido aceptar el tipo de origen o bien la resoluci贸n de sobrecarga del constructor era ambigua
1> [4/10] Multiplayer.cpp
1> [5/10] UE4Editor-Multiplayer.lib
1> Creando biblioteca C:\MBC_Unreal\Multiplayer_WIP\Intermediate\Build\Win64\UE4Editor\Development\Multiplayer\UE4Editor-Multiplayer.lib y objeto C:\MBC_Unreal\Multiplayer_WIP\Intermediate\Build\Win64\UE4Editor\Development\Multiplayer\UE4Editor-Multiplayer.exp
1> [6/10] Module.Agones.gen.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: El comando ""C:\Program Files\Epic Games\UE_4.26\Engine\Build\BatchFiles\Build.bat" MultiplayerEditor Win64 Development -Project="C:\MBC_Unreal\Multiplayer_WIP\Multiplayer.uproject" -WaitMutex -FromMsBuild" sali贸 con el c贸digo 6.
1>Compilaci贸n del proyecto "Multiplayer.vcxproj" terminada -- ERROR.
========== Compilar: 0 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========
Raised an issue on the UDN here around this issue to see what best practice might be https://udn.unrealengine.com/s/question/0D52L00005AlAcdSAF/426-breaks-httpcreaterequest
If no response we might be best refactoring that code so it is slightly different (possibly passing in the delegates).
@domgreen I tried same http request to call my game backend servers in 4.26 it is not working .I came to the conclusion that 4.26 has some serious issues with HTTP module .This has nothing to do with agones compatibility with UE as agones works fine with earlier unreal releases..
@comerford have added a hacky fix #1944 would you mind checking out the branch and compiling the plugin inside your project.
This should just work (TM) as it is now telling the compiler to choose the type rather than explicitly doing it ourselves.
Thanks 馃憤
I just updated to 4.26.1 and manually updated the files changed in #1944 and I was able to get it working again. Strangely it did not work for me with 4.26.0
Most helpful comment
Not working dear i tested it @comerford
Error C2440 'return': cannot convert from 'TSharedRef' to 'TSharedRef'
type conversion issue used cast too still unable to fix