Unity - Windows Store ILCPP

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Wally
Posts: 3
Joined: 13 Jul 2016, 13:54

Unity - Windows Store ILCPP

Postby Wally » 13 Jul 2016, 14:09

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
User avatar
Bax
Site Admin
Posts: 4322
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Unity - Windows Store ILCPP

Postby Bax » 14 Jul 2016, 16:14

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?
Paolo Bax
The SmartFoxServer Team
Wally
Posts: 3
Joined: 13 Jul 2016, 13:54

Re: Unity - Windows Store ILCPP

Postby Wally » 14 Jul 2016, 19:58

Forget it, these preprocessor directives solved it:

Code: Select all

#if (UNITY_WSA && ENABLE_DOTNET) && !UNITY_EDITOR
   sfs.InitCrypto();
#else
   StartCoroutine(sfs.InitCrypto());
#endif
User avatar
Bax
Site Admin
Posts: 4322
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Unity - Windows Store ILCPP

Postby Bax » 15 Jul 2016, 07:46

Glad you solved it :)
Paolo Bax
The SmartFoxServer Team
Wally
Posts: 3
Joined: 13 Jul 2016, 13:54

Re: Unity - Windows Store ILCPP

Postby Wally » 15 Jul 2016, 08:50

Please consider to update this piece of code from this article http://docs2x.smartfoxserver.com/GettingStarted/cryptography, which introduced this problem with ILCPP.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 2 guests