Skip to content

Compatibility

J.S.I edited this page Jun 24, 2025 · 2 revisions

🧩 FlexComm Compatibility

FlexComm is designed to work across a wide range of Unity platforms and runtime configurations. However, some features—particularly protocol support—depend on the .NET backend and platform capabilities available at build time.


✅ Supported Platforms

Platform MQTT TCP UDP REST WebSocket Serial Notes
Windows Full support
macOS/Linux Serial limited by .NET API support
UWP Serial uses UWP APIs (Windows.Devices.Serial)
Android/iOS Serial not available; platform-dependent limits
WebGL ⚠️ ⚠️ TCP/UDP emulated via WebSocket fallback

Legend:

  • ✅ = Fully Supported
  • ❌ = Not Supported
  • ⚠️ = Emulated or requires fallback/workaround

⚙️ .NET Compatibility Notes

FlexComm supports both .NET Standard and .NET Framework configurations in Unity, but some protocols rely on APIs that are only available in the full .NET Framework.

❗ Serial Port Limitation

Unity with .NET Standard: No Serial Port Support

The System.IO.Ports.SerialPort class is not available when using Unity with .NET Standard (e.g., IL2CPP or newer scripting backends). Attempting to use SerialManager under these configurations will result in a build error.

✅ To use Serial Communication:

  • Set Api Compatibility Level to “.NET Framework” in Unity Project Settings.
  • Ensure platform-specific code for serial communication is wrapped in #if ENABLE_WINMD_SUPPORT or UNITY_STANDALONE_WIN where applicable.
  • On UWP/HoloLens, the SerialManager automatically uses the UWP Windows.Devices.SerialCommunication API.

🔧 Platform-Specific Workarounds

  • WebGL: TCP/UDP not directly supported. FlexComm uses WebSocket as a fallback with NativeWebSocket.
  • iOS/Android: Depending on permissions, REST and WebSocket are usually supported out-of-the-box. TCP/UDP require extra configuration.
  • Linux/macOS: Serial communication may be possible via Mono or native libraries, but is not officially supported by FlexComm out-of-the-box.

📌 Summary

FlexComm is cross-platform and flexible, but some advanced protocols (like Serial) depend on the Unity scripting backend and operating system. For full support, especially if Serial communication is required, we recommend using the .NET Framework backend where available.

Check the Unity Scripting Backend settings and target platform capabilities when deploying your project.


This documentation is part of the official FlexComm Wiki.
© 2025 Eagle Creative. All rights reserved.
For more information, visit www.eagle-creative.com or reach out at info@eagle-creative.com.

Clone this wiki locally