Platform android. Stack trace:
06-26 17:54:18.150: I/Unity(30411): TypeLoadException: A type load exception has occurred.
06-26 17:54:18.150: I/Unity(30411): at Sfs2X.SmartFox..ctor (Boolean debug) [0x00000] in <filename unknown>:0
Client api throws exception when I call constructor
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
Hi,
would you mind adding more details?
Such as the API version, Unity version, which DLL you're using (we ship three), the code that crashes.
Thanks
would you mind adding more details?
Such as the API version, Unity version, which DLL you're using (we ship three), the code that crashes.
Thanks
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
Unity 5.1.0f3. Smartfox Version: 1.6.0 C# API. The code is so simple:
Code: Select all
try
{
_smartFox = new SmartFox(true);
}
catch (Exception e)
{
Debug.LogException(e);
return;
}
Re: Client api throws exception when I call constructor
Can you send your test project by email?
Also, when do you get that error? When running the project in the Unity Editor or publishing it to the device?
Also, when do you get that error? When running the project in the Unity Editor or publishing it to the device?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
It is not a test project I cannot send it for u, sorry. In editor all works fine. Issue was appeared after client API was updated to new version. Previous version was working with same code
Re: Client api throws exception when I call constructor
Can you create a small basic project and see if it gives you the same issue?
If it's not reproducible there might be something else going on.
Thanks
If it's not reproducible there might be something else going on.
Thanks
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
I was sent a email on support@smartfoxserver.com
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
Doesn't work with stripmode enabled. Try to avoid using reflection. Please fix
- Attachments
-
- rsuAsn6p0ax1qdRRcXRwQ.jpg
- (74.43 KiB) Not downloaded yet
Re: Client api throws exception when I call constructor
Unfortunately this is not possible as reflection is an integral part of the API and allows for exchange of custom defined types between client and server.
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
In all fairness the difference between Level 3 stripping and No-Stripping with our Advanced Connector is a meager 900Kb.
I don't think it's worth being sad
I don't think it's worth being sad
-
- Posts: 12
- Joined: 18 May 2015, 10:21
Re: Client api throws exception when I call constructor
Did you compare builds on WebGL platform with stripping disabled|enabled? In real project it will be hundreds of megabytes difference between
Re: Client api throws exception when I call constructor
I don't think I understand your comment.
The stripping level deals with code not assets. How can it possibly generate hundreds of megabytes of compiled code?
You asked if we compared the WebGL export. Yes we did.
I have tested the official Unity demo called Survival Shooter:
https://unity3d.com/learn/tutorials/pro ... al-shooter
It produces 108MB of data with no stripping and 108MB of data with Stripping level 3. No difference.
Similarly it produces a minor difference for Android build, roughly 2MB of difference for a 50MB apk file.
cheers
The stripping level deals with code not assets. How can it possibly generate hundreds of megabytes of compiled code?
You asked if we compared the WebGL export. Yes we did.
I have tested the official Unity demo called Survival Shooter:
https://unity3d.com/learn/tutorials/pro ... al-shooter
It produces 108MB of data with no stripping and 108MB of data with Stripping level 3. No difference.
Similarly it produces a minor difference for Android build, roughly 2MB of difference for a 50MB apk file.
cheers
Who is online
Users browsing this forum: No registered users and 75 guests