Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Andrew Oaten 1 · Jan 18, 2011 at 05:07 PM · serialportio

Using the SerialPort class in Unity 3.1 Free

Hi again, I read that because 3.1 uses Net 2.0, that we can now use the SerialPort Class. However when I try to create an object of said class, even when i wrote 'using System.IO.Ports;', I got the error message.

Assets/NewBehaviourScript.cs(3,17): error CS0234: The type or namespace name Ports' does not exist in the namespaceSystem.IO'. Are you missing an assembly reference?

Am i missing a component or is it a pro only component? Or is it that I need to update something?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
8

Answer by DaveA · Apr 20, 2011 at 10:02 PM

You need to go to Edit/Project Settings/Player and change the .Net setting to 2.0, not subset, and reimport the script.

That said, please let me know if you get anything working. I've seen posts from people who claim it works, but not for me and several others.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoeyK · Sep 26, 2012 at 07:55 PM 0
Share

This works for me. I did this in an older project, forgot where that option was hidden, and then I just redid it in my current project. I won't pretend I understand why it might work for me and not for others but there it is. I'd be happy to post code or screenshots if you think it might help.

avatar image DaveA · Sep 28, 2012 at 10:19 PM 0
Share

Thanks. Oy that's an old post! I got that working and have long since moved on.

avatar image
2
Wiki

Answer by misun1191 · Feb 08, 2015 at 09:14 PM

If you get the 'System.IO.Ports does not exist' error even with .NET 2.0 setting, check whether you previously had tried to build web player. If that's the case, ignore the error message and just build standalone. Then, the error message will disappear.I think it's kind of a bug. Because web player doesn't support the System.IO.Ports, you will get the error message if you tried to build the web player. Strangely and annoyingly, the error message remains until you build new standalone which allows .NET 2.0 setting.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Xitech_ · Jan 06, 2016 at 07:32 PM 0
Share

Somehow It was set to webplayer (which I never used). So after I set .net 2.0 I still got the error. Thanks alot.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

What is the correct way of including a text file asset to an Android build 0 Answers

How to stop Audio not all?? 0 Answers

Shutting a function when another function calling. 1 Answer

FPS KIT VERSION 2.0 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges