Errors with plugin

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

Moderators: Lapo, Bax

Rainydaze
Posts: 3
Joined: 15 Oct 2018, 18:05

Errors with plugin

Postby Rainydaze » 15 Oct 2018, 18:19

I've installed the latest C# plugin into the plugin folder for Unity and I've created a reference for it in Visual C Studio. I've set the plugin to target WebGL. Unity console says the namespace Sfs2X is not found but Visual C does not complain. VC Studio complains when I try to build my code. It spawns a number of errors such as:

Code: Select all

Severity   Code   Description   Project   File   Line   Suppression State
Warning      The primary reference "SmartFox2X_WebGL" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v3.5".   Assembly-CSharp      
I've searched the Unity forums and have found a thread where someone said that Unity can not handle any dll's written with a higher version than .net 3.5
I did use an earlier version of the C# plugin that allowed me to run but I updated because it didn't appear that the connection was working properly. Any ideas to help me with this problem is appreciated. Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Errors with plugin

Postby Lapo » 16 Oct 2018, 07:13

Hi,
I think the problem is that your "Scripting Runtime version" build settings are currently set to ".Net 3.5" while the latest API require the setting to be ".Net 4.x"

If you switch that under File > Build settings > Player settings you should be fine.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 29 guests