-
Notifications
You must be signed in to change notification settings - Fork 21
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
Not working on Unreal 4.27 #6
Comments
You can use this plug-in as a project plug-in, or an Engine plug-in: If you use it as a project plug-in, clone this repository into your project's Plugins directory and compile your game in Visual Studio. A C++ code project is required for this to work. If you use it as an Engine plug-in, clone this repository into the Engine/Plugins directory and compile your game. Full Unreal Engine source code from GitHub is required for this. This plug-in is enabled by default, so no need to enable it in the plug-in browser. Link the SignalR module to to yours with PublicDependencyModuleNames or PrivateDependencyModuleNames in .build.cs: PrivateDependencyModuleNames.AddRange(new string[] #include "SignalRModule.h" TSharedPtr Hub = GEngine->GetEngineSubsystem()->CreateHubConnection("https://example.com/chathub"); Hub->On(TEXT("EventName")).BindLambda([](const TArray& Arguments) { Hub->Invoke(TEXT("Add"), 1, 1).BindLambda([](const FSignalRValue& Result) { Hub->Send(TEXT("Add"), 1, 1); |
@mostafabder1 Have you called |
The plugin is definitely working, but strange enough, logs are not. I can confirm that. However, in the debug build, I was able to set break points to see, all is working as expected. |
@mostafabder1 You just need to persist a reference to the connection object somewhere in your code to ensure that the object is not destroyed when the pointer is destroyed. As the functions are asynchronous, the shared pointer deletes the connection object before the negotiation with the server ended if there are no more references to the connection object. |
there is nothing happens in unreal side when connecting to SignalR URL
also there is no printing logs
i tried Hub->On, OnConnected, OnConnectionError but not working
any help? or Documentation?
The text was updated successfully, but these errors were encountered: