Jump to content

Is System.IO still forbidden?


Recommended Posts

I am trying to communicate with an Arduino through a plugin using System.IO.Ports but it seems to not be loading the plugin. When I remove 'Using System.IO.Ports' the plugin loads but I need it. I thought System.IO was no longer blocked. Is there any other way around this?

Found this in the log
 

[ERR 14:04:25.092] AssemblyLoader: Exception loading 'NavballHID': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 
  at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 

Additional information about this exception:

 System.TypeLoadException: Could not load type 'NavballHID.NavballHID' from assembly 'NavballHID, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

 

Edited by JoePatrick1
Link to comment
Share on other sites

2 minutes ago, Thomas P. said:

I am at mobile right now so I can't look at mscorlib, but my guess is that the namespace you are using was added in .NET 4 which Unity does not support. System.IO is unbanned since 0.20 or so.

Looked it up. People say that you need to go to player settings and change from 2.0 subset to just 2.0. Now this all fine and dandy if you're making your own game but is there anything I can do about this with KSP as it is already published?

Link to comment
Share on other sites

No. KSP use the Unity subset. Nothing to be done about it until the dev change it (and I forgot to mention it again for 1.1...)

http://docs.unity3d.com/412/Documentation/ScriptReference/MonoCompatibility.html

 

Edit : and I think Ports is not in in either profile

 

 

Edited by sarbian
Link to comment
Share on other sites

2 minutes ago, sarbian said:

No. KSP use the Unity subset. Nothing to be done about it until the dev change it (and I forgot to mention it again for 1.1...)

http://docs.unity3d.com/412/Documentation/ScriptReference/MonoCompatibility.html

So no way to do it this way then?

Is there a way I could write data to a local file that I can then write a separate program to access?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...