- Home /
For Unity 3.5 Mac OS X are the System.IO.Ports available?
For Unity 3.5 Mac OS X are the System.IO.Ports available?
This declaration:
using System.IO.Ports;
Returns the following error on Mac OS X in Unity 3.5
Assets/Standard Assets/Scripts/Direct Connection/GuiArduinoSerialScript.cs(6,17): error CS0234: The type or namespace name Ports' does not exist in the namespace System.IO'. Are you missing an assembly reference?
Answer by dannyskim · Feb 25, 2012 at 08:58 PM
By default, I believe in the Player Settings, the API Compatibility Level is set to the .NET 2.0 Subset, which is the subset that is stripped of certain functionality by Unity to decrease overall build sizes.
Switch the API Compatibility Level from '.NET 2.0 Subset' to '.NET 2.0' and this should resolve your reference issue.
Your answer
Follow this Question
Related Questions
function on collision enter not working. 1 Answer
InvalidProgramException: Invalid IL code with Mono.Cairo on MacOS 0 Answers
How to Setup Openssl & Facebook SDK With Android key HASH on mac OS 10.11.6 1 Answer
Unity creates corrupt .psd duplicates when developing across Windows / macOS with Perforce 0 Answers