Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erdemkosk/unity-serialportutility
A lightweight and easy-to-use Serial COM library for Unity Game Engine
https://github.com/erdemkosk/unity-serialportutility
port serial unity unity-game-engine
Last synced: 1 day ago
JSON representation
A lightweight and easy-to-use Serial COM library for Unity Game Engine
- Host: GitHub
- URL: https://github.com/erdemkosk/unity-serialportutility
- Owner: erdemkosk
- Created: 2017-12-28T11:53:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T11:57:05.000Z (almost 7 years ago)
- Last Synced: 2024-11-10T16:16:08.611Z (about 1 month ago)
- Topics: port, serial, unity, unity-game-engine
- Language: C#
- Size: 152 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unity-SerialPortUtility
A lightweight and easy-to-use Serial COM library for Unity Game Engine. Mono C# Compiler does not support SerialPort events so I decided to develop our library for Unity.
And here's sample code! :+1:
```C#
public class SerialCommManager : MonoBehaviour {
ISerialCommunication serialFacade;
// Use this for initialization
void Start () {
serialFacade = new SerialCommunicationFacade();
}
// Update is called once per frame
void Update ()
{
}
public void ConnectSerial()
{
serialFacade.Connect();}
public void SendValueFromSerial(string value)
{
byte[] buf = System.Text.Encoding.UTF8.GetBytes(value);
serialFacade.SendMessage(buf);
}
public void DisconnectSerial()
{
serialFacade.Disconnect();
}
}
```