Page 1 of 1

Unity - Windows Store ILCPP

Posted: 13 Jul 2016, 14:09
by Wally
We have Unity app and trying build W10 UWP via ILCPP. We cant build it for .NET Core, because some components are not .NET Core ready :( .
For build is used normal mono version of SmartFox2X.dll. Windows store version of SmartFox2X.dll cant be used for ILCPP, because some build error. App is build without any error with mono SmartFox2X.dll, but when I try to login, it does not work. It waits cca 30s and then excpetion is thrown:

Connection was lost; reason is: unknown
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
LoginController:OnConnectionLost(BaseEvent)
Sfs2X.Core.EventListenerDelegate:Invoke(BaseEvent)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LoginController:Update()


Connection request is succesfully recieved by server, because there is "Session created: " message in the SFS server log.

It has probably problem with recieving asynchronous reply from server. Is there a way to make it work? W32 app is working ok and also W10 UWP .NET Core version worked before we added some non .NET core component.

Thanks for help
Wally

Re: Unity - Windows Store ILCPP

Posted: 14 Jul 2016, 16:14
by Bax
I'm not sure I fully understand the issue.
You said: "App is build without any error with mono SmartFox2X.dll, but when I try to login, it does not work".
If the connection works, there's no reason why the login should not work. Did you double check your code?
What makes you think that ILCPP would fix this?
In any case, what build errors do you get?

Re: Unity - Windows Store ILCPP

Posted: 14 Jul 2016, 19:58
by Wally
Forget it, these preprocessor directives solved it:

Code: Select all

#if (UNITY_WSA && ENABLE_DOTNET) && !UNITY_EDITOR
   sfs.InitCrypto();
#else
   StartCoroutine(sfs.InitCrypto());
#endif

Re: Unity - Windows Store ILCPP

Posted: 15 Jul 2016, 07:46
by Bax
Glad you solved it :)

Re: Unity - Windows Store ILCPP

Posted: 15 Jul 2016, 08:50
by Wally
Please consider to update this piece of code from this article http://docs2x.smartfoxserver.com/GettingStarted/cryptography, which introduced this problem with ILCPP.